Skip to content

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

Merged
merged 3 commits into from
Aug 12, 2021

Conversation

swarajpure
Copy link
Contributor

Fixes #769

assert.dom('ol.toc-level-1').isNotVisible;
assert.dom('.toc-level-1').doesNotHaveClass('selected');

await click(document.querySelector('.toc-level-0 > a'));
Copy link
Contributor Author

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;

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?

Copy link
Contributor Author

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/

Copy link

@ankushdharkar ankushdharkar left a 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.

@mansona mansona temporarily deployed to ember-api-do-feat-remov-tz1kj5 August 5, 2021 12:16 Inactive
@jenweber
Copy link
Contributor

jenweber commented Aug 5, 2021

Hi! Thanks for your work on this! I agree with Ankush that isVisible should be isVisible() instead. Once that is fixed, this will be ready to merge. I tested this locally and it worked great.

@locks locks had a problem deploying to ember-api-do-feat-remov-tz1kj5 August 6, 2021 20:21 Failure
@swarajpure
Copy link
Contributor Author

Hi! Thanks for your work on this! I agree with Ankush that isVisible should be isVisible() instead. Once that is fixed, this will be ready to merge. I tested this locally and it worked great.

Thanks!
Done with the changes.

Can you please review now @jenweber @ankushdharkar? 😄

@locks locks temporarily deployed to ember-api-do-feat-remov-tz1kj5 August 6, 2021 20:55 Inactive
@jenweber
Copy link
Contributor

jenweber commented Aug 8, 2021

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

yarn install v1.22.11
[1/5] Validating package.json...
error [email protected]: The engine "yarn" is incompatible with this module. Expected version "1.22.10". Got "1.22.11"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

@swarajpure
Copy link
Contributor Author

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

yarn install v1.22.11
[1/5] Validating package.json...
error [email protected]: The engine "yarn" is incompatible with this module. Expected version "1.22.10". Got "1.22.11"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

Thanks! Please let me know if there was something done incorrectly from my end. Will fix it 🙂

Copy link
Contributor

@jenweber jenweber left a 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.

@jenweber jenweber merged commit 752e500 into ember-learn:master Aug 12, 2021
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.

Replace jquery animation
5 participants