Bug 2137591

Summary: Inconsistent dialog headings/titles
Product: Container Native Virtualization (CNV) Reporter: Hilda Stastna <hstastna>
Component: User ExperienceAssignee: Hilda Stastna <hstastna>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.12.0CC: gouyang, lkladnit, yfrimanm
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-24 13:41:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
No name provided in the dialog title none

Description Hilda Stastna 2022-10-25 15:09:26 UTC
Created attachment 1920308 [details]
No name provided in the dialog title

Description of problem:
There is inconsistency in the modals/dialogs titles:
In some of them, the entity name is provided, in some of them not.
In addition, sometimes the name is too long, so then the title is cut off if present in the title - and that's problematic. So we need to figure out the consistent way of displaying dialogs' titles.

Version-Release number of selected component (if applicable):
4.12.

How reproducible:
always

Steps to Reproduce:
1. Look at some dialog, for example:
VirtualMachines > Snapshots tab > for some snapshot, click on Delete in the kebab menu and see the dialog for its deletion
=> the dialog does not contain the snapshot name, comparing to, for example, Delete VirtualMachine dialog title, also if the VM name is long, the Delete VM dialog title is cut off (see the attachment)

Actual results:
Inconsistent dialog titles, with or without the name, sometimes cut off, depending on the length of the name. 

Expected results:
Dialog titles displayed consistently and not cut off, across the whole UI.

Additional info:
See https://bugzilla.redhat.com/show_bug.cgi?id=2132721#c19

Comment 3 Yifat Menchik 2022-10-25 16:02:41 UTC
+1 about the consistency consideration. 
Thinking this over and taking into consideration that some dialogs may include long names in their headlines, I suggest to omit the VM/Snapshot-name from the headline and include it only in the content area. This also aligns with the PF guidelines https://www.patternfly.org/v4/components/modal/design-guidelines#confirm-a-destructive-action.

Comment 4 Hilda Stastna 2022-10-25 17:22:13 UTC
To prevent any misunderstandings, the previous comment means to omit the name in any/all the dialog titles/headlines, to always omit it, for example the VM/Snapshot-name from the headline of the Delete dialogs.

Comment 5 Guohua Ouyang 2022-10-26 04:16:00 UTC
In my opinion:
1. refer to VM actions menu, the button text in all other places should be consistent, don't include entity name in the button text: "Delete VirtualMachineSnapshot" -> "Delete".
2. the modal title is the same with the button text

Comment 6 Yifat Menchik 2022-11-03 13:10:24 UTC
Hi, I agree with @gouyang comment #1 - we should update the buttons text to include only the action itself. E.g. "Delete", "Save", "Add", "Remove" etc.
but I don't agree with comment #2 ("...the modal title is the same with the button text") because I think the modal title should include more context than what is shown in the VM actions menu. I'd vote for just omitting the resource/item name from the modal title.

Comment 7 Yifat Menchik 2022-11-03 13:11:12 UTC
Hi, I agree with @gouyang comment #1 - we should update the buttons text to include only the action itself. E.g. "Delete", "Save", "Add", "Remove" etc.
but I don't agree with comment #2 ("...the modal title is the same with the button text") because I think the modal title should include more context than what is shown in the VM actions menu. I'd vote for just omitting the resource/item name from the modal title.

Comment 8 Hilda Stastna 2022-11-07 14:54:07 UTC
Fixing:
https://github.com/kubevirt-ui/kubevirt-plugin/pull/953

Comment 9 Leon Kladnitsky 2022-11-08 07:09:32 UTC
Verified in KCP v4.12.0-157

Comment 13 errata-xmlrpc 2023-01-24 13:41:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.12.0 Images security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:0408