vue-popper icon indicating copy to clipboard operation
vue-popper copied to clipboard

vue-popperjs 3.0 - Upgrade to Popper.js v2.x

Open curtisbelt opened this issue 4 years ago β€’ 4 comments

This should be a pretty solid start for #127 I followed the migration guide here: https://popper.js.org/docs/v2/migration-guide/

To Do

Possible Additional Changes?

  • [x] Remove gpuAcceleration: false from our default options? See https://github.com/RobinCK/vue-popper/pull/133#discussion_r394101201 below.

Testing Needed

  • [ ] this.popperJS.enableEventListeners(); and this.popperJS.disableEventListeners(); was removed via d51caa4 because the methods were removed in Popper v2. I did not replace the logic however, as I noticed the scroll/resize listeners in browser and successfully enabled when showPopper: true and disabled when showPopper: false.
  • [ ] General testing

Breaking Changes

  • In Popper v2, by default CSS transitions will not work - see https://popper.js.org/docs/v2/migration-guide/#13-transitions for the pros/cons here. I need to test more but I'm thinking this is fine as the transitions be from vue transitions anyway.
  • Styles have been updated due to 4. Remove all CSS margins and 5. Ensure your popper and arrow box size is constant for all placements of the migration guide. I went further and made the styles completely match their tutorial to make sure it's styled as popper.js expects - and I thought it might bring some consistency.

curtisbelt avatar Mar 18 '20 04:03 curtisbelt

I think rollup might needs to be upgraded to support the scoped packages (which popper.js v2 now uses). I will investigate further later (have to get back to day job :smiley:)

Edit: fixed via configure global '@popperjs/core': 'Popper' (edbf63d)

curtisbelt avatar Mar 18 '20 15:03 curtisbelt

@curtisbelt I tested your draft proposal for the upgrade to popper v2. One thing I noticed is regarding the document click events. If I have a table with a popper on each row, with the clickToToggle trigger option, each time I click on the element it will fire many events to each one of the popper components, and it is slow. I did not have much time to investigate it, so ended up adding a dependency called v-click-outside. It will also attach many events, but I don't know why the performance is much better.

prem-prakash avatar Oct 22 '20 14:10 prem-prakash

Hi, some info concerning the evolution of this pull-request?

DraftProducts avatar Mar 31 '21 11:03 DraftProducts

Good effort going to taste?! πŸ€” yikes!

the94air avatar Jan 17 '22 07:01 the94air