-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
feat: connection name can be edited through UI #12803
Conversation
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.
Looking good so far. Requesting a few minor changes.
Please update the description of the PR to include a screenshot and what the change this PR is making regardless of what the issues says.
airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionForm.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.tsx
Outdated
Show resolved
Hide resolved
@edmundito do you think it makes sense to create a new PR for the last changes that are needed? Or should I continue over this PR? As this PR gives the essential feature and the latter is more of UX changes I think a new PR is good. What say? |
airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionForm.tsx
Outdated
Show resolved
Hide resolved
fa327a2
to
164202b
Compare
@edmundito Made the requested changes
|
Also updated the PR description with the screenshots and a short video |
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.
Code looks good so far, I tested and pointed out some issues I saw (see previous comment). The end to end tests may need to be updated to set and confirm the connection name.
164202b
to
fc32ef1
Compare
@edmundito and @timroes can you review this when you folks get time |
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.
@harshithmullapudi tested the visual changes locally and it looks good. I just added some specific feedback due to gotchas we're learning recently about editing connections. Also, looks like an e2e test is still failing.
airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/components/ConnectionName.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/components/ConnectionName.tsx
Outdated
Show resolved
Hide resolved
prefix: connection.prefix, | ||
}; | ||
|
||
await updateConnection({ |
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.
@timroes Here's a situation that concerns me in that, to update the connection name, we need to dump the entire state of the connection because we cannot request a partial update. If the connection model changes in the future we also have to update this code. I think this is ok as a temporary measure and in an effort to get the work on the PR complete, but it may make sense to request an api call that only updates the connection name.
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.
Yeah this will be helpful either way
- A new API call
- The API takes only which needs to be updated
@edmundito thanks for the feedback. I have made the respective changes for the UI. I think it looks much cleaner now |
@edmundito I also fixed e2e tests. |
I tested the changes and it's looking really good. One more thing I noticed is that I have to click twice to edit the connection name:
Another case - "cancel" editing
|
@edmundito Makes sense. I added a new prop for input called defaultFocus when passed will focus on the input so to avoid this problem and also can help future developments. wdyt? |
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.
Changes look good, but I found one more thing during testing...
airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/components/ConnectionName.tsx
Outdated
Show resolved
Hide resolved
@edmundito do you think it makes sense to have a variable loading for input to add loader prefix/suffix the input component? |
Anyways I have fixed it by adding a state and disabling the input but ideally, maybe we can move back to having a button on the right side and using formik with it. |
2. feat: Added connection name in listing connections page 3. fix: requested changes
d3fa8ad
to
6ae5a08
Compare
* feat: connection name can be edited through UI * fix: changes requested by edmundito * 1. feat: Added connection name edit in connection settings 2. feat: Added connection name in listing connections page 3. fix: requested changes * chore: handle UI and e2e tests * chore: fix e2e tests for webapp * fix: UI margins * fix: webe2e tests * fix: input is not focused when clicked on name * fix: disable input while making API call * feat: added enter/esc functionality to connection name edit
What
closes #4407
Screen.Recording.2022-05-18.at.2.35.16.PM.mp4
Added connection name on the connection listing page
You can give a name to connection while creating one