vue-final / vue-final-modal

🍕Vue Final Modal is a tiny, renderless, mobile-friendly, feature-rich modal component for Vue.js.
https://vue-final-modal.org
MIT License
903 stars 97 forks source link

Is migration guide still correct? #364

Closed doutatsu closed 1 year ago

doutatsu commented 1 year ago

I've followed the documentation while upgrading from version 3 to 4, changing prop names to the new ones, but was surprised to see my styling break. But when I reverted it back to how it was - everything went back to working correctly... Basically I didn't need to change anything and v4 works as it supposed to be.

Version

vue-final-modal: 4.3.1 vue: 3.2.47 nuxt: N/A

OS

Mac

Reproduction Link

Steps to reproduce

Update old props to new ones. Below is the template using old notation:

<template lang='pug'>
vue-final-modal(
  v-bind="$attrs"
  classes="flex items-end justify-center min-h-screen p-4 text-center sm_items-center sm_p-0"
  overlay-class="!bg-gray-500 !bg-opacity-75 !transition-opacity dark_!bg-gray-900 dark_!opacity-90"
  :transition='transition'
  :overlay-transition='overlayTransition'
  :content-class="classes"
  esc-to-close
  click-to-close
)
  .modal-body
    base-loader(:is-loading="loading")
    .bg-white.px-4.pt-5.pb-4.sm_p-6.sm_pb-4.rounded-lg.dark_bg-gray-800
      .sm_flex.sm_items-start
        slot(name="body")
    .modal-actions(v-if="$slots.actions")
      slot(name="actions")
</template>

And here using the notation in the documentation for v4:

<template lang='pug'>
vue-final-modal(
  v-bind="$attrs"
  class="flex items-end justify-center min-h-screen p-4 text-center sm_items-center sm_p-0"
  overlay-class="!bg-gray-500 !bg-opacity-75 !transition-opacity dark_!bg-gray-900 dark_!opacity-90"
  :content-transition='transition'
  :overlay-transition='overlayTransition'
  :content-class="classes"
  esc-to-close
  click-to-close
)
  .modal-body
    base-loader(:is-loading="loading")
    .bg-white.px-4.pt-5.pb-4.sm_p-6.sm_pb-4.rounded-lg.dark_bg-gray-800
      .sm_flex.sm_items-start
        slot(name="body")
    .modal-actions(v-if="$slots.actions")
      slot(name="actions")
</template>

What is Expected?

I was expecting to:

  1. See my old classes not working, due to the usage of old props
  2. When changing to new props, see the functionality be restored, as per migration docs

What is actually happening?

The opposite happened - using old props works, but new props do not work

doutatsu commented 1 year ago

Bumping this up again, as it's been 2 weeks

doutatsu commented 1 year ago

Not sure why it wasn't working, but I made another attempt and now the new properties and all work as expected, so closing this