Skip to content

Conversation

Younique98
Copy link
Contributor

@Younique98 Younique98 commented Oct 1, 2025

πŸ”— Relevant links
Preview link πŸ”Ž
Asana task 🎟️

πŸ—’οΈ What
Updated SandboxDropdown to use project theme conventions for light mode styling.
Ensured intro box and sandbox cards have a light background in light mode when hovering on card.
Refactored click behavior for sandbox cards to reliably launch all products, including Consul.
Unified embed logic and improved lab matching for Consul sandboxes.
Improved visual consistency and accessibility of dropdown and cards.

🀷 Why
Needed to fix inconsistent theme styling and hover states in the dropdown.
Consul sandboxes were not launching reliably from the dropdown due to labId/instruqtTrack mismatches.
Ensured all products launch correctly and the dropdown is visually consistent.

πŸ› οΈ How
Used useTheme and .theme-light class for theme detection.
Updated CSS to use project tokens and .theme-light selectors.
Refactored click handler and lab matching logic in both dropdown and instruqt-lab context.
Compared previous and current logic to ensure robust, unified behavior.

πŸ“Έ Design Screenshots
Screenshot 2025-10-02 at 9 04 05β€―AM

Screen.Recording.2025-10-01.at.3.12.57.PM.mov
Screenshot 2025-10-01 at 12 19 55β€―PM Screenshot 2025-10-01 at 2 01 21β€―AM Screenshot 2025-10-01 at 2 06 27β€―AM

πŸ§ͺ Testing
Open the SandboxDropdown in light and dark mode; verify correct background styling.
Click sandbox cards for all products, including Consul; verify correct sandbox launches.
Confirm accessibility and keyboard navigation.
Review dropdown visual consistency and hover states.

Updates sandbox card styles to ensure responsiveness across various screen sizes.

Ensures cards take up full available width and height, and introduces a flex container for better layout.

Addresses issues with card sizing and overflow on smaller screens.
Improves the sandbox dropdown by displaying relevant product information and providing a direct navigation link to the corresponding sandbox page.

This change ensures that users can easily access and understand the available sandboxes for the current product, whether they are already on the sandbox page or navigating from elsewhere.
Removes inline styles from the sandbox dropdown component
and applies CSS classes instead. This improves code
readability and maintainability by centralizing styles in
the CSS module.
Enhances the visual styling of the sandbox dropdown menu to
provide a better user experience when the light theme is enabled.

This includes adjusting background colors and hover states to
ensure proper contrast and readability in the light theme. Adds
a visual distinction for intro sandbox items and product sandbox
list items on hover, improving visual consistency.
Updates lab ID validation to handle query parameters and track names.

This ensures that labs are correctly identified and activated even when the ID contains additional information.
@Younique98 Younique98 requested a review from a team as a code owner October 1, 2025 06:29
Copy link

vercel bot commented Oct 1, 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 2, 2025 1:19pm

@Younique98 Younique98 changed the base branch from main to et/sandbox-feature-release October 1, 2025 06:30
@Younique98 Younique98 changed the title feat: Improve SandboxDropdown theme styling and Consul sandbox launch reliability feat: Improve SandboxDropdown theme styling and implement dropdown redesign and Consul sandbox launch reliability Oct 1, 2025
Copy link

github-actions bot commented Oct 1, 2025

πŸ“¦ Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action πŸ€–

Ninety-eight Pages Changed Size

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

