-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix: consistent event name triggering in components #10949
Conversation
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.
Not only a fix as it introduce a new event and sinifically change when closed
is triggered.
So LGTM for v6.5 but I would like to make this behavior consistent across all components. So i'm not merging it right now.
Definitely, should I also create an issue and link the changes/PRs for the other components there then? I remember seeing some issue about (consistent) event naming. |
Should I change the title of this PR then? |
Yes ;) |
I like the new event naming because However I'm a bit worried that some users might get broken projects after updating to v6.5 if they rely on @ncoden @DanielRuf what do you think? There's probably no way to throw a warning if someone is relying on |
@SassNinja I don't think, because the problem would be that they assume that the So everything we can do is a clear migration note in the release. Edit: an other solution would be to keep |
Definitely.
Not sure how we could also name these. |
Interesting idea what made me think about the possibility of just adding a deprecation warning in 6.5 and hold back the actual PR until 6.6 But I agree: clear migration notes is probably the best solution. I think we can expect people to read the notes before updating their projects.
Yup there is not alternative because |
@SassNinja There is no 6.6 planned as we will start working on v7 ;) |
Alright, so forget my thought about holding it back. |
Currently this PR has conflicts. Also which components do not yet use this event naming scheme (if we know it already) or should I go through all and check them? |
@DanielRuf I don't have them in mind. But even with the list I'll go for manually checking all components where we change properties/attributes or wait for timeout/animation to finish anyway. |
Note: v6.5 was renamed v6.6. |
trigger closed.zf.offcanvas when the transition has ended
Resolved the conflicts. |
@DanielRuf When your PR is already open, unless if you want to clean the PR, please merge |
Can you update tests ? |
…vas-trigger-close-events
|
@DanielRuf Are you done with this PR ? Is there any component with single events being triggered only before or after something (timeout/transition...) ? |
Drilldown, Offcanvas and Reveal trigger Drilldown
I guess this should be in the callback of transitionend. |
True. |
…lruf/foundation-sites into fix/offcanvas-trigger-close-events
Updated it accordingly. |
- Remove unecessary event layers (`close.zf.drilldown` is already tested) - Expect "is-closed" and "is-active" NOT to be present. - Avoir calling `done()` several times. Call `done()` after all testes passed.
…down When triggering "closed.zf.drilldown", the context `this` should be the component. But jQuery's `.one(...)` change it to `$elem`.
1. Retrieve datas and elements 2. Apply actions on them 3. Trigger events
@DanielRuf I took a closer look at the Drilldown test and found a bug in it, that hided a bug in the |
Merged |
LGTM |
This pull request has been mentioned on Foundation Open Source Community. There might be relevant details there: https://foundation.discourse.group/t/foundation-for-sites-v6-6-0-is-here-farout/30/1 |
offcanvas
See #8727