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: collapse siblings when first category is selected #7786

Merged
merged 1 commit into from Jul 15, 2022

Conversation

whiteand
Copy link
Contributor

Motivation

When clicking on first section other section will not collapse.

Test Plan

expandedItem when it is equal to 0 is a falsy value. Therefore that useEffect will not produce any effect. I've changed it to checking of expandedItem != null in order to ensure that effect will not happen only when expanded item is null or undefined.

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

There is none

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 15, 2022
@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label Jul 15, 2022
@Josh-Cena Josh-Cena changed the title fix: not collapsing when first category is selected fix: collapse siblings when first category is selected Jul 15, 2022
Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Makes sense to me...

@netlify
Copy link

netlify bot commented Jul 15, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 7474aa6
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62d123a175b64f000868df58
😎 Deploy Preview https://deploy-preview-7786--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟢 95 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 84 🟢 100 🟢 100 🟢 100 🟢 90 Report

@Josh-Cena Josh-Cena merged commit cf134a5 into facebook:main Jul 15, 2022
@whiteand whiteand deleted the fix-branch branch July 15, 2022 09:21
@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Jul 15, 2022
slorber pushed a commit that referenced this pull request Sep 1, 2022
fix: not collapsing when first category is selected
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus 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.

None yet

4 participants