Skip to content
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

refactor: Add new dropdown to non-generic pages #2568

Merged
merged 20 commits into from
Sep 13, 2024

Conversation

EnMod
Copy link
Contributor

@EnMod EnMod commented Sep 11, 2024

πŸ”— Relevant links

πŸ—’οΈ What

This PR follows up #2553 by replacing all existing instances of the old nav dropdown list with the new panel

πŸ› οΈ How

This PR replaces the existing list-like panel in desktop/mobile layouts with the new shared panel. This change affects product pages, /profile/* pages, and the page at /tutorial/library.

πŸ“Έ Design Screenshots

desktop before desktop after
Screenshot 2024-09-11 at 12 19 51 Screenshot 2024-09-11 at 12 19 41

πŸ§ͺ Testing

  • Open the preview link.
  • Hover over the HashiCorp logo in the top-left.
  • Validate that the new nav dropdown panel appears instead of the original nav list, as seen on production.
  • Shrink the browser to mobile width and open the mobile navigation by clicking the hamburger icon in the top-right of the page.
  • Click the "< Main menu" link below the theme selector.
  • Validate that the menu appears the same as the mobile nav dropdown on the homepage.

- Move `left` alignment of dropdowns exclusively into desktop dropdown pane
- Add `NavBarListContainer` to tutorials dropdown wrapping to satisfy Radix
Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
dev-portal βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Sep 13, 2024 8:12pm

@EnMod EnMod changed the title refactor: Add new dropdown to non-generic pages [WIP] refactor: Add new dropdown to non-generic pages Sep 11, 2024
Copy link

github-actions bot commented Sep 11, 2024

πŸ“¦ Next.js Bundle Analysis

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

Seventy-four Pages Changed Size

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

Page Size (compressed) First Load
/[productSlug]/docs 168.52 KB (🟑 +359 B) 376.37 KB
/[productSlug]/integrations 142.33 KB (🟑 +359 B) 350.18 KB
/[productSlug]/integrations/[organizationSlug]/[integrationSlug] 165.54 KB (🟑 +359 B) 373.39 KB
/[productSlug]/integrations/[organizationSlug]/[integrationSlug]/[integrationVersion] 165.54 KB (🟑 +359 B) 373.39 KB
/[productSlug]/integrations/[organizationSlug]/[integrationSlug]/[integrationVersion]/components/[componentType]/[componentSlug] 171.47 KB (🟑 +359 B) 379.32 KB
/[productSlug]/tutorials 141.14 KB (🟑 +359 B) 348.99 KB
/[productSlug]/tutorials/[...tutorialSlug] 219.5 KB (🟑 +359 B) 427.35 KB
/[productSlug]/tutorials/[collectionSlug] 184.15 KB (🟑 +359 B) 392 KB
/boundary 152.7 KB (🟑 +359 B) 360.55 KB
/boundary/api-docs/[[...page]] 169.49 KB (🟑 +359 B) 377.34 KB
/boundary/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/boundary/install 172.55 KB (🟑 +359 B) 380.4 KB
/consul 152.7 KB (🟑 +359 B) 360.55 KB
/consul/api-docs/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/consul/commands/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/consul/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/consul/install 166.49 KB (🟑 +359 B) 374.34 KB
/consul/install/enterprise 166.53 KB (🟑 +359 B) 374.38 KB
/hcp 152.7 KB (🟑 +359 B) 360.55 KB
/hcp/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/nomad 152.7 KB (🟑 +359 B) 360.55 KB
/nomad/api-docs/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/nomad/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/nomad/install 165.97 KB (🟑 +359 B) 373.82 KB
/nomad/install/enterprise 165.95 KB (🟑 +359 B) 373.8 KB
/nomad/intro/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/nomad/plugins/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/nomad/tools/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/packer 152.7 KB (🟑 +359 B) 360.55 KB
/packer/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/packer/guides/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/packer/install 165.94 KB (🟑 +359 B) 373.79 KB
/profile/account 131.7 KB (🟑 +408 B) 339.55 KB
/profile/bookmarks 132.7 KB (🟑 +384 B) 340.55 KB
/sentinel 152.7 KB (🟑 +359 B) 360.55 KB
/sentinel/docs/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/sentinel/install 165.95 KB (🟑 +359 B) 373.8 KB
/sentinel/intro/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/terraform 152.7 KB (🟑 +359 B) 360.55 KB
/terraform/cdktf/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/cli/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/terraform/cloud-docs/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/cloud-docs/agents/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/terraform/enterprise/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/install 165.95 KB (🟑 +359 B) 373.8 KB
/terraform/internals/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/intro/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/terraform/language/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/plugin/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/plugin/framework/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/plugin/log/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/plugin/mux/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/plugin/sdkv2/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/plugin/testing/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/terraform/registry/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/tutorials/library 148.14 KB (🟑 +346 B) 355.99 KB
/vagrant 152.7 KB (🟑 +359 B) 360.55 KB
/vagrant/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/vagrant/install 166.45 KB (🟑 +359 B) 374.3 KB
/vagrant/install/vmware 165.95 KB (🟑 +359 B) 373.8 KB
/vagrant/intro/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/vagrant/vagrant-cloud/[[...page]] 166.54 KB (🟑 +359 B) 374.39 KB
/validated-designs/[...slug] 163.67 KB (🟑 +359 B) 371.52 KB
/vault 152.7 KB (🟑 +359 B) 360.55 KB
/vault/api-docs/[[...page]] 166.53 KB (🟑 +359 B) 374.38 KB
/vault/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/vault/install 165.94 KB (🟑 +359 B) 373.79 KB
/vault/install/enterprise 165.95 KB (🟑 +359 B) 373.8 KB
/waypoint 152.7 KB (🟑 +359 B) 360.55 KB
/waypoint/docs/[...page] 166.53 KB (🟑 +359 B) 374.38 KB
/well-architected-framework 144.83 KB (🟑 +359 B) 352.68 KB
/well-architected-framework/[...tutorialSlug] 186.8 KB (🟑 +359 B) 394.65 KB
/well-architected-framework/[collectionSlug] 133.02 KB (🟑 +359 B) 340.87 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.

@EnMod EnMod changed the title [WIP] refactor: Add new dropdown to non-generic pages refactor: Add new dropdown to non-generic pages Sep 11, 2024
@EnMod EnMod marked this pull request as ready for review September 11, 2024 16:29
@EnMod EnMod marked this pull request as draft September 11, 2024 17:03
Comment on lines +33 to +35
.homepageDropdownPane {
left: -216px;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isolates this adjustment to just the homepage dropdown, instead of having it affect all dropdowns across the site.

return <ul className={s.navList}>{children}</ul>
type NativeDivElement = JSX.IntrinsicElements['div']

export default function SidebarNavList({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allows per-instance control of SidebarNavList styles. Needed for a padding adjustment for product page resources sections here:

https://github.com/hashicorp/dev-portal/pull/2568/files#diff-d30db0cc83998a5512e199bea553a8ac4f3b79ba9240e5736c491b80a32e7a44R33

src/components/sidebar/index.tsx Show resolved Hide resolved
@EnMod EnMod requested review from a team, LeahMarieBush, RubenSandwich and heatlikeheatwave and removed request for a team September 12, 2024 20:09
@EnMod EnMod merged commit 05ff87c into main Sep 13, 2024
9 checks passed
@EnMod EnMod deleted the refactor/add-new-dropdown-to-tutorials-pages branch September 13, 2024 20:19
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.

4 participants