-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
v4 - Remove Tether for Popper #22444
Conversation
Note that Popper by default applies some padding (virtually, not CSS) to the container element (in practice, the tooltips will never touch the edges of the container/window). I think it's the same behavior that the old Bootstrap v3 tooltips had, but I'm not 100% sure, it is worth to review if this is something you want to keep or if you prefer to disable this feature setting the |
It seems some tests are failing on iOS9 see : floating-ui/floating-ui#210 |
Is there any way to see the full log of the iOS9 tests? By the way I'm downloading the iOS 9.3 runtime for XCode and I'll try to run the Popper.js test suite there to see if something is wrong. |
I tried our tests in SauceLabs with an iOS simulator on iOS 9.3 and everything works fine... 😩 |
Now it failed on IE10? Seems like you have some flaky test |
0dfdf7f
to
3d3a8ed
Compare
All tests passed but for an unknown reason Travis failed to close connection with Saucelabs... |
😂😂😂 it's still a progress I can't see iOS in the logs, isn't that one that's failing? |
@@ -1,3 +1,5 @@ | |||
/* global Popper */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, why do you need to set it as global? Wouldn't be it cleaner to import it with ESM and mark it as external dependency in your modules resolver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently they are no global solution for that issue (see : #17201 (comment)).
So for now I'll pass on that.
Maybe @bardiharborow have some feedbacks ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need some context because I'm not confident with the Bootstrap v4 code base, what do you use to bundle the package and convert import
s?
Webpack, Rollup and Browserify allow to define a dependency as external, thus avoiding to bundle it together with your own source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just build our JS files with Babel that's all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Babel is a transpiler, it doesn't handle the bundling of the resources AFAIK 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bootstrap uses grunt-contrib-concat
see
https://github.com/twbs/bootstrap/blob/v4-dev/Gruntfile.js#L96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, but I don't understand how does it handle the import
and export
logic...
It first transpiles each module to Require.js and then it concats them together right? But where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each module is compiled by Babel and grunt-contrib-concat concatenate each files in boostrap.js and at the end we use uglify for minify our JS.
Import and export are native in ES6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FezVrasta
look at https://github.com/twbs/bootstrap/blob/v4-dev/.babelrc
in short it doesn't transform and removes import/export declarations.
For me it's bit hacky and not a nicest solution but It simply works :)
Again on iOS : https://travis-ci.org/twbs/bootstrap/jobs/222776929#L411 |
@Johann-S can you enable the screen recording of SauceLabs and see what's happening there? |
1142910
to
82da82a
Compare
Looks like screen recording is already on, you just have to visit: And find the iOS test that failed. I can't find it 😓 |
The only failed test found is this one : https://saucelabs.com/beta/tests/604d33a88ea947e89df0e2fd11d65b4e/watch But no iOS 😩 |
Does Bootstrap v4 support Safari 5? 😵 |
No only those browsers : https://github.com/twbs/bootstrap/blob/v4-dev/grunt/sauce_browsers.yml But maybe they are something wrong in this file |
Bootstrap v4 doesn't support Safari on Windows, per http://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#desktop-browsers |
So why is there that test in the SauceLabs screen records? Also, is there any way to output the logs from the failing browser? They look like black boxes to me 🤕 |
93526d6
to
314bcd9
Compare
Special thanks for @FezVrasta and @wojtask9 who helped me a lot 👍 We made awesome works together 💪 |
"@FezVrasta and his community are very active" Aside from the bad English, I did not find this helpful. I found popper in v4-dev by looking at the github pulse, not by issues history. This was a bad first start. Then I noticed that the documentation on the v4 site was horribly misaligned with v4-dev, and the live documentation included hipster-ipsum (tight pants!) and inconsistent styles, and poor English. Then I found grammar errors in the merge referenced in the pulse. Next, I located a comment by mdo from December, where he said he would pass on switching to popper for what were apparently no reasons. I then went to https://popper.js.org/ on my mobile phone and was greeted by a dancing yellow popper tooltip pinned to the top of the site (which begged me to star the github project while blocking text), and noticed that when I scroll down on my shiny new android, the popup twitches and dances all over my screen, as if it's having a fit of content-blocking vibrational joy. So, there is my introduction, a very very bad one. With no specifics it certainly appeared that the developer of popper.js simply had a pull request denied and then successfully rammed his pet project into bootstrap. I hope the behavior in bootstrap will be considerably better than the behavior on the developer's own site. It took some work on my own to realize that there may be good reasons for the change, no help from this repo. My research continued and I discovered that popper.js is actually being recommended in the github project readme for tether.js, since HubSpot is not able to maintain tether. So, that is a great reason to migrate. But I had to find that on my own. I have yet to find any list of problems which popper has "fixed", or any reasons for why the change was made, here on the bootstrap site. Those who are administrating v4-dev branch changes and tickets may want to bother including the rest of the world in their thinking. This experience has left me with mixed feelings about a significant change, while I am actively busy developing with bs4. That being said, I have a slightly better understanding of why the change was made, to popper. I hope it's easily excluded since, like the developer, I also work with view engines that use a virtual DOM, and the twitching behavior on mobile android certainly won't make it past my boss or QA. It would have helped me as a bootstrap developer to have found any documented reasons for a change to popper while browsing issues regularly in the last month, instead of finding a questionable merge in v4-dev accompanied by new lows in the live documentation pages. |
Hi @valleyspirit, you can find all the related issues linked to this PR right above your message. I hope it helps |
Thank you @valleyspirit for your opinion and feedbacks. |
@Johann-S I'd like to thank you for your time and the awesome work you are doing on this awesome open-source project. Much appreciated. |
Thank you @cr101 much appreciate ❤️ |
@@ -136,7 +140,7 @@ You should only add tooltips to HTML elements that are traditionally keyboard-fo | |||
|
|||
<!-- Generated markup by the plugin --> | |||
<div class="tooltip tooltip-top" role="tooltip"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to rename tooltip-top
to bs-tooltip-top
if I've understand other changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch @Lausselloic feel free to open a PR 👍
@valleyspirit I appreciate the feedback as well, but there are a few things we should clarify about this PR and how we work on Bootstrap.
When we publish our first beta, we'll have a blog post, updated documentation, and more to share with folks. Until then, if you're using the bleeding edge changes from |
Tether.js was replaced by Popper.js in twbs/bootstrap#22444
tether.js is not actually relevant to any blacklight_range_limit JS. Earlier pre-releases of Bootstrap 4 required tether for tooltips. But even before final Bootstrap 4.0, Bootstrap tooltips were no longer using tether, using 'popper.js' instead. twbs/bootstrap#22444 So the generated require tether (and rail gem to provide tether as a sprockets asset) are irrelevant to blacklight_range_limit. It is not necessary to replace with a "require 'popper'": * A standard generated blacklight app will already have a "require 'popper'" in it's application.js https://github.com/projectblacklight/blacklight/blob/55e748dd3465b9e2781d4def04b912fcbfb1b231/lib/generators/blacklight/assets_generator.rb#L20 * The failure mode for not having popper is graceful -- tooltips simply won't work, and you will get a line in JS console "Bootstrap's tooltips require Popper.js" Closes #97
tether.js is not actually relevant to any blacklight_range_limit JS. Earlier pre-releases of Bootstrap 4 required tether for tooltips. But even before final Bootstrap 4.0, Bootstrap tooltips were no longer using tether, using 'popper.js' instead. twbs/bootstrap#22444 So the generated require tether (and rail gem to provide tether as a sprockets asset) are irrelevant to blacklight_range_limit. It is not necessary to replace with a "require 'popper'": * A standard generated blacklight app will already have a "require 'popper'" in it's application.js https://github.com/projectblacklight/blacklight/blob/55e748dd3465b9e2781d4def04b912fcbfb1b231/lib/generators/blacklight/assets_generator.rb#L20 * The failure mode for not having popper is graceful -- tooltips simply won't work, and you will get a line in JS console "Bootstrap's tooltips require Popper.js" Closes #97
Remove Tether for Popper
Reasons
TODO
update
method to update position for Tooltip/Popover/Dropdownflip
attribute for Dropdown to disable the flip behavior of Popper.jsfallbackPlacement
for Tooltip and Popoversoffset
option in documentation for DropdownWork in progress...Close : #19685, #19279, #22261, #22249, #22022, #21962, #19888, #17167, #17669