Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!refactor: use Popper.js instead of Tether, update deps #574

Merged
merged 1 commit into from Oct 30, 2019

Conversation

Justineo
Copy link
Member

@Justineo Justineo commented Oct 25, 2019

使用 Popper.js 替换 Tether。

  • Tether 已经官宣不再维护,虽然 Popper.js 也没有得到太好的频繁维护,但是它仍然是 Bootstrap 依赖的浮层定位库,相比之下可靠性更可控一些。
  • 因为 Popper.js 在前一个版本实现了 flipVariationsByContent 这个配置功能,使得浮层可以在次级方向上超出视窗时自动翻转方向,这样可以使 RegionPickerDatePicker 这样的组件不需要用户来指定定位参数了。
  • Tether 有一些初始化时定位的 bug,在 VEUI 之前版本的 Tooltip 等组件第一次展现时都遇到过定位不对的问题,切换后目测已经不再有此问题。
  • DLS 版本的目标浏览器已经可以抛弃 IE10-,所以不再有 blocker issue 了。

⚠️ BREAKING CHANGE ⚠️

Overlay 组件的 options prop(以及多个组件的 overlay-options prop)现在都对应于Popper.js 的 options 参数.

此 PR 将代替 #418


Refs:

floating-ui/floating-ui#512
floating-ui/floating-ui#754

@Justineo Justineo changed the title refactor: use Popper.js instead of Tether, update deps !refactor: use Popper.js instead of Tether, update deps Oct 25, 2019
@codecov
Copy link

codecov bot commented Oct 25, 2019

Codecov Report

Merging #574 into theme-dls will decrease coverage by 0.34%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##           theme-dls     #574      +/-   ##
=============================================
- Coverage      75.35%   75.01%   -0.35%     
=============================================
  Files            154      154              
  Lines           4906     4890      -16     
  Branches         994      995       +1     
=============================================
- Hits            3697     3668      -29     
- Misses           848      863      +15     
+ Partials         361      359       -2
Impacted Files Coverage Δ
packages/veui/src/components/Tooltip.vue 69.56% <ø> (ø) ⬆️
.../veui/src/components/Autocomplete/Autocomplete.vue 100% <ø> (ø) ⬆️
packages/veui/src/components/RegionPicker.vue 26.14% <ø> (ø) ⬆️
packages/veui/src/mixins/dropdown.js 60% <ø> (ø) ⬆️
packages/veui/src/utils/helper.js 86.95% <ø> (-2.07%) ⬇️
packages/veui/src/mixins/overlay.js 57.14% <100%> (-9.53%) ⬇️
packages/veui/src/components/Overlay.vue 84.25% <100%> (-1.07%) ⬇️
...ackages/veui/src/components/Select/OptionGroup.vue 72% <100%> (-4%) ⬇️
packages/veui/src/utils/datasource.js 62.06% <0%> (-31.04%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff1a509...7d6fdb9. Read the comment docs.

@Justineo Justineo merged commit 90ad63c into theme-dls Oct 30, 2019
@Justineo Justineo deleted the popper.js branch October 30, 2019 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants