-
Notifications
You must be signed in to change notification settings - Fork 177
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
Update 'Resource name' fields to meet UX guidelines: Cluster storage #3483
Update 'Resource name' fields to meet UX guidelines: Cluster storage #3483
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3483 +/- ##
==========================================
- Coverage 85.56% 85.54% -0.03%
==========================================
Files 1342 1342
Lines 31003 31016 +13
Branches 8663 8675 +12
==========================================
+ Hits 26529 26532 +3
- Misses 4474 4484 +10
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
6fdbc3e
to
a29b4cf
Compare
a29b4cf
to
82f24d4
Compare
const existingState = React.useMemo( | ||
() => ({ | ||
name: existingName, | ||
k8sName: existingK8sName, | ||
description: existingDescription, | ||
size: existingSize, | ||
storageClassName: existingStorageClassName, | ||
}), | ||
[existingName, existingK8sName, existingDescription, existingSize, existingStorageClassName], |
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.
Using a memo here has no value because it is simply used as the default in useGenericObjectState
and then saved a ref internally.
@jeff-phillips-18 cannot unset description |
@christianvogt Can't unset the description before this PR either. I'll fix it. |
0270ffd
to
45c3834
Compare
@jeff-phillips-18 Seems to work fine. The one quirk with the new implementation is that after creating a new storage in the workbench form, it's not possible to edit the resource name even though the resource hasn't yet been created. Previously, editing the name would result in a new generated resource name. |
if (!data.description && pvcResource.metadata.annotations?.['openshift.io/description']) { | ||
pvcResource.metadata.annotations['openshift.io/description'] = undefined; | ||
} |
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.
A test is a failing I suspect because it's looking for an empty description.
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.
Fixed
45c3834
to
361f1c5
Compare
@christianvogt Fixed. |
361f1c5
to
22a250d
Compare
22a250d
to
e305f08
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes RHOAIENG-14746
Description
Updates create/edit cluster storage modals to use
K8sNameDescriptionField
component in order to meet current UX guidelines.Screen shots
Create cluster storage
Create cluster storage - edit resource name
Edit cluster storage
How Has This Been Tested?
Navigate to a project and go to the Cluster storage tab
Add cluster storage
Add storage
button is enabledEdit resource name
link.Add storage
button is disabledAdd storage
button is enabledNavigate to a project and go to the Cluster storage tab
Edit storage
Navigate to a project and go to the Workbenches tab
Create workbench
Create workbench
button is enabledCreate storage
buttonCreate
button is enabledEdit resource name
link.Create
button is disabledCreate
button is enabledTest Impact
Updated unit tests for new fields
Request review criteria:
/cc @simrandhaliw