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

Replace details/summary in website side nav with button and list #2242

Merged
merged 8 commits into from
Jul 15, 2024

Conversation

shleewhite
Copy link
Contributor

@shleewhite shleewhite commented Jul 12, 2024

📌 Summary

This PR replaces the <detail> and <summary> elements that handle the collapsible sections in the website side navigation with <button>s that show and hide a <ul>.

REMAINING WORK:

  • make the tests for the new component
  • should I rename the class .doc-table-of-contents__summary to be .doc-table-of-contents__button now that it is no longer on a summary element?

🛠️ Detailed description

To do this, I added a new component <Doc::TableOfContents::CollapsibleItem>.

Other changes I made for this work were:

  • Updating the CSS to not use the open property of the for styling and instead use a class
  • Updating the existing tests in the side bar navigation test file to match the new markup + add tests for the new component.

📸 Screenshots

Nothing visually changed, but here is the markup before:
Screenshot 2024-07-12 at 6 09 15 PM

and here is the markup after:
Screenshot 2024-07-12 at 6 09 33 PM

🔗 External links

Jira ticket: HDS-1308


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Jul 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Jul 15, 2024 7:46pm
hds-website ✅ Ready (Inspect) Visit Preview Jul 15, 2024 7:46pm

@shleewhite shleewhite requested a review from a team July 15, 2024 13:30
Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

Did a first review. A few things that would need addressing.

@shleewhite shleewhite changed the title WIP: replace details/summary in website side nav with button and list Replace details/summary in website side nav with button and list Jul 15, 2024
Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

Excellent!

Copy link
Contributor

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

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

This bug has been bothering me for so long. TY for fixing it!

@shleewhite shleewhite merged commit 86fdd79 into main Jul 15, 2024
12 checks passed
@shleewhite shleewhite deleted the shleewhite/hds-1308/fix-website-nav branch July 15, 2024 21:54
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.

3 participants