Skip to content

Conversation

@dchyun
Copy link
Contributor

@dchyun dchyun commented Sep 12, 2025

📌 Summary

If merged, this PR would fix an issue with the StepperNav where components used inside its steps are having their z-index not properly respected.

🛠️ Detailed description

Originally an issue was raised in the context of the usage of a modal inside the StepperNav. When the modal was open its overlay did not cover the AppSideNav.

Screenshot 2025-09-12 at 9 44 28 AM

The issue is that the hds-stepper-nav element uses isolation: isolate to properly set styles for the progress bar of the steps. However, step content, such as a modal, is a child of this element, and thus has its stacking context reset when used inside the StepperNav. This causes any z-index styles to not work as expected.

The isolation: isolate is needed for the progress bar styles because the progress bar must have z-index: -1 in order to appear behind the step numbers, but when isolation: isolate is not added the progress bar can appear hidden when a background color is applied behind it because of the -1 z-index.

The solution here was to restructure the StepperNav DOM to have a new element hds-stepper-nav__progress-bar that included all the styling needed for the progress bar. This means the isolation: isolate can be removed from the hds-stepper-nav and no longer gets applied to its step content.

📸 Screenshots

Before
Screenshot 2025-09-12 at 11 05 34 AM

After
Screenshot 2025-09-12 at 11 04 52 AM

🔗 External links

Jira ticket: HDS-5486


👀 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.

@vercel
Copy link

vercel bot commented Sep 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
hds-showcase Ready Ready Preview Sep 12, 2025 3:43pm
hds-website Ready Ready Preview Sep 12, 2025 3:43pm

Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

@dchyun left a few high-level comments; once addressed I can go more in detail

$progress-bar-animation-duration: 0.25s;

.hds-stepper-nav {
.hds-stepper-nav__progress-bar {
Copy link
Contributor

Choose a reason for hiding this comment

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

[praise] neat!

@dchyun
Copy link
Contributor Author

dchyun commented Sep 12, 2025

@didoo Updated to add a new testing example to the stepper nav page and remove the app frame stepper example.

didoo
didoo previously approved these changes Sep 12, 2025
Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

@dchyun I am approving from the code perspective. I'll leave to you to do the testing in the showcase (and potentially in the consumers' codebase, for excess of caution)

@github-actions
Copy link
Contributor

📦 RC Packages Published

Latest commit: d98bd8c

Published 2 packages

@hashicorp/[email protected]

yarn up -C @hashicorp/design-system-components@rc

@hashicorp/[email protected]

yarn up -C @hashicorp/design-system-tokens@rc

class="shw-component-stepper-nav-mock-z-index"
/>
</SG.Item>
</Shw::Grid>
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice example

Copy link
Contributor

@KristinLBradley KristinLBradley left a comment

Choose a reason for hiding this comment

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

Looks great!

@KristinLBradley
Copy link
Contributor

Percy diff looks as I would expect so if it's also as you expect I would approve it to clear the error. @dchyun

@dchyun dchyun removed the release-candidate Publishes release candidates to npm label Sep 12, 2025
@dchyun dchyun merged commit 0854cac into main Sep 12, 2025
16 of 17 checks passed
@dchyun dchyun deleted the dchyun/stepper-nav-isolation-fix branch September 12, 2025 17:24
@hashibot-hds hashibot-hds mentioned this pull request Sep 12, 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.

4 participants