Page Size (compressed) First Load
/ 135.71 KB (🟑 +382 B) 436.02 KB
/404 115.97 KB (🟑 +382 B) 416.28 KB
/500 115.97 KB (🟑 +382 B) 416.28 KB
/[productSlug]/docs 188.15 KB (🟑 +382 B) 488.46 KB
/[productSlug]/integrations 146.77 KB (🟑 +382 B) 447.08 KB
/[productSlug]/integrations/[organizationSlug]/[integrationSlug] 170.72 KB (🟑 +382 B) 471.03 KB
/[productSlug]/integrations/[organizationSlug]/[integrationSlug]/[integrationVersion] 170.72 KB (🟑 +382 B) 471.03 KB
/[productSlug]/integrations/[organizationSlug]/[integrationSlug]/[integrationVersion]/components/[componentType]/[componentSlug] 180.41 KB (🟑 +382 B) 480.72 KB
/[productSlug]/sandbox 179.7 KB (🟑 +382 B) 480.01 KB
/[productSlug]/tutorials 150.15 KB (🟑 +382 B) 450.45 KB
/[productSlug]/tutorials/[...tutorialSlug] 231.67 KB (🟑 +382 B) 531.98 KB
/[productSlug]/tutorials/[collectionSlug] 197.15 KB (🟑 +382 B) 497.46 KB
/_error 116 KB (🟑 +382 B) 416.31 KB
/boundary 160.32 KB (🟑 +385 B) 460.63 KB
/boundary/api-docs/[[...page]] 162.66 KB (🟑 +382 B) 462.97 KB
/boundary/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/boundary/install 179.49 KB (🟑 +385 B) 479.8 KB
/certifications 177.03 KB (🟑 +382 B) 477.33 KB
/certifications/[slug] 177.68 KB (🟑 +382 B) 477.99 KB
/certifications/signin 176.93 KB (🟑 +382 B) 477.24 KB
/consul 160.32 KB (🟑 +385 B) 460.63 KB
/consul/api-docs/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/consul/commands/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/consul/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/consul/install 172.97 KB (🟑 +385 B) 473.28 KB
/consul/install/enterprise 173.01 KB (🟑 +385 B) 473.32 KB
/hcp 160.32 KB (🟑 +385 B) 460.63 KB
/hcp/api-docs/consul/[[...page]] 160.12 KB (🟑 +382 B) 460.43 KB
/hcp/api-docs/hvn/[[...page]] 160.11 KB (🟑 +382 B) 460.42 KB
/hcp/api-docs/identity/[[...page]] 160.12 KB (🟑 +382 B) 460.42 KB
/hcp/api-docs/operations/[[...page]] 160.12 KB (🟑 +382 B) 460.43 KB
/hcp/api-docs/packer/[[...page]] 160.12 KB (🟑 +382 B) 460.42 KB
/hcp/api-docs/rbac/[[...page]] 160.12 KB (🟑 +382 B) 460.42 KB
/hcp/api-docs/vagrant-box-registry/[[...page]] 160.13 KB (🟑 +382 B) 460.44 KB
/hcp/api-docs/vault-secrets/[[...page]] 158.42 KB (🟑 +382 B) 458.73 KB
/hcp/api-docs/waypoint/[[...page]] 160.12 KB (🟑 +382 B) 460.43 KB
/hcp/api-docs/webhook/[[...page]] 160.12 KB (🟑 +382 B) 460.43 KB
/hcp/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/nomad 160.32 KB (🟑 +385 B) 460.63 KB
/nomad/api-docs/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/nomad/commands/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/nomad/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/nomad/install 172.45 KB (🟑 +385 B) 472.76 KB
/nomad/install/enterprise 172.44 KB (🟑 +385 B) 472.75 KB
/nomad/plugins/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/nomad/tools/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/open-api-docs-preview 164.21 KB (🟑 +382 B) 464.51 KB
/open-api-docs-preview-v2/[[...page]] 163.01 KB (🟑 +382 B) 463.32 KB
/packer 160.32 KB (🟑 +385 B) 460.63 KB
/packer/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/packer/guides/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/packer/install 172.43 KB (🟑 +385 B) 472.74 KB
/profile/account 136.19 KB (🟑 +382 B) 436.5 KB
/profile/bookmarks 137.21 KB (🟑 +382 B) 437.52 KB
/sentinel 160.32 KB (🟑 +385 B) 460.63 KB
/sentinel/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/sentinel/install 172.43 KB (🟑 +385 B) 472.74 KB
/terraform 160.32 KB (🟑 +385 B) 460.63 KB
/terraform/cdktf/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/cli/[[...page]] 182.37 KB (🟑 +382 B) 482.67 KB
/terraform/cloud-docs/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/cloud-docs/agents/[[...page]] 182.38 KB (🟑 +382 B) 482.68 KB
/terraform/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/terraform/enterprise/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/install 172.43 KB (🟑 +385 B) 472.74 KB
/terraform/internals/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/intro/[[...page]] 182.37 KB (🟑 +382 B) 482.67 KB
/terraform/language/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/migrate/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/plugin/[[...page]] 182.37 KB (🟑 +382 B) 482.67 KB
/terraform/plugin/framework/[[...page]] 182.38 KB (🟑 +382 B) 482.68 KB
/terraform/plugin/log/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/plugin/mux/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/plugin/sdkv2/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/plugin/testing/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/terraform/registry/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/tutorials 127.39 KB (🟑 +382 B) 427.7 KB
/tutorials/library 149.01 KB (🟑 +382 B) 449.32 KB
/vagrant 160.32 KB (🟑 +385 B) 460.63 KB
/vagrant/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/vagrant/install 172.94 KB (🟑 +385 B) 473.25 KB
/vagrant/install/vmware 172.44 KB (🟑 +385 B) 472.74 KB
/vagrant/intro/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/vagrant/vagrant-cloud/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/validated-designs 122.49 KB (🟑 +382 B) 422.8 KB
/validated-designs/[...slug] 177.66 KB (🟑 +382 B) 477.97 KB
/validated-patterns 152.93 KB (🟑 +382 B) 453.24 KB
/validated-patterns/[...tutorialSlug] 191.43 KB (🟑 +382 B) 491.74 KB
/validated-patterns/[collectionSlug] 137.52 KB (🟑 +382 B) 437.83 KB
/vault 160.32 KB (🟑 +385 B) 460.63 KB
/vault/api-docs/[[...page]] 182.37 KB (🟑 +382 B) 482.68 KB
/vault/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/vault/install 172.43 KB (🟑 +385 B) 472.73 KB
/vault/install/enterprise 172.44 KB (🟑 +385 B) 472.74 KB
/waypoint 160.32 KB (🟑 +385 B) 460.63 KB
/waypoint/docs/[...page] 182.36 KB (🟑 +382 B) 482.67 KB
/well-architected-framework 175.58 KB (🟑 +382 B) 475.89 KB
/well-architected-framework/[...page] 182.38 KB (🟑 +382 B) 482.68 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.

