Skip to content
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

Migrate VM List screen to PF4 #1543

Merged
merged 4 commits into from
Jun 7, 2022
Merged

Migrate VM List screen to PF4 #1543

merged 4 commits into from
Jun 7, 2022

Conversation

rszwajko
Copy link
Member

@rszwajko rszwajko commented Dec 7, 2021

Depends on #1540

Includes:

  1. toolbars
  2. tooltips
  3. spinner
  4. masthead icons

Fixes:

  1. use translation independent filters
  2. allow filter multiselection

@rszwajko rszwajko requested review from sjd78 and sgratch December 7, 2021 15:53
@rszwajko
Copy link
Member Author

rszwajko commented Dec 7, 2021

Overview with filters

image

VM Actions on a card

image

VM Actions inside toolbar

image
image

Small screen mode

image
image
image

Account Settings toolbar

image

VM Console toolbar

image

@ovirt-infra
Copy link

All tests passed

@ovirt-infra
Copy link

All tests passed

@ovirt-infra
Copy link

All tests passed

@ovirt-infra
Copy link

All tests passed

@ovirt-infra
Copy link

Some tests failed

@ovirt-infra
Copy link

All tests passed

@rszwajko
Copy link
Member Author

@sjd78 @sgratch
Note that some styling issues has been fixed in #1584 i.e. truncating action name on the VM card.

@ovirt-infra
Copy link

