-
Notifications
You must be signed in to change notification settings - Fork 6
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
index: Add dropdown for picking release #35
Conversation
c579b5f
to
4536b3d
Compare
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 probably wouldn‘t have introduced a new VSCodeQueryParams
class, created and stored instances of that in AppBlock
in a state, and changed VSCodeButton
to take those.
Instead you could have stored only the selected branch in a state, passed that (additionally to the app) to VSCodeButton
and left the code to create a search string there. But if you want to keep those changes as they are, that is also fine for me.
But please take a look at the other comments.
Two more comments:
|
It allows the user to choose the extensions's release. Pushing the VSCode button will redirect to a url that has that particular release. Signed-off-by: Filip Zajdel <[email protected]>
4536b3d
to
9880dd7
Compare
The dropdown listing the releases shows "main" and "ncs-example-app v2.6.0"... Shouldn't that only be "v2.6.0"? The name before the tag is not just noise, but it doesn't fit and the important bit is not visible in the input component. |
Compose the dropdown from the releases tags instead of names. Remove `dropdown` css class. Signed-off-by: Filip Zajdel <[email protected]>
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.
That the currently selected value is not in the select list (because you use hideSelectedOptions={true}
) confused me a bit, but if you want to do it like that, it is fine by me.
BTW, in JSX you can also simplify hideSelectedOptions={true}
to just be hideSelectedOptions
, in the same way as boolean attributes work in HTML.
Signed-off-by: Filip Zajdel <[email protected]>
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.
Good work!
@@ -44,7 +44,7 @@ function InstructionsDialog({ app, close }: Props): JSX.Element { | |||
|
|||
<CodeBlock | |||
text={`west init -m "${app.repo}" --mr ${ | |||
latestRelease?.tag ?? '<latest tag>' | |||
latestRelease ?? '<latest tag>' |
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.
With the changed assignment above latestRelease
will always be defined, so the ?? '<latest tag>'
could be removed here. But it is also ok if you want to keep it as an additional safety measure.
It allows the user to choose the extensions's release. Pushing the VSCode button will redirect to a url that has that particular release.
Screencast from 22. mars 2024 kl. 15.30 +0100.webm