Skip to content

new UX to configure java runtime - #791

Merged
Yan Zhang (Eskibear) merged 12 commits into
mainfrom
webview
Nov 4, 2021
Merged

Yan Zhang (Eskibear) merged 12 commits into
mainfrom
webview

Conversation

@Eskibear

Copy link
Copy Markdown
Member

No description provided.

@Eskibear

Copy link
Copy Markdown
Member Author

image
image

@jdneo Sheng Chen (jdneo) left a comment

Copy link
Copy Markdown
Member

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?

Comment thread src/java-runtime/assets/index.ts Resolved
Comment thread src/java-runtime/index.ts Resolved
Comment thread src/java-runtime/index.ts Resolved

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@jdneo

Sheng Chen (jdneo) commented Oct 25, 2021 •

Copy link
Copy Markdown
Member

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 <[email protected]>
@Eskibear

Copy link
Copy Markdown
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.

@Eskibear

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

Sheng Chen (jdneo) commented Nov 3, 2021 •

Copy link
Copy Markdown
Member

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 <[email protected]>
@Eskibear
Yan Zhang (Eskibear) merged commit 359de03 into main Nov 4, 2021
@Eskibear
Yan Zhang (Eskibear) deleted the webview branch November 4, 2021 02:50
@Eskibear

Copy link
Copy Markdown
Member Author

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