Skip to content
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(v2): improve work of useCollapsible hook with multiple clicks #5146

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Jul 12, 2021

Motivation

Currently, the useCollapsible hook does not respond well to multiple clicks, especially when the current transition has not yet completed.

This is especially noticeable on mobile devices: for example, transition for collapsed action is not smooth anymore, so that the content is hidden instantly.

Before After
ezgif com-gif-maker (12) ezgif com-gif-maker (11)

Moreover, you have to wait for the transition to finish before starting new one, otherwise there will also be "sharp" transition.

Before After
ezgif com-gif-maker (15) ezgif com-gif-maker (14)

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: bug fix This PR fixes a bug in a past release. label Jul 12, 2021
@lex111 lex111 requested a review from slorber as a code owner July 12, 2021 07:48
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 12, 2021
@netlify
Copy link

netlify bot commented Jul 12, 2021

✔️ [V2]

🔨 Explore the source changes: cbfb571

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60ebf3e0e47b1a000749f2e3

😎 Browse the preview: https://deploy-preview-5146--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 72
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5146--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: -6 B (0%)

Total Size: 965 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 58.8 kB 0 B
website/build/assets/css/styles.********.css 89.1 kB 0 B
website/build/assets/js/main.********.js 458 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.4 kB 0 B
website/build/blog/index.html 26.3 kB 0 B
website/build/docs-tests/index.html 124 kB 0 B
website/build/docs-tests/standalone/index.html 19.1 kB 0 B
website/build/docs/index.html 46 kB -3 B (0%)
website/build/docs/installation/index.html 53.3 kB -3 B (0%)
website/build/index.html 27.3 kB 0 B

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Jul 13, 2021

Thanks! also noticed this annoying behavior, happy to get this fixed

@slorber slorber merged commit 45a87a1 into master Jul 13, 2021
@slorber slorber deleted the lex111/imp-collap branch August 17, 2021 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants