-
Notifications
You must be signed in to change notification settings - Fork 17
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(docs-page): consolidate version-select into docs-page, add projectName prop #650
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
π¦ Changeset detectedLatest commit: 8dc6f59 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve! Thank you for taking on the consolidation that I never did β€οΈ .
Just one concern about the projectName
prop name and the usage with string interpolation.
Curious if you think the ${projectName} Version
string interpolation is potentially limiting to us, in the event that say Design Team wants some copy that doesn't end with " Version"
Regardless, LGTM.
@@ -11,14 +11,20 @@ import { | |||
interface Props { | |||
versions: { label: string; name: string }[] | |||
basePath: string | |||
projectName?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 cents: maybe a label
prop to entirely override the label text is a more flexible prop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I guess the prop needing to be drilled down several levels make that a bit more involved of a change to get right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I had opted for this approach as I didn't feel we needed the full flexibility, but maybe it's not super clear what the prop is actually doing on usage π
Do you have a preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry missed your comment!
Just one concern about the projectName prop name and the usage with string interpolation.
Curious if you think the ${projectName} Version string interpolation is potentially limiting to us, in the event that say Design Team wants some copy that doesn't end with " Version"
I think if design wants something else it would be consistent across projects, in which case it felt better to enforce it in the component than to have to update all usages / implementations.
ποΈ Asana Task
π Preview Link
Description
To support clearly displaying versions for a specific sub-project, adds a
projectName
prop toDocsPage
which will get passed down toVersionSelect
. Also consolidates the source ofreact-version-select
intoreact-docs-page
as we're only using it there.PR Checklist π
Items in this checklist may not may not apply to your PR, but please consider each item carefully.