Skip to content

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Jul 16, 2025

📌 Summary

While working on #3025 I noticed that when the AppSideNav::List:Link is rendered as a <button>, it inherits some of the styles from the HTML element itself.

modified

This PR addresses this issue.

🛠️ Detailed description

In this PR I have:

  • applied explicit background color to .hds-app-side-nav__list-item-link element
    • this issue didn't happen in the old .hds-side-nav__list-item-link element because in that case a background-color was specifically assigned
  • removed invisible border on .hds-[app-]side-nav__list-item-link elements
  • updated showcase pages to include visual testing for use case where .hds-[app-]side-nav__list-item-link is a button

📸 Screenshots

Before:
screenshot_5172

After:
screenshot_5170

🔗 External links

Jira ticket: https://hashicorp.atlassian.net/browse/HDS-5153


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

didoo added 3 commits July 16, 2025 13:49
…nk` element

(to avoid inheriting from the `<button>` element when it’s a button and not a link
….hds-[app-]side-nav__list-item-link` is a button
@didoo didoo requested a review from KristinLBradley July 16, 2025 14:07
@didoo didoo requested a review from a team as a code owner July 16, 2025 14:07
Copy link

vercel bot commented Jul 16, 2025

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

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Jul 16, 2025 2:23pm
hds-website ✅ Ready (Inspect) Visit Preview Jul 16, 2025 2:23pm

Copy link
Contributor

@zamoore zamoore left a comment

Choose a reason for hiding this comment

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

LGTM! Good catch

@didoo didoo merged commit 288d4cc into main Jul 17, 2025
16 checks passed
@didoo didoo deleted the sidenav-list-link-fix-button-styles branch July 17, 2025 07:22
@hashibot-hds hashibot-hds mentioned this pull request Jul 17, 2025
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.

3 participants