Comments (10)
What version of ember-popper-modifier and ember-modifier do you actually use?
Can you share a reproduction?
from ember-bootstrap.
Hi @jelhan, thanks for the reply!
I have created a repository that is a minimal reproduction of the issue. The behaviour is consistent with the ember-bootstrap website, which also exhibits the issue.
I have not explicitly added ember-popper-modifier
or ember-modifier
to my project but according to the lockfile, it has pulled the following versions:
ember-popper-modifier
:4.1.0
ember-modifier
:4.1.0
When running the reproduction library above with ember run start
, it has the same tooltip positioning issue:
from ember-bootstrap.
Thanks a lot for providing the reproduction. Also good to know that it affects the documentation website as well. Sounds as if it is a general regression.
I'm not sure how soon I (or another maintainer) have time looking into it. If you could trace it down to a specific version, which broke it, that would be very helpful. It might be caused by a change in ember-bootstrap
itself or in ember-popper-modifier
.
from ember-bootstrap.
Thanks! I'm not too familiar with the interaction between these packages, so I just did some "logical" debugging.
This might give some insight. (cfg
is the bootstrapVersion
configured in ember-cli-build.js
):
I started lowering the version of all packages and the issue stayed persistent:
bootstrap |
ember-modifier |
ember-popper-modifier |
ember-bootstrap |
cfg | result |
---|---|---|---|---|---|
^5.3.3 |
3.0.0 |
3.0.0 |
6.2.0 |
5 | ❌ Broken as described |
^5.3.3 |
3.0.0 |
3.0.0 |
5.1.1 |
5 | ❌ Broken as described |
^5.3.3 |
2.1.2 |
3.0.0 |
5.0.0 |
5 | ❌ Broken as described |
^5.3.3 |
2.1.2 |
2.0.1 |
5.0.0 |
5 | ❌ Broken as described |
I then looked up the last working state on my project and started increasing the version of all packages from there. The notable difference is, that my project still used Bootstrap 4 before we upgraded.
bootstrap |
ember-modifier |
ember-popper-modifier |
ember-bootstrap |
cfg | result |
---|---|---|---|---|---|
^4.6.2 |
3.1.0 |
2.0.0 |
5.1.1 |
4 | ✅ Works as expected |
^4.6.2 |
4.1.0 |
4.1.0 |
6.2.0 |
4 | ✅ Works as expected |
^4.6.2 |
4.1.0 |
4.1.0 |
6.2.0 |
5 | ❌❌ Very broken* |
^5.0.0 |
4.1.0 |
4.1.0 |
6.2.0 |
4 | ❌ Broken as described |
^5.0.0 |
4.1.0 |
4.1.0 |
6.2.0 |
5 | ❌ Broken as described |
^5.3.3 |
4.1.0 |
4.1.0 |
6.2.0 |
4 | ❌❌ Very broken** |
^5.3.3 |
4.1.0 |
4.1.0 |
6.2.0 |
5 | ❌ Broken as described |
* = no arrows, positioning inconsistent between vertical and horizontal
** = no arrows
To summarize:
- I don't think
ember-modifier
orember-popper-modifier
versions have an impact here. - Up until
bootstrap<=4.6.2
, the tooltips work fine when using Bootstrap 4 (but not Bootstrap 5) even with the latest version of all other (and this) library. - Starting from
bootstrap=5.0.0
, the tooltip exhibit the described issue using both Bootstrap 4 and 5 - Using the latest version of
bootstrap=5.3.3
, the tooltip does not have an arrow when using Bootstrap 4 at all.
When I created the reproduction project, I ran ember generate ember-bootstrap
, which generated me an ember-cli-build.js
entry which still manually imports the styles despite this causing a deprecation warning, so I disabled importBootstrapCSS
and instead added app.import('node_modules/bootstrap/dist/css/bootstrap.css');
but this does not seem to have any impact.
To summa-summarize: It looks like the issue is entirely dependent on the version of the bootstrap
package. I didn't find any combination where Bootstrap 5 works properly but maybe I missed it or this issue was simply overlooked during testing as it's not very obvious at first sight.
from ember-bootstrap.
I have toyed around a little with the docs app. I'm not yet sure how it is supposed to work, but we seem to configure a [0,0]
offset to ember-popper-modifier
, which does not take the arrow into consideration.
I still need to test this behavior using bs-4, but manually setting the offset in ember-bootstrap/addon/components/bs-contextual-help/element.js
does help.
from ember-bootstrap.
We may want to have a look which options Bootstrap provides to Popper for the tooltip. I feel porting over what Bootstrap does is the safest option in such cases.
from ember-bootstrap.
Upon reading the discussion in Discord, I double-checked the test setup and noticed I forgot to remove the caret (^
) in the Bootstrap version in the tests above.
When pinning bootstrap
to an exact version, I get the following results:
(Still using ember-modifier=4.1.0
, ember-popper-modifier=4.1.0
, ember-bootstrap=6.2.0
, cfg=5
)
bootstrap |
result |
---|---|
5.3.3 |
❌ Broken as described |
5.3.0 |
❌ Broken as described |
5.3.0-alpha3 |
❌ Broken as described |
5.3.0-alpha2 |
✅ Works as expected |
5.3.0-alpha1 |
✅ Works as expected |
5.2.3 |
✅ Works as expected |
5.2.2 |
✅ Works as expected |
5.2.0 |
✅ Works as expected |
5.1.0 |
✅ Works as expected |
5.0.0 |
✅ Works as expected |
So the regression happened with the 5.3.0-alpha3
release of the bootstrap
package.
Now this is really just an (un)educated guess but I quickly looked over the changes and this commit seems to change the default offset.
from ember-bootstrap.
This has been addressed in #2119.
Should we create a new release specifically for this bugfix?
from ember-bootstrap.
Thanks a lot for fixing. I can quickly release it.
from ember-bootstrap.
Released as v6.3.0.
from ember-bootstrap.
Related Issues (20)
- Refactor away from computed properties HOT 1
- Refactor away from observers HOT 1
- Remove BrowserStack badge
- Run tests on Safari again HOT 2
- Remove subclassing deprecation message
- Drop RSVP dependency
- Road to TypeScript HOT 16
- Review need of custom CSS HOT 2
- Deprecate Bootstrap CSS, fonts, and theme import
- Deprecate inserting wormhole target HOT 1
- Improve public API for <BsDropdown>
- Bootstrap 5 dropdown direction and menu alignment HOT 5
- BsCarousel indicators are missing `aria-label` attribute.
- BsCarousel customizable controls are not working HOT 1
- Tracking issue: ember-bootstrap 7.0.0
- Deprecate ember-bootstrap blueprints HOT 2
- [6.1.0] {{on 'click'}}, <LinkTo> and <menu.linkTo> in dropdown menus dysfunctional HOT 8
- Test app does not rebuild when doing changes to the library HOT 2
- TypeScript files are published and not transpiled to JavaScript before HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-bootstrap.