Skip to content

Fix disable delete and drag button on empty name value pair editor - #2263

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
gijohn:fix-name-value-delete
Oct 16, 2019
Merged

Fix disable delete and drag button on empty name value pair editor#2263
openshift-merge-robot merged 1 commit into
openshift:masterfrom
gijohn:fix-name-value-delete

Conversation

@gijohn

@gijohn gijohn commented Aug 5, 2019

Copy link
Copy Markdown
Contributor

@openshift-ci-robot openshift-ci-robot added component/core Related to console core functionality size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 5, 2019
@gijohn

gijohn commented Aug 5, 2019

Copy link
Copy Markdown
Contributor Author

/kind bug
/assign @spadgett @christianvogt

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 5, 2019
@gijohn

gijohn commented Aug 5, 2019

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@gijohn

gijohn commented Aug 6, 2019

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2019
@gijohn
gijohn force-pushed the fix-name-value-delete branch from 092a18d to 125fca5 Compare August 12, 2019 06:42
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2019
@gijohn
gijohn force-pushed the fix-name-value-delete branch from 125fca5 to 9a8d5d3 Compare August 12, 2019 06:52
@gijohn

gijohn commented Aug 12, 2019

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@gijohn

gijohn commented Aug 12, 2019

Copy link
Copy Markdown
Contributor Author

/assign @joshuawilson @rohitkrai03

@joshuawilson

Copy link
Copy Markdown
Contributor

@gijohn this is outside of dev console, only Christian can approve it or someone on the admin/core team can.

@joshuawilson

Copy link
Copy Markdown
Contributor

/unassign rohitkrai03

@joshuawilson

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2019
@joshuawilson

Copy link
Copy Markdown
Contributor

@spadgett This appears to work correctly for where we need it but I don't know where core is using it and if there could be any negative impacts. Can you please have someone from your side review.

@spadgett

Copy link
Copy Markdown
Member

Stepping back, I think there's a bit of a divide on handling forms, buttons, and validation between admin console and dev console.

  • admin console: leave buttons enabled always, use native browser support for required fields, rely on server for validation
  • dev console: disable buttons until form is valid, validate client-side as much as possible before submitting form

I worry that we've lost some consistency in the user experience across console. It becomes more apparent in shared components like this. The existing behavior is more in line with admin console forms and working as intended. The new behavior is more in line with dev console forms. The admin console behavior is largely a holdover from Tectonic console, which took this philosophy. I didn't like the admin console form behavior at first, but having used it for a while, I've come around. It works well!

In 3.x, we performed extensive client-side validation. We ran into a number of bugs around this, either because

  1. We had incorrect assumptions / validation logic in the client implementation, or
  2. The API changed sometime after the initial console feature was implemented, which caused bugs in later releases.

(2) is hard to avoid no matter how careful you are with the initial implementation. Some of these bugs blocked users from making changes they should be able to make. There was at least one case where we lost data in the route editor because of an API change to routes.

I was happy when we started to let the server do validation, since it avoided having to reimplement complicated server validation logic on the client and seemed more sustainable in the face of future API changes.

I realize this is a small change and a long comment. But I guess my point is the current behavior is more in line with the existing admin console forms. I feel like we should step back and decide what experience we want for forms. Maybe it's OK to have different approaches in different perspectives, but all else being equal, I'd think we'd want consistency.

I'm hesitant to go back to too much client-side field validation. Regular expressions like #2373 scare me :) I'd really prefer to use server dry-run for validation when possible. An easy win might be to align on when we disable buttons, though, for required fields and simple checks.

cc @openshift/team-ux-review

@spadgett

Copy link
Copy Markdown
Member

Can we target 4.3? This is a minor bug, and the current behavior doesn't have any bad effects.

We definitely want to fix #2243 in 4.2, though.

@spadgett

Copy link
Copy Markdown
Member

If we make this change here, we should update list-input.tsx minimally which has the same remove button behavior. There are probably some other similar places.

@joshuawilson

Copy link
Copy Markdown
Contributor

@christianvogt please take a look.

@christianvogt

Copy link
Copy Markdown
Contributor

@spadgett I agree with what you're saying about duplicate validation logic and letting the server validate what it can. At the same time, simple validation client side can be helpful as long as it's 100% correct. #2373 is bothersome and will be addressed.

@christianvogt

Copy link
Copy Markdown
Contributor

@gijohn, it was mentioned that the list-input should also be updated to be consistent with this UX experience change request.

@gijohn
gijohn force-pushed the fix-name-value-delete branch from 9a8d5d3 to 04d8592 Compare August 28, 2019 08:54
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2019
@gijohn

gijohn commented Aug 28, 2019

Copy link
Copy Markdown
Contributor Author

@christianvogt, I have made the requested changed.

@gijohn
gijohn force-pushed the fix-name-value-delete branch from 04d8592 to 41cc7e6 Compare October 1, 2019 06:50
@christianvogt

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2019
@gijohn
gijohn force-pushed the fix-name-value-delete branch from 41cc7e6 to fe9a21b Compare October 15, 2019 14:06
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Oct 15, 2019
@gijohn

gijohn commented Oct 15, 2019

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-console

1 similar comment
@gijohn

gijohn commented Oct 15, 2019

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-console

@gijohn

gijohn commented Oct 16, 2019

Copy link
Copy Markdown
Contributor Author

/retest

@christianvogt christianvogt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 16, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, gijohn, joshuawilson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot
openshift-merge-robot merged commit a1b91bf into openshift:master Oct 16, 2019
@spadgett spadgett added this to the v4.3 milestone Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants