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

[web] Change the location of page options #545

Merged
merged 23 commits into from
Apr 25, 2023

Conversation

dgdavid
Copy link
Contributor

@dgdavid dgdavid commented Apr 21, 2023

Problem

Since page actions (also known as "Contextual actions") were introduced, there have been complaints regarding their "discoverability" from within and outside the team.

It seems that there is too much subtlety in the navigation (and, admittedly, I like that fact) to make it easy for the users to discern when they are in a new page and, thus, the Hamburguer Menu icon (aka Sidebar) may contain different options.

The situation can be further complicated now that we plan to add a global notification mark alongside the Hamburguer Menu icon for trying to catch users' attention in a no disruptive way when there is something that might be interesting for them but not critical or urgent enough for blocking the UI with a Popup.

Click to show/hide few screenshots
Overview page (sidebar closed) Overview page (sidebar open) Storage page (sidebar closed) Storage page (sidebar open)
Overview page (sidebar closed) Overview page (sidebar open) Storage page (sidebar closed) Storage page (sidebar open)

Solution

To extract the page related actions from the Sidebar and add a more evident element in the header to reveal them.

Menu closed Menu open
Storage page (menu closed) Storage page (menu open)
Click to show/hide more screenshots
Overview page (sidebar closed) Overview page (sidebar open) Storage page (sidebar closed) Storage page (sidebar open)
Overview page (sidebar closed) Overview page (sidebar closed) Storage page (sidebar closed) Storage page (sidebar open)

Side effects

These changes entail the removal of the PageOptions component introduced at #462 as well as the Sidebar.OpenButton introduced at #500

Testing

  • Added/Adapted unit tests
  • Tested manually

⚠️ screenshots above can be slightly out dated after code review if only texts or descriptions were changed.

dgdavid added 13 commits April 21, 2023 08:40
Basically used by the Sidebar, which will stop holding "Page" or
"Contextual" actions. Another slot will be created for them in order to
make these actions more discoverable.
Based in the PatternFly Dropdown component[1] and intended for displaying
the actions related to the current page in an attempt to make them more
discoverable.

[1] https://www.patternfly.org/v4/components/dropdown
And stop using the somehow "deprecated" PageOptions.
Moving the actions to its own NetworkPageOptions page and stop using the
"deprecated" PageOptions to show them in the Sidebar.
Now that we are going to stop teleporting links to the Sidebar and start
using another location for placing the page related links, the "Change
product" action will always be displayed in the Sidebar since, at least
initially, we don't want to relate actions only to the Overview.
It'll become no longer needed
No longer needed since we've decided to stop teleporting page related
actions to make them more discoverable.
@dgdavid dgdavid changed the title Contextual actions 2nd approach [web] Change the location of page related actions Apr 21, 2023
@coveralls
Copy link

coveralls commented Apr 21, 2023

Pull Request Test Coverage Report for Build 4794910727

  • 26 of 36 (72.22%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 73.833%

Changes Missing Coverage Covered Lines Changed/Added Lines %
web/src/components/network/NetworkPage.jsx 5 6 83.33%
web/src/components/storage/ProposalPageOptions.jsx 2 11 18.18%
Totals Coverage Status
Change from base Build 4745258881: 0.05%
Covered Lines: 4759
Relevant Lines: 6218

💛 - Coveralls

web/src/components/network/NetworkPage.jsx Show resolved Hide resolved
web/src/components/network/NetworkPageOptions.jsx Outdated Show resolved Hide resolved
<ContextualActions.Item
key="iscsi-link"
href={href}
description="Connect to iSCSI targets"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this new approach, it's a lot of easy to add a description for each menu entry and help the users to quickly identify that it's really the action they want to choose. That's why I added this description prop here after talking about that with @ancorgs. Please, check it and propose a better description if you have one in mind. The idea is to avoid using only the acronyms as much as possible too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be sure this leads only to new connections or does it allow also to modify existing/delete connections?

Copy link
Contributor Author

@dgdavid dgdavid Apr 25, 2023

Choose a reason for hiding this comment

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

Actually, it leads to the iSCSI management page. The idea to use the "Create" word it's based in the fact that probably it's the "most wanted" action. As said, it's a hint to avoid having only the acronym as a menu option (which is not wrong per se), but any better suggestion as an entry description is more than welcome.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case I think "Manager connections to iSCSI targets" sounds better to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see the value in "Connect to iSCSI Targets" even if it's not precise. It's true it takes you to a place in which you can connect, disconnect, discover, check the iBFT configuration and even more things I may be overlooking. But the first time you are looking for that page is because you want to connect to some target.

return (
<ContextualActions>
<ContextualActions.Group
label="Configure"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of having a lot of "similar actions" like "Configure DASD", "Configure iSCSI", and "Configure FCoE" for example, we decided to group them under the "Configure" group. Now can be difficult to see the benefit of grouping page options, but think that most probably it will grow sooner than later. Anyway we can re-evalute it if needed an introduce groups later, but please keep in mind that its a bit confusing having a bunch of "Configure ACRONYM" options in a row.

<ContextualActions.Item
key="dasd-link"
href={href}
description="Manage and format"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As in the iSCSI link,

With this new approach, it's a lot of easy to add a description for each menu entry and help the users to quickly identify that it's really the action they want to choose. That's why I added this description prop here after talking about that with @ancorgs. Please, check it and propose a better description if you have one in mind. The idea is to avoid using only the acronyms as much as possible too.

const Toggler = ({ onClick }) => {
return (
<Button onClick={onClick} variant="plain">
<Icon name="expand_more" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually like the "+" icon, which for me has a lot of sense (more page actions). But since I thought it might be a bit controversial... I opted for using a "dropdown arrow" like one. Anyway, see how they look side by side

"Expand more" icon "Add" icon
Storage page using "expand more" icon Storage page using "add" icon

Either way, there are plenty of them at https://fonts.google.com/icons. Have a look to see if you find one that fits better.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like both, and I see the down arrow more generic. I would it for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer arrow instead of + as + invokes to me adding something like new storage. And it is not generic to all usage and we should be really be consistent, so user when get familiar with one page will be familiar with all of them.

Copy link
Contributor

Choose a reason for hiding this comment

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

As said, I also like the arrow. But I am asking myself if the icon is dicoverable enough. At first sight it looks to me like a button for minimizing or something similar (maybe it is my fault as user). Moreover, how can we refer to it? I mean, in the devices selector popup we have a sentence for suggesting the user to configure more devices if needed. Do we need to keep that tip? If so, how?

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, how do you see to add a button? E.g., "More options V", with good styles to integrate it nicely with the sidebar.

Copy link
Contributor Author

@dgdavid dgdavid Apr 25, 2023

Choose a reason for hiding this comment

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

I do not think it is needed such verbosity. But if you want, we can go ahead and fill the header with words 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I'd use the tooltip here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At first sight it looks to me like a button for minimizing or something similar

That's one of the reason why I prefer another icon. But I do not think, honestly, this would be a big issue at this time. What is more, I'd like to have feedback for real users. I.e., start simple and react to the audience feedback. The worst can happen is to have a user discovering more options becuase wanted to minimize the storage page.

@dgdavid dgdavid marked this pull request as ready for review April 24, 2023 08:54
joseivanlopez

This comment was marked as resolved.

joseivanlopez

This comment was marked as resolved.

@dgdavid

This comment was marked as outdated.

dgdavid added 3 commits April 24, 2023 13:04
For not displaying it when the WiFi scan is not supported.

See #545 (comment)
The option for configuring additional devices should be discoverable
enough now and, hopefully, the user does not need to be taught anymore
about where to find options related to a specific page. What is more,
it's no longer true that such actions can be done from the Sidebar.
Because the use case [1] for which it was introduced was already gone:
to provide a link for directly opening the sidebar from a text teaching
the user where to find page related actions.

We can bring back the component if needed, but let's get rid of it now.

This commit "reverts" f1a56eb, df85b3c, and a bit of f39f65d

[1] #500
@dgdavid dgdavid force-pushed the contextual-actions-2nd-approach branch from 301b3de to a492944 Compare April 24, 2023 12:35
@dgdavid dgdavid changed the title [web] Change the location of page related actions [web] Change the location of page options Apr 24, 2023
Because the component is more related to a PageMenu or PageOptions and
not to a "contextual actions".
@dgdavid dgdavid force-pushed the contextual-actions-2nd-approach branch from 63772a3 to 6a89990 Compare April 24, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants