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

feat: remove boundary installer for versions less than 0.18.0 #2678

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

LeahMarieBush
Copy link
Contributor

@LeahMarieBush LeahMarieBush commented Jan 23, 2025

πŸ”— Relevant links

πŸ—’οΈ What

This PR removes the 'Boundary Installer' section on the boundary install page for versions less that 0.18.0

🀷 Why

Boundary versions before 0.18.0 don't work with the installer so the boundary team requested that we remove this section for those versions.

πŸ› οΈ How

I used the useCurrentVersion hook to get the current version and used semver to compare that with version 0.18.0 to see if it was a lesser version. Using that value I conditionally rendered the 'Boundary Installer' section on the page and removed the 'Boundary Installer' section from the sidebar.

In order to use the useCurrentVersion hook, I had to use it in components that are wrapped in the CurrentVersionProvider component. Ideally, I would have liked to put my changes in the src/views/product-downloads-view/boundary/index.tsx file, but since it is not wrapped in the CurrentVersionProvider, I had to add this logic to other components. I'm open to other ideas of how to accomplish this if you have any!

πŸ“Έ Design Screenshots

Screen.Recording.2025-01-23.at.3.29.21.PM.mov

πŸ§ͺ Testing

  1. Go to preview
  2. Make sure version is latest
  3. Scroll down to boundary installer and verify that it is there and in the side bar
  4. Switch to a version less than 0.18.0
  5. Scroll down to where boundary installer used to be and verify that it is not there or in the side bar.

Copy link

vercel bot commented Jan 23, 2025

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 Jan 29, 2025 5:32pm

Copy link

github-actions bot commented Jan 23, 2025

πŸ“¦ Next.js Bundle Analysis

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

Twelve Pages Changed Size

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

Page Size (compressed) First Load
/boundary/install 177.66 KB (🟑 +6.97 KB) 372.34 KB
/consul/install 171.15 KB (🟑 +6.91 KB) 365.83 KB
/consul/install/enterprise 171.18 KB (🟑 +6.9 KB) 365.86 KB
/nomad/install 170.62 KB (🟑 +6.91 KB) 365.31 KB
/nomad/install/enterprise 170.61 KB (🟑 +6.91 KB) 365.29 KB
/packer/install 170.6 KB (🟑 +6.91 KB) 365.28 KB
/sentinel/install 170.6 KB (🟑 +6.91 KB) 365.29 KB
/terraform/install 170.6 KB (🟑 +6.91 KB) 365.29 KB
/vagrant/install 171.11 KB (🟑 +6.91 KB) 365.79 KB
/vagrant/install/vmware 170.61 KB (🟑 +6.91 KB) 365.29 KB
/vault/install 170.6 KB (🟑 +6.91 KB) 365.28 KB
/vault/install/enterprise 170.61 KB (🟑 +6.91 KB) 365.29 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.

@LeahMarieBush
Copy link
Contributor Author

πŸ“¦ Next.js Bundle Analysis

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

Twelve Pages Changed Size

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

Page Size (compressed) First Load
/boundary/install 177.41 KB (🟑 +6.97 KB) 372.06 KB
/consul/install 171.15 KB (🟑 +6.91 KB) 365.79 KB
/consul/install/enterprise 171.18 KB (🟑 +6.9 KB) 365.82 KB
/nomad/install 170.62 KB (🟑 +6.91 KB) 365.27 KB
/nomad/install/enterprise 170.61 KB (🟑 +6.91 KB) 365.25 KB
/packer/install 170.6 KB (🟑 +6.91 KB) 365.25 KB
/sentinel/install 170.6 KB (🟑 +6.91 KB) 365.25 KB
/terraform/install 170.6 KB (🟑 +6.91 KB) 365.25 KB
/vagrant/install 171.11 KB (🟑 +6.91 KB) 365.75 KB
/vagrant/install/vmware 170.61 KB (🟑 +6.91 KB) 365.25 KB
/vault/install 170.6 KB (🟑 +6.91 KB) 365.24 KB
/vault/install/enterprise 170.61 KB (🟑 +6.91 KB) 365.25 KB
Details

I think this increase is due to adding the gt function from semver to compare semantic versions. I looked up other ways to compare these and it looks like this package is pretty standard. I'm open to ideas on how to decrease the bundle size here!

@LeahMarieBush LeahMarieBush marked this pull request as ready for review January 23, 2025 21:34
@LeahMarieBush LeahMarieBush requested review from a team, mikegolus and emilypersson1 and removed request for a team January 23, 2025 21:34
Copy link

@emilypersson1 emilypersson1 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, thank you!

Copy link
Collaborator

@mikegolus mikegolus left a comment

Choose a reason for hiding this comment

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

πŸ‘

@LeahMarieBush LeahMarieBush merged commit 548cb72 into main Jan 29, 2025
9 checks passed
@LeahMarieBush LeahMarieBush deleted the leah/boundary-remove-install branch January 29, 2025 17:36
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.

3 participants