Skip to content

Website - Improve clarity/accuracy of how the @isHrefExternal argument is documented across multiple components #3025

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

Merged
merged 6 commits into from
Jul 17, 2025

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Jul 16, 2025

📌 Summary

This PR is the result of this conversation: https://hashicorp.slack.com/archives/C025N5V4PFZ/p1752603803426089

🛠️ Detailed description

In this PR I have:

  • updated the “How to use” sections related to @isHrefExternal for different components
  • updated the “Component API” documentation for multiple components that had @isHrefExternal arguments
  • updated showcase for AppSideNav/SideNav with more use cases for @isHrefExternal
    • this is a special case, compared with the other components, because we explicitly use the @isHrefExternal argument to determine if show the external icon or not, without a default, but at the same time the argument is forwarded to the Hds::Interactive component, which has a default true for this argument.

📸 Screenshots

Before:
screenshot_5162

After:
screenshot_5163

🔗 External links

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


👀 Component checklist

  • Percy was checked for any visual regression

💬 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 11:53
…sHrefExternal`

this is a special case, compared with the other components, because we explicitly use the `@isHrefExternal` argument to determine if show the external icon or not, without a default, but at the same time the argument is forwarded to the `Hds::Interactive` component, which has a default `true` for this argument.
@didoo didoo requested review from a team as code owners July 16, 2025 12:20
@hashibot-hds hashibot-hds added docs-website Content updates to the documentation website showcase labels Jul 16, 2025
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 4:42pm
hds-website ✅ Ready (Inspect) Visit Preview Jul 16, 2025 4:42pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the clarity and accuracy of documentation for the @isHrefExternal argument across multiple components in the website's design system documentation. The changes correct inconsistencies in how this boolean parameter's default behavior and usage are described.

  • Corrects the default value documentation from false to reflecting the actual default behavior (true/undefined)
  • Standardizes the description language across all component documentation files
  • Fixes an incorrect example in the inline link documentation that showed @isHrefExternal={{true}} instead of {{false}}

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
website/docs/utilities/interactive/partials/code/how-to-use.md Updates explanation of default external link behavior and @isHrefExternal={{false}} usage
website/docs/utilities/interactive/partials/code/component-api.md Changes default value from false to true and improves description
website/docs/components/tag/partials/code/component-api.md Removes incorrect default value and standardizes description
website/docs/components/side-nav/partials/code/component-api.md Updates API documentation for multiple side nav components
website/docs/components/link/standalone/partials/code/how-to-use.md Adds explanation for internal link handling
website/docs/components/link/standalone/partials/code/component-api.md Standardizes API documentation
website/docs/components/link/inline/partials/code/how-to-use.md Fixes incorrect boolean value in example from true to false
website/docs/components/link/inline/partials/code/component-api.md Updates API documentation
website/docs/components/dropdown/partials/code/how-to-use.md Reorganizes content and adds consistent external link explanation
website/docs/components/dropdown/partials/code/component-api.md Standardizes API documentation for dropdown components
website/docs/components/button/partials/code/how-to-use.md Improves explanation of external vs internal link behavior
website/docs/components/button/partials/code/component-api.md Updates API documentation
website/docs/components/app-side-nav/partials/code/component-api.md Standardizes API documentation for app side nav components
website/docs/components/app-header/partials/code/component-api.md Updates API documentation
website/docs/components/app-footer/partials/code/component-api.md Standardizes API documentation for footer components
showcase/app/templates/page-components/side-nav.hbs Adds examples for default, external, and internal link variants
showcase/app/templates/page-components/app-side-nav/index.hbs Adds examples for different link variants

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
shleewhite
shleewhite previously approved these changes Jul 16, 2025
annawanggg
annawanggg previously approved these changes Jul 16, 2025
Copy link

@annawanggg annawanggg left a comment

Choose a reason for hiding this comment

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

Looks good to me! The language under "With @href" is a lot clearer now :D

Copy link
Contributor

@heatherlarsen heatherlarsen left a comment

Choose a reason for hiding this comment

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

Nice!

@didoo didoo merged commit 1abedbc into main Jul 17, 2025
16 checks passed
@didoo didoo deleted the documentation-is-href-external-cleanup branch July 17, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-website Content updates to the documentation website showcase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants