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
Selects the default class or the first item in SnapshotClassDropdown #7050
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.
The ListDropdown
is used at several places, are we sure we want to change the behavior for all ?
Moreover, you can use the selectedKey
option to pass a pre selected item.
I agree we can use selectedKey and pass the 0th element of an array if we don't have default classes. |
@cloudbehl @afreen23 Could you guys let me know on how we could use the selectedKey to use the 0th element of an array ? As per my understanding, the selectedKey needs a string value from an item in the array. We don't have the arrays available as a return value for using the first element in the create-volume-snapshot.tsx and passing it as selected key to listdropdown. Hence, i passed a prop from SnapshotClassDropdown to the listdropdown and select whatever is the first value there.
Which is why i introduced a prop, we are only changing the behavior of SnapshotClassDropdown. |
Firstly, Pr without description/jira/BZs are very hard to follow. Thanks! |
@afreen23 Sorry ! forgetting to link the JIRAs i am addressing. We don't want to show "Select volume snapshot class" instead we'd like to already pre-select the default or the first item in the list. |
@afreen23 It was suggested by UX team to pre-select snapshot class from the dropdown as an enhancement. The dropdown contains filtered options, so selecting any key from dropdown should work. |
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.
So why do we want to pre-select a random snapshot class ?
@afreen23 It was suggested by UX team to pre-select snapshot class from the dropdown as an enhancement. The dropdown contains filtered options, so selecting any key from dropdown should work.
@yuvalgalanti ^^
It makes sense to pass the default storage class (if present) as selected from your parent component and let the user choose then any snapshot class.
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
@afreen23 +1 If we are able to choose it by default we should do that. |
897ba60
to
2991683
Compare
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
2991683
to
338949d
Compare
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.
define types for the variable declared
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
65e7871
to
d8ac9f9
Compare
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.
nit
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
d8ac9f9
to
632d30a
Compare
632d30a
to
950e1d5
Compare
/lgtm |
950e1d5
to
e0c1e62
Compare
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
37a3bcc
to
16002eb
Compare
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
...console-app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
16002eb
to
1d1a14f
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a2batic, rawagner, vbnrh 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 |
@vbnrh: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
https://issues.redhat.com/browse/RHSTOR-1345
Signed-off-by: Vineet Badrinath vbadrina@redhat.com