All tests passed

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first the >4 cards in a row on larger widths was annoying, but it is growing on me. The spacing between the name/status and action button should match the space between the icon and the name/status. It looks a bit bigger. (My guess is .vm-status style doesn't need a min-height).

Your VmActions changes are ok with me, I just didn't look very hard. The original code was a bit of a mess. Yours looks to work well, so I'm just giving that bit a quick skim. VmDetailsActions and VmDropdownActions structure is 👍.

VM List filter toolbar is looking 👍!

Minimal tweaks suggested.

src/components/VmsList/BaseCard.js Outdated Show resolved Hide resolved
src/components/VmsList/VmCardList.js Outdated Show resolved Hide resolved
src/utils/vms-filters.js Outdated Show resolved Hide resolved
src/components/VmConsole/VmConsoleSelector.js Show resolved Hide resolved
src/components/Toolbar/VmsListToolbar.js Outdated Show resolved Hide resolved
src/components/Toolbar/VmsListToolbar.js Outdated Show resolved Hide resolved
src/components/Toolbar/VmSort.js Show resolved Hide resolved
src/components/Toolbar/VmSort.js Outdated Show resolved Hide resolved
@ovirt-infra
Copy link

All tests passed

@sjd78
Copy link
Member

sjd78 commented Jun 3, 2022

L&F issues noted (I'll resolve code comments containing them):

  • On card ... The spacing between the name/status and action button should match the space between the icon and the name/status. It looks a bit bigger. (My guess is .vm-status style doesn't need a min-height).

  • Card Gallery ... There is something off with the gutters. The gallery container itself doesn't seem to have a left and right gutter / margin. Looks like the scroll-container div has a top and bottom margin padding but needs a left and right to match.

These looks ok in #1594:

  • Toolbar ... VmSort font size and asc / desc icon left margin and size are off. asc/desc icon clickable?

  • Toolbar ... the "results of" text font size is smaller than expected

rszwajko added 2 commits June 6, 2022 10:06
Includes:
1. toolbars
2. tooltips
3. spinner
4. masthead icons

Fixes:
1. use translation independent filters
2. allow filter multiselection
@ovirt-infra
Copy link

All tests passed

@rszwajko rszwajko requested a review from sjd78 June 6, 2022 11:56
@rszwajko
Copy link
Member Author

rszwajko commented Jun 6, 2022

/ost

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sjd78
Copy link
Member

sjd78 commented Jun 6, 2022

OST fail:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class='col-sm-12']/h5"}

@rszwajko
Copy link
Member Author

rszwajko commented Jun 6, 2022

/ost

@ovirt-infra
Copy link

All tests passed

@rszwajko
Copy link
Member Author

rszwajko commented Jun 6, 2022

/ost

1 similar comment
@rszwajko
Copy link
Member Author

rszwajko commented Jun 6, 2022

/ost

rszwajko added 2 commits June 6, 2022 18:42
Integration tests (OST) expect VM count under specific xpath:
'//div[@Class='col-sm-12']/h5'

Preserve this path:
1. keep the class 'col-sm-12' as marker class
2. keep the structure: <div> followed by <h5>
@rszwajko
Copy link
Member Author

rszwajko commented Jun 6, 2022

Forced pushed with minor changes:


diff --git a/src/components/Toolbar/VmSort.js b/src/components/Toolbar/VmSort.js
index a4bd3cec..7f0d8cc1 100644
--- a/src/components/Toolbar/VmSort.js
+++ b/src/components/Toolbar/VmSort.js
@@ -61,8 +61,8 @@ const VmSort = ({ sort, msg, onSortChange }) => {
         />
       </ToolbarItem>
       <ToolbarItem>
-        <Button variant='plain' ariaLabel={msg.sortDirection()} onClick={() => onSortChange({ ...sort, isAsc: !isAsc })}>
-          {isAsc ? <SortAmountDownAltIcon/> : <SortAmountDownIcon key='icon'/>}
+        <Button variant='plain' aria-label={msg.sortDirection()} onClick={() => onSortChange({ ...sort, isAsc: !isAsc })}>
+          {isAsc ? <SortAmountDownAltIcon/> : <SortAmountDownIcon/>}
         </Button>
       </ToolbarItem>
     </ToolbarGroup>
diff --git a/src/components/Toolbar/VmsListToolbar.js b/src/components/Toolbar/VmsListToolbar.js
index e448d8e9..ac2989cc 100644
--- a/src/components/Toolbar/VmsListToolbar.js
+++ b/src/components/Toolbar/VmsListToolbar.js
@@ -33,6 +33,12 @@ const VmsListToolbar = ({ match, vms, pools, filters = {}, onClearFilters, msg }
           <VmFilters/>
           <VmSort />
           <ToolbarItem>
+            {
+            /* integration tests (OST) expect VM count under xpath //div[@class='col-sm-12']/h5
+            preserve this path:
+            keep the class 'col-sm-12' as marker class
+            keep the structure <div> followed by <h5> */
+            }
             <div className='col-sm-12'>
               <h5>
                 {

@ovirt-infra
Copy link

All tests passed

@rszwajko
Copy link
Member Author

rszwajko commented Jun 6, 2022

/ost

@sjd78
Copy link
Member

sjd78 commented Jun 6, 2022

Most recent OST fail:

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element &lt;a href="#" id="usermenu-logout"&gt;...&lt;/a&gt; is not clickable at point (1451, 100). Other element would receive the click: &lt;div class="pf-c-tooltip__content"&gt;...&lt;/div&gt;

@sjd78 sjd78 merged commit f519b50 into oVirt:master Jun 7, 2022
sjd78 added a commit to sjd78/ovirt-web-ui that referenced this pull request Jun 9, 2022
After merging PRs and pushing their string changes, pull the
translations.  This picks up translation invalidations (English text
has changed), helping to make sure the translations are not wrong.

PRs to consider:
  - oVirt#1533
  - oVirt#1537
  - oVirt#1539
  - oVirt#1540
  - oVirt#1543
  - oVirt#1549
  - oVirt#1564
  - oVirt#1584
  - oVirt#1585 ** pending merge
  - oVirt#1592 ** pending merge
sjd78 added a commit to sjd78/ovirt-web-ui that referenced this pull request Jun 9, 2022
After merging PRs and pushing their string changes, pull the
translations.  This picks up translation invalidations (English text
has changed), helping to make sure the translations are not wrong.

PRs to consider:
  - oVirt#1533
  - oVirt#1537
  - oVirt#1539
  - oVirt#1540
  - oVirt#1543
  - oVirt#1549
  - oVirt#1564
  - oVirt#1584
  - oVirt#1585 ** pending merge
  - oVirt#1592 ** pending merge
sjd78 added a commit to sjd78/ovirt-web-ui that referenced this pull request Jun 14, 2022
After merging PRs and pushing their string changes, pull the
translations.  This picks up translation invalidations (English text
has changed), helping to make sure the translations are not wrong.

PRs to consider:
  - oVirt#1533
  - oVirt#1537
  - oVirt#1539
  - oVirt#1540
  - oVirt#1543
  - oVirt#1549
  - oVirt#1564
  - oVirt#1584
  - oVirt#1585
  - oVirt#1592 ** pending merge
sjd78 added a commit to sjd78/ovirt-web-ui that referenced this pull request Jun 14, 2022
After merging PRs and pushing their string changes, pull the
translations.  This picks up translation invalidations (English text
has changed), helping to make sure the translations are not wrong.

PRs to consider:
  - oVirt#1533
  - oVirt#1537
  - oVirt#1539
  - oVirt#1540
  - oVirt#1543
  - oVirt#1549
  - oVirt#1564
  - oVirt#1584
  - oVirt#1585
  - oVirt#1592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants