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: refactor version-alert text #674

Merged
merged 3 commits into from
Aug 2, 2022
Merged

Conversation

thiskevinwang
Copy link
Contributor

@thiskevinwang thiskevinwang commented Aug 2, 2022

This updates the version-alert to use the display value that is returned from the ContentAPI

CleanShot 2022-08-02 at 16 21 16@2x

CleanShot 2022-08-02 at 16 21 45@2x

@vercel
Copy link

vercel bot commented Aug 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-components ✅ Ready (Inspect) Visit Preview Sep 2, 2022 at 8:21PM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Aug 2, 2022

🦋 Changeset detected

Latest commit: b604737

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

@@ -5,25 +5,24 @@ import {
removeVersionFromPath,
} from '../version-select/util'
import s from './style.module.css'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This cuts down some logic in this component, and makes it closer to a purely presentational component


expect(getByTestId('tag')).toHaveTextContent('old version')
expect(getByTestId('text')).toHaveTextContent('Some Text')
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaned up tests due to slimmed down logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is only one thing to test for now — if versionInPath is present, or not.

@thiskevinwang thiskevinwang added the release:canary Triggers a canary release for commits to this pull request label Aug 2, 2022
packages/docs-page/index.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

📦 Canary Packages Published

Latest commit: 2077a09

Published 1 packages

@hashicorp/react-docs-page@17.3.2-canary-20220802201454

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

Co-authored-by: Bryce Kalow <bkalow@hashicorp.com>
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

2 participants