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

fix(docs-page): TFE version stripping #639

Merged
merged 3 commits into from
Jul 6, 2022

Conversation

thiskevinwang
Copy link
Contributor

@thiskevinwang thiskevinwang commented Jul 6, 2022

🎟️ Asana Task
πŸ” Preview Link


Description

This fixes a case where a TFE version that is expected to be in the URL was being accidentally removed.

PR Checklist πŸš€

Items in this checklist may not may not apply to your PR, but please consider each item carefully.

  • Add Asana and Preview links above.
  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Conduct reasonable cross browser testing for both compatibility and responsive behavior (We have a Sauce Labs account for this, if you don't have access, just ask!).
  • Conduct reasonable accessibility review (use the WAS as a guide or an axe browser plugin until we establish more formal checks).
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@changeset-bot
Copy link

changeset-bot bot commented Jul 6, 2022

πŸ¦‹ Changeset detected

Latest commit: b3e105a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hashicorp/react-docs-page Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 6, 2022

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

Name Status Preview Updated
react-components βœ… Ready (Inspect) Visit Preview Jul 6, 2022 at 3:35PM (UTC)

@thiskevinwang thiskevinwang added the release:canary Triggers a canary release for commits to this pull request label Jul 6, 2022
})

it('should strip a TFE version string', () => {
const [version, params] = stripVersionFromPathParams([
'enterprise',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this because it was an inaccurate input.

Given

  • /enterprise/[[...page]].tsx

Then

  • enterprise will never be first in the ctx.params.page list, unless the path is /enterprise/enterprise

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2022

πŸ“¦ Canary Packages Published

Latest commit: b3e105a

Published 1 packages

@hashicorp/react-docs-page@17.1.2-canary-20220706153646

npm install @hashicorp/react-docs-page@canary

@thiskevinwang thiskevinwang marked this pull request as ready for review July 6, 2022 15:41
@thiskevinwang thiskevinwang changed the title fix: TFE version stripping fix(docs-page): TFE version stripping Jul 6, 2022
@thiskevinwang
Copy link
Contributor Author

Testing via hashicorp/terraform-website#2370

@thiskevinwang
Copy link
Contributor Author

Going to merge this!

@thiskevinwang thiskevinwang merged commit c8c945f into main Jul 6, 2022
@thiskevinwang thiskevinwang deleted the kevin/fix-tfe-version-strip branch July 6, 2022 15:53
@hashibot-web hashibot-web mentioned this pull request Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:canary Triggers a canary release for commits to this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant