Skip to content

Fix: Collapsing Sidebar Sections - #3371

Open
1209simran wants to merge 1 commit into
reactjs:mainfrom
1209simran:Collapsing_Sidebar_Items
Open

Fix: Collapsing Sidebar Sections#3371
1209simran wants to merge 1 commit into
reactjs:mainfrom
1209simran:Collapsing_Sidebar_Items

Conversation

@1209simran

Copy link
Copy Markdown

When we click on the sidebar sections of Community, Blog or Tutorials Page, the button doesn't collapse.

@facebook-github-bot

Copy link
Copy Markdown
Collaborator

Hi @1209simran!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@reactjs-bot

reactjs-bot commented Nov 4, 2020

Copy link
Copy Markdown

Deploy preview for reactjs ready!

Built without sensitive environment variables with commit b705b51

https://deploy-preview-3371--reactjs.netlify.app

@facebook-github-bot

Copy link
Copy Markdown
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't look right. If sectionList.length === 0 then we wouldn't ever get here since we're inside sectionList.map(...). I think this was actually intentional (what's the point of collapsing the only section?) although I agree this design is a bit confusing. It would make sense to me to just remove the arrow if the length is 1.

@1209simran 1209simran Nov 4, 2020

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes @gaearon, this design looks confusing to me for the single section that's why I replace the length. I'll try to remove the arrow instead of replacing the length to 0.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@gaearon, I've removed the arrow instead of changing the length. Please check the updated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants