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

new UX to configure java runtime #791

Merged
merged 12 commits into from
Nov 4, 2021
Merged

new UX to configure java runtime #791

merged 12 commits into from
Nov 4, 2021

Conversation

Eskibear
Copy link
Member

No description provided.

Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
@Eskibear
Copy link
Member Author

image
image

@Eskibear Eskibear requested a review from jdneo October 24, 2021 13:54
Copy link
Member

@jdneo jdneo left a comment

Choose a reason for hiding this comment

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

Don't forget to update the TPN.

And some UI feedback from my personal opinion:

image
The hint icon's position is not aligned with the text, and make it as a button looks strange to me because nothing will happen after clicking it.

image
The size of the drop down list is too small, can we make it the same as the cell's width?

src/java-runtime/assets/index.ts Outdated Show resolved Hide resolved
src/java-runtime/index.ts Outdated Show resolved Hide resolved
src/java-runtime/assets/ToolingJDKPanel.tsx Outdated Show resolved Hide resolved
src/java-runtime/index.ts Show resolved Hide resolved

onClickBrowseJDKButton = () => {
onWillBrowseForJDK();
this.setState({ isDirty: true });
Copy link
Member

Choose a reason for hiding this comment

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

We can do better only set this flag to true when a valid JDK is selected.

Copy link
Member Author

Choose a reason for hiding this comment

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

it's picked from local disk, which is known by extension proccess.

If we want to do that, the workflow would be:

  1. extension validate selected JDK.
  2. extension posts message to webview.
  3. webview update state.

Copy link
Member

Choose a reason for hiding this comment

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

Yes the workflow is exactly what I was thinking when I left the comment

src/java-runtime/assets/ProjectJDKPanel.tsx Outdated Show resolved Hide resolved
@jdneo
Copy link
Member

jdneo commented Oct 25, 2021

Some more feedback:

  1. When reload the window, the runtime page shows an empty table. Considering listening to the event when JDT.LS is ready?
  2. When no Java projects found in workspace, give some hint to users.

Signed-off-by: Yan Zhang <yanzh@microsoft.com>
@Eskibear
Copy link
Member Author

The hint icon's position is not aligned with the text, and make it as a button looks strange to me because nothing will happen after clicking it.

I was using components from webview-toolkit-ui. I'll fine-tune it if I had time.

The size of the drop down list is too small, can we make it the same as the cell's width?

It's on purpose. The content is {version} - {path}, I make it short in order not to show the path part (because that's not important for the moment). Only when you expand the dropdown, you see the path of JDK.

Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
@Eskibear
Copy link
Member Author

Eskibear commented Nov 3, 2021

Now:
image

I'll create a new PR to add Install JDK webview, which looks like below shown aside:
image

hasBuildTool(p) ?
<div className="inline-flex">
<span>{p.sourceLevel}</span>
<Button appearance="icon" onClick={() => this.onClickEdit(p)}><span className="codicon codicon-edit"></span></Button>
Copy link
Member

Choose a reason for hiding this comment

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

We can have a tooltip for this button as well

@jdneo
Copy link
Member

jdneo commented Nov 3, 2021

I tried to open runtime page for petclinic and see this:

image

Seems caused by the JDT.LS not activated, though I don't know why 🤔

Signed-off-by: Yan Zhang <yanzh@microsoft.com>
@Eskibear Eskibear merged commit 359de03 into main Nov 4, 2021
@Eskibear Eskibear deleted the webview branch November 4, 2021 02:50
@Eskibear
Copy link
Member Author

Eskibear commented Nov 4, 2021

futher actions tracked in #798

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.

2 participants