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
Redesign delete/remove dialog #652
Redesign delete/remove dialog #652
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.
I won't manage to review this PR. Just from the screen shots, I noticed that the modal titles don't follow the PF guidelines. In specfiic, Confirmation modals, need to have titles with a question.
For example;
https://www.patternfly.org/v4/components/modal/design-guidelines/#confirmation-dialogs
Then maybe just rewording those titles should be enough: |
I've mentioned our headlines not conforming to PF titles before (regarding the "?"), but we never did it as it was a one-off and inconsistent with the rest of Cockpit. As this is one of those PRs with sweeping changes, it makes sense to switch the titles to questions wherever it makes sense. 👍 If we're making these changes, we might want to also consider adding an icon for destruction too: https://www.patternfly.org/v4/components/modal/design-guidelines/#confirm-a-destructive-action
They're optional... But it seems to strongly suggest them above under certain destructive circumstances. https://www.patternfly.org/v4/components/modal/design-guidelines/#icon-use-in-modal-dialogs:
(But this could easily go in another PR.) |
Should that dialog have some sort of solution within the dialog itself? That is, list the VMs it's in use by and perhaps have a way to detach them from the individual VMs from within the dialog? (This probably should be addressed in an separate PR; keep this PR mainly related to reworking the modals as-is without really adding features — except for showing more information.) |
What happens with errors? Are they inline alerts? Are those at the bottom or top? (If inline alerts, they should be at the top, like what cockpit-project/cockpit#17221 is now doing.) I know that Machines does do a lot of error handling as alerts in the page, after a modal though, so perhaps it doesn't even need to be addressed. 😁 |
a1053e4
to
489caa3
Compare
Done
Done
Yeah. This functionality would be way more complex, so I would leave it outside of this PR.
They were inline errors at the footer of modal in all the cases, except for disk removal, where there were alerts in page (but that was accidental, I tracked it down to my old PR where I forgot to replace page alert there with an inline modal alert, so there was no real motivation for it to be in-page alert. So now I made it consistent, all the delete/remove dialogs now use inline alerts, and fixed them to show alert at the top of the modal: |
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.
it makes sense to switch the titles to questions wherever it makes sense. +1
Done
If we're making these changes, we might want to also consider adding an icon for destruction too
Done
Nice! Thanks!
Anything we can do about this error message?
- We should never use the title "Failure". It should be specific to the error type.
- What happened to the space between the alert and the rest of the modal content? (There is none here; there should be some.)
- A CD is not a "disk". A CD is a "disc". (It's a "disc" with a C if it's a circle you can see.)
- Should "target" really be "device"?
For example. GNOME Disks labels the it as a "device":
...
Yeah. This functionality would be way more complex, so I would leave it outside of this PR.
Did you add the checkbox's label here? It shouldn't have that duplicate bold label to the left... It's a single opt-in checkbox. It also shouldn't have "the": "Delete volumes inside this pool". Additionally, the whole "c..." thing is odd. But I understand that part will be handled in a follow-up.
ca1e692
to
98976d1
Compare
What do you mean? There was never a space in our AlertNotification component.
Fixed the modal title and error message title. However "disk" it's still present in error message, since that error message comes from libvirt itself.
Term "target" is quite commonly used across libvirt, and there is reason for it, as "device" and "target" may refer to different things.
Those 2 will be usually different.
No, the label was already there. |
98976d1
to
336d1a4
Compare
I meant the space in that screenshot. There should be space; alert widgets should never be slammed into something else. (And most other widgets shouldn't either.) Disc: Nice! Thanks for fixing that (in Cockpit, where possible). Target: Ok. That's fine. |
1e332d8
to
d895907
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.
d895907
to
1e3fec5
Compare
@garrett So here is my new iteration: Adjusted spacing in VM deletion dialog:Storage pool with volumes will mention which volumes will be deleted:Inactive storage pool:Storage pool without any volumes:This however looks a bit strange, to have just an empty modal. Or not? Not sure about this one. |
b5d23c5
to
b2b77b8
Compare
@skobyda : Thanks! Please rebase, to let packit tests run. |
b2b77b8
to
e0dbfaa
Compare
Failure is already handled by DeleteResource dialog.
The modal now contains more specify message and description of the disk which is being removed
The modal now contains more specify message
e0dbfaa
to
67bf06d
Compare
Tests green. I think it's close to landing. @garrett @martinpitt mind giving your final word? |
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.
Looks good! Let's merge this! 👍
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.
Dakujem!
As pointed out at #640 , there are many delete/removal dialogs in c-machines which do not follow PF guidelines. Here is my initial try to adhert to the guidelines. It will likely need some rewording.
Before
After
Before
After
Before
After
Before
After
Before
After
Machines: Redesign content removal dialogs
Dialogs for deleting resources on the Machines page now show details about which resources are about to be deleted.
For example: Removing host devices from the VM shows the host device with identifying information such as vendor, product, and slot number.
Another example: When deleting a storage pool, optional deletion of volumes now shows which volumes would be deleted.