-
Notifications
You must be signed in to change notification settings - Fork 72
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
Table view for Virtual Machines screen #1600
Conversation
All tests passed |
All tests passed |
All tests passed |
/ost |
All tests passed |
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.
Only 1 things is bugging me really...and it is how the table is wired in to VmCardList
All tests passed |
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.
LGTM
All tests passed |
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.
@rszwajko
Few comments/enhancements to consider:
-
IMHO both card/table view buttons on VMs dashboard dialog worth adding tooltips to easily differentiate between them:
-
Resetting the user's account settings via the account settings dialog reset this view option back to cards view. This is not an obvious expected behavior and even though it's not a destructive action, it is still worth adding a property/indication to the account settings dialog, as done for all other reset-able options.
-
When resizing the dialog by zooming in, the filter search text field is dismissed. This is reproduced regardless to this fix but now the chance is higher since less space is left. It's not obvious that the search text filed is hidden by the funnel button so maybe worth at least adding a tooltip:
Default zoom:
-
Pool and Pool vms rows look exactly the same at the table view (same layout except the status new option) while on cards view there is a bit different layout (2 status fields instead of one) and it's more easy to distinguish between them. Maybe worth adding a tag to distinguish
-
The number of entities displayed on vms dashboard, as part of the filter results, includes a question mark which seems like a bug. E.g.: "
23 of ? Results
"
The icons look self-explanatory to me but I'll check how tooltips will behave in this scenario. Note that the design guidlines and the examples don't use the tooltips.
AFAIK we don't list the properties that will be removed during the reset operation.
According to PF4 design guidelines the primary use case here is the mobile browser where "on hover" support is poor.
The data is the same in both views - only the layout is different. Of course we can add some extra tag but then it should be visible also on the card view. It would be also nice to filter based on such tag. I would rather create a follow-up PR to track this.
This is a feature :)
|
Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592
Changes: 1. display all providers in ons table 2. provide attribute-value filter implementation with: a) free text filter b) enum based filter Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter
Before, filtering and sorting was tied to VM entities. After this patch the generic filter/sort component can be reused for other entities. Filter component changes: 1. create a new type of filter - a date filter 2. generalize name filter to text based filter - as before only one filter of this type is supported per filter toolbar 3. extract enum based filter as SelectFilter Sort component changes: 1. refactor SortFields from constant to parameter 2. drop unused isNumeric flag - natural sort order is used for all types of input
Persist chosen view mode as server side user property "vmPortal.viewForVirtualMachines". Visualise that the total number of VMs/Pools is unknown by displaying a question mark as the total result count i.e. "10 of ? Results"
This wording is recommended by PF4 for paging. Reference-Url: https://www.patternfly.org/v4/components/pagination/design-guidelines#indeterminate-pagination
All tests passed |
@sgratch @sjd78
|
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter
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.
LGTM
/ost |
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter
/ost |
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter
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.
All looks good, agree with your comments above, except one comment which I'm not sure about:
AFAIK we don't list the properties that will be removed during the reset operation.
It's true that the list of properties is not displayed during reset operation but it's strange that the user can change his current view from cards->table and then approach the "account settings" dialog and see that the "reset settings" option is enabled without knowing why. For all other reset-able options he can see the current chosen values as part of the account settings dialog itself.
A suggestion might be to add a read only view mode field as part of "advanced options" tab within the "account settings" dialog.
A followup issue was opened to handle this: #1632
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.
This looks ok except a followup issue that will be handled separately for the reset options handling.
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Functional changes: 1. display all providers in one table 2. use only 'Ready' condition to describe the state of the provider Components created: 1. primary filters component for displaying few (1-3) most important filters. The filters are grouped but displayed independently. 2. attribute-value filter implementation for grouping all other filters in a space efficient way 3. default filter types: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key b) enum based filter - exact match based on checkboxes selected 4. generic table component providing sorting capabilities Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Reference-Url: https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter Signed-off-by: Radoslaw Szwajkowski <[email protected]>
Components created: 1. standard list page component a) page skeleton following openshift console layout and practice b) generic component parametrized by the entity type c) design is view independent and follows the approach used in oVirt PR 1600 and 1592. Currently only table view implementation is provided. 2. primary filters component a) implementation of PatternFly 4 filter group pattern[1] extended to support all filters implementing FilterTypeProps interface. b) use case: displaying few (1-3) most important filters. The filters are grouped but displayed independently. 3. attribute-value filter component a) implementation of PatternFly 4 attribute-value filter pattern[2] b) use case: grouping all other filters in a space efficient way c) supports all filters implementing FilterTypeProps interface. 4. filter components: a) free text filter - substring search based on multiple terms - search terms confirmed by 'Enter' key or by button b) enum based filter - exact match based on checkboxes selected 5. table view component a) parametrized by the entity type b) row mapper component is entity-specific which allows complex customizations c) sorting capabilities (via arrows in the table header) 6. dialog for managing column visibility and order a) based on openshift console solution [3] and PatternFly 4 demo[4] b) toggle column visibility (except identity columns) c) re-order columns using drag and drop Updated libraries: 1. Downgrade @testing-library/react to ^12.0 since ^13.0 requires react >= 18. 2. Bump @openshift/dynamic-plugin-sdk* to 1.0.0 [1] https://www.patternfly.org/v4/guidelines/filters/#filter-group [2] https://www.patternfly.org/v4/guidelines/filters#attribute-value-filter [3] https://github.com/openshift/console/blob/release-4.12/frontend/public/components/modals/column-management-modal.tsx [4] https://www.patternfly.org/v4/components/table/react-demos#column-management-with-draggable Reference-Url: oVirt/ovirt-web-ui#1600 Reference-Url: oVirt/ovirt-web-ui#1592 Signed-off-by: Radoslaw Szwajkowski <[email protected]>
LGTM |
Depends on #1592The commit from #1592 this PR was dependent on has been cherry-picked to this PR.This PR adds possibility to switch between card view and table view on the Virtual Machines screen. The card view remains the default but it's possible to change it (the change is persisted on the server as an user profile property).
Note that this PR is only about presentation layer: the underlying logic remains the same.
In particular: