Skip to content

Conversation

@Younique98
Copy link
Contributor

@Younique98 Younique98 commented Oct 28, 2025

Adds error handling and graceful loading states to the tutorial view sidebar component.

This prevents crashes and improves the user experience when data is loading or missing, and during rapid navigation changes. It achieves this by wrapping the component in an ErrorBoundary and ensuring the CollectionProgress component always renders its container, which prevents layout shifts.

🔗 Relevant links

🗒️ What

🤷 Why

🛠️ How

📸 Design Screenshots

Screen.Recording.2025-10-28.at.12.13.30.PM.mov

🧪 Testing

New tests have been written.

To test:
Go to this page:
https://developer.hashicorp.com/vault/tutorials/secrets-management/azure-secrets
From that page, click on the left nav link “Vault as a KIMP server” the browser displays this error:
Something went wrong.

💭 Anything else?

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@vercel
Copy link

vercel bot commented Oct 28, 2025

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

Project Deployment Preview Comments Updated (UTC)
dev-portal Ready Ready Preview Comment Oct 29, 2025 0:55am

@github-actions
Copy link

github-actions bot commented Oct 28, 2025

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/[productSlug]/tutorials 150.97 KB (🟡 +543 B) 480.39 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Adds error handling and graceful loading states to the tutorial view sidebar component.

This prevents crashes and improves the user experience when data is loading or missing, and during rapid navigation changes.
It achieves this by wrapping the component in an ErrorBoundary and ensuring the CollectionProgress component always renders its container, which prevents layout shifts.
Refactors the collection progress component to streamline data fetching and rendering logic.

Removes an unnecessary condition that always rendered the container, simplifying the component's structure.
@Younique98 Younique98 requested review from a team and williamdalessandro and removed request for a team October 29, 2025 12:17
@Younique98 Younique98 force-pushed the et/fix-sidebar-navigation branch from 6c0dded to 2d443aa Compare October 29, 2025 12:48
@williamdalessandro
Copy link
Contributor

williamdalessandro commented Oct 29, 2025

Great job on this @Younique98 ! Just added in some questions but this looks good to merge otherwise

@Younique98 Younique98 merged commit e827137 into main Oct 29, 2025
12 checks passed
@Younique98 Younique98 deleted the et/fix-sidebar-navigation branch October 29, 2025 16:02
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.

2 participants