Updates the sandbox dropdown tests to match the actual rendered text in the UI.

Also, fixes an issue where `isOnSandboxPage` was not correctly evaluating to false when expected.
Makes the sandbox dropdown item a button instead of a div
to improve accessibility and keyboard navigation.

Removes conditional rendering based on the current page.
The sandbox page is now always rendered as a link.
@Younique98 Younique98 requested review from a team and LeahMarieBush and removed request for a team October 1, 2025 16:12
Updates the sandbox dropdown button style to improve the user interface.

It changes the button's appearance by adding a background color and a border, enhancing its visibility and making it more visually appealing.
Removes redundant comments in tests that do not add significant
value or context, leading to cleaner and more readable test files.
Simplifies the logic for determining if the user is currently on a sandbox page.

The previous check included unnecessary conditional logic that has been removed for a more concise and readable expression.
Copy link
Contributor

@LeahMarieBush LeahMarieBush left a comment

Choose a reason for hiding this comment

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

Code looks good and functionality is working well! I noticed a few small design tweaks that need to get fixed:

Dark mode has the incorrect background color for the first item when it is not in a hover state. Light mode does not have this issue
Screenshot 2025-10-01 at 11 39 52β€―AM

The spacing between the designs and the preview link is a bit different. The preview link has a bit more spacing and room on the left side compared to the design screenshot

Preview:
Screenshot 2025-10-01 at 11 40 19β€―AM

Design:
image (2)

@Younique98
Copy link
Contributor Author

@LeahMarieBush I think ijust had messed up the color lol call myself fixing one thing and broke it lol

Improves the visual appearance of the sandbox dropdown by adjusting padding and margins for better spacing.

Adds dynamic styling to the intro sandbox items based on the current theme, ensuring appropriate background colors and borders for both light and dark themes.

This change enhances the user experience by providing a more visually appealing and consistent interface.
Copy link
Contributor

@LeahMarieBush LeahMarieBush left a comment

Choose a reason for hiding this comment

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

The dark mode issue looks great now! Thanks for fixing that.

There's just two spots I think the padding could be updated. I think there should be a bit more padding around the boxes (dropdownContainerInner) and less vertical padding inside the top item in the dropdown. Once those are fixed, I think this will match the designs and be good to go!
Screenshot 2025-10-01 at 2 27 57β€―PM

Improves the visual appearance of the sandbox dropdown by adjusting padding and spacing.

This change aims to provide a more balanced and visually appealing layout within the dropdown. It adjusts padding in several areas including the dropdown container, and link items.
Copy link
Contributor

@LeahMarieBush LeahMarieBush 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! Nice job

@Younique98 Younique98 merged commit b5e1486 into et/sandbox-feature-release Oct 2, 2025
9 checks passed
@Younique98 Younique98 deleted the et/implement-redesigned-dropdown branch October 2, 2025 13:30
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