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

Adding advanced connection settings pane to connection dialog #17990

Merged
merged 22 commits into from
Aug 26, 2024

Conversation

Benjin
Copy link
Contributor

@Benjin Benjin commented Aug 23, 2024

Screen.Recording.2024-08-23.093545.mp4

package.json Outdated Show resolved Hide resolved
src/models/contracts/connection.ts Show resolved Hide resolved
<Button
appearance="primary"
disabled={
connectionDialogContext.state.connectionStatus ===
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to self: increase the linewidth for prettier to avoid unnecessary wrapping

@@ -122,11 +129,11 @@ export interface FormComponentOptions {
/**
* Interface for a form event
*/
export interface FormEvent {
export interface FormEvent<T> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pull FormContextProps<T>, FormEvent<T>, and baseclass for ConnectionDialogReducers to Form-dedicated file

@kburtram
Copy link
Member

@Benjin in terms of UX, I was expecting the advanced options to be an additional tab, like Connection String. From the video the UX looks good to me (I'll sync the branch and test it out). Though I'm interested if this "dialog on top of dialog within a document" pattern is what we want to follow across the product. No concerns with this for the initial check-in, but we should do a UX review prior to public preview.

@Benjin
Copy link
Contributor Author

Benjin commented Aug 23, 2024

@kburtram Agreed that we should have Janki look at this before we go to public preview. I put it as a drawer in the same tab (for now) for two reasons:

  1. the two existing tabs - "Parameters" and "Connection String" - operate independently instead of converting between connection string form and per-property form of the same connection details. I think the tabs should have consistent behavior (all tabs reflect properties/connection string of the same connection, or each tab operates independently), but don't have a preference as to which. Something to chat with Janki about.

  2. The ADS connection dialog throws a pane over the main options, so this matches that. Just inspiration, though; not that we should be just copying ADS UX at every turn.

Copy link

github-actions bot commented Aug 23, 2024

VSIX Size Comparison

  • Main branch VSIX size: 11256 KB
  • PR branch VSIX size: 11264 KB
  • Size difference: 8 KB (0%)

React Webview Bundle Size Comparison

  • Main branch bundle size: 856 KB
  • PR branch bundle size: 872 KB
  • Size difference: 16 KB (1%)

@croblesm
Copy link
Contributor

Hi @Benjin,

This looks promising, however I have some feedback:

  • Change the Parameter vs Connection string option. Use a radio button for this option, and make Parameter the default and first option.
  • Change the Advanced and Connect button positioning, I would suggest putting them side by side.
  • Reorder the Advanced options, show the most common (General) options first
  • Test connection button is missing, but I'm not sure if you have that functionality ready in your backend
  • Cancel button is missing

This is a concept design from Janki:
image

Copy link
Member

@kburtram kburtram left a comment

Choose a reason for hiding this comment

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

I made it through about half the code. Will take a look at the rest later today & will build/test the branch. Please work with @aasimkhan30 to get a sign-off since he is most familiar with some of the code you're updating.

src/connectionconfig/connectionDialogWebViewController.ts Outdated Show resolved Hide resolved
src/connectionconfig/connectionDialogWebViewController.ts Outdated Show resolved Hide resolved
});

// add missing validation functions for generated components
components.get('server')!.component.validate = (value: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

it seems like this validation logic could be wired up more automatically using the "required" metadata property? Since there's only a few properties I'm not sure it's worth refactoring though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely something worth looking into as the generic form structure gets refined. It might need more prodding to correctly handle fields that are "conditionally required", like username, which is required, but only if auth is set to SqlLogin. Lemme see what I can do.

src/reactviews/common/forms/formUtils.tsx Outdated Show resolved Hide resolved
@kburtram
Copy link
Member

@Benjin makes sense on the design rationale. I think this UI looks good to me; it just wasn't what I was expecting. I'm interested in using these first UIs as an opportunity to establish UX patterns to copy in other features and this seems like a good 'test case.' Though I'd definitely put this feedback in the "open a follow-up task to do in a separate PR" so that we can get this core functionality into next release.

@aasimkhan30
Copy link
Contributor

aasimkhan30 commented Aug 23, 2024

Having a drawer over the recent connections feels a bit awkward since the recent connections already resemble a drawer. Initially, I considered using toggle buttons for the parameters and connection string, along with tabs for the basic and advanced fields.

Example of toggle button
image

Unfortunately, fluent doesn't support this ui component

@Benjin
Copy link
Contributor Author

Benjin commented Aug 24, 2024

Having a drawer over the recent connections feels a bit awkward since the recent connections already resemble a drawer. Initially, I considered using toggle buttons for the parameters and connection string, along with tabs for the basic and advanced fields. Unfortunately, fluent doesn't support this ui component

@aasimkhan30 and I chatted offline, and I'll raise his ideas + concerns with Janki when we meet on Monday to iron out the differences between the mockups and what VSCode webviews can do.

@Benjin Benjin merged commit 3dc342e into main Aug 26, 2024
7 checks passed
@Benjin Benjin deleted the dev/benjin/refactorConnection branch August 26, 2024 20:23
@croblesm croblesm self-assigned this Aug 27, 2024
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.

4 participants