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

index: Add dropdown for picking release #35

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Conversation

FilipZajdel
Copy link
Contributor

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

Copy link

@datenreisender datenreisender left a 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.

site/next.config.js Outdated Show resolved Hide resolved
site/src/app/ReleasesDropDownList.tsx Outdated Show resolved Hide resolved
site/src/app/app.css Outdated Show resolved Hide resolved
@datenreisender
Copy link

Two more comments:

  1. When clicking on “Instructions”, the selected branch is not respected anymore, because it is still fixed there:

    latestRelease?.tag ?? '<latest tag>'
    Is there a plan to also change that?

  2. BTW, that line seems to be wrong. Even though it says latestRelease in the line, it seems to always use the oldest release. Could you maybe also check and fix that (potentially in a different PR)?

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]>
@FilipZajdel FilipZajdel force-pushed the add-release-dropdown branch from 4536b3d to 9880dd7 Compare March 26, 2024 16:49
@bencefr
Copy link

bencefr commented Mar 27, 2024

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]>
datenreisender
datenreisender previously approved these changes Mar 28, 2024
Copy link

@datenreisender datenreisender left a 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.

Copy link

@datenreisender datenreisender left a 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>'

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.

@FilipZajdel FilipZajdel added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit 6460691 Apr 3, 2024
2 checks passed
@FilipZajdel FilipZajdel deleted the add-release-dropdown branch November 13, 2024 12: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