vue-popper
vue-popper copied to clipboard
vue-popperjs 3.0 - Upgrade to Popper.js v2.x
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
- [ ] made a poor attempt at implementing the detectOverflow utility function for
boundaries-selector
(b8c47b1) -- need to fix it.
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();
andthis.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 whenshowPopper: true
and disabled whenshowPopper: 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
and5. 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.
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 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.
Hi, some info concerning the evolution of this pull-request?
Good effort going to taste?! π€ yikes!