-
-
Notifications
You must be signed in to change notification settings - Fork 113
Replace jQuery animation for table of contents and remove jQuery package #771
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
Conversation
assert.dom('ol.toc-level-1').isNotVisible; | ||
assert.dom('.toc-level-1').doesNotHaveClass('selected'); | ||
|
||
await click(document.querySelector('.toc-level-0 > a')); |
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.
The button is being referred thrice here, will make it into a variable rather than repeating the code
@@ -121,11 +121,17 @@ li.toc-level-0 { | |||
ol.toc-level-1 { | |||
border-left: $base-border; | |||
font-size: $base-font-size * 0.9; | |||
transition: max-height 0.5s ease; |
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.
Should we be animating height or max-height?
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 can't actually use height. For the expanded condition, we would have to give height: auto
and According to the Mozilla Developer Network docs, auto values have been intentionally excluded from the CSS transitions spec.
Source: https://css-tricks.com/using-css-transitions-auto-dimensions/
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.
Great! Love that you added new tests. Some small queries in the comments.
Hi! Thanks for your work on this! I agree with Ankush that isVisible should be |
Thanks! Can you please review now @jenweber @ankushdharkar? 😄 |
c9dfbc4
to
1375c28
Compare
Hi @swarajpure, thanks for your work on this! I see the following failing in CI. I think it's unrelated to your PR and I have opened a separate PR to try and fix it. #772
|
Thanks! Please let me know if there was something done incorrectly from my end. Will fix it 🙂 |
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 think my PR worked! We'll see. I'll merge your PR in a moment if tests are green.
Fixes #769