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

networkmanager: Use TrashIcon instead of MinusIcon for field groups, and text-based add buttons instead of PlusIcon #19212

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

skobyda
Copy link
Contributor

@skobyda skobyda commented Aug 21, 2023

Fixes #19211

Screenshot from 2023-08-21 17-29-08

@skobyda skobyda requested a review from garrett August 21, 2023 15:31
@garrett
Copy link
Member

garrett commented Aug 22, 2023

Thanks. This is better.

One thing in particular here: The + buttons should be really be text-based. "Add something" instead of (a badly misaligned) + icon.

Probably the following:

Add address
Add DNS server
Add search domain
Add route

@martinpitt
Copy link
Member

/packit retest-failed

@martinpitt
Copy link
Member

@garrett Do you want to block this on fixing the plus buttons, or is that okay for a follow-up?

I'm a bit surprised that this didn't seem to cause any pixel test failures.

@martinpitt
Copy link
Member

FTR, we can ignore the tox failure, that is fixed in main and unrelated.

martinpitt
martinpitt previously approved these changes Aug 23, 2023
@skobyda
Copy link
Contributor Author

skobyda commented Aug 23, 2023

Thanks. This is better.

One thing in particular here: The + buttons should be really be text-based. "Add something" instead of (a badly misaligned) + icon.

Probably the following:

Add address Add DNS server Add search domain Add route

@garrett, fixed:
Screenshot from 2023-08-23 10-14-18

@skobyda
Copy link
Contributor Author

skobyda commented Aug 29, 2023

I'm a bit surprised that this didn't seem to cause any pixel test failures.

It feels like it definitely should have a pixel test. So I added one

@martinpitt
Copy link
Member

Needs at least one more push:

test/verify/check-networkmanager-settings:99:50: E261 at least two spaces before inline comment

@martinpitt
Copy link
Member

new pixels look good, thank you! The + icon looked nicer IMHO, less space and less to translate, but I trust @garrett 's judgement here.

So aside from the code style issue this LGTM!

@martinpitt
Copy link
Member

Breaks TestNetworkingSettings.testNoConnectionSettings everywhere 😢

@martinpitt
Copy link
Member

This pixel test failure looks weird. The mode is "DHCP/automatic", and yet it has manual address entry fields. Is that a regression?

@skobyda
Copy link
Contributor Author

skobyda commented Aug 30, 2023

This pixel test failure looks weird. The mode is "DHCP/automatic", and yet it has manual address entry fields. Is that a regression?

You can set automatic DHCP + additional address with tha tmanual address entry. So no regression

@martinpitt
Copy link
Member

Ah, this is because the third commit explicitly clicks on "Add address" to make this appear, I see.

@martinpitt
Copy link
Member

This looks okay to me now. I'd like to get Garrett's sign-off on this, and this introduces new strings, so I'd like to hold it off for a bit. Unfortunately, translating the most recent 299 release takes a lot longer than usual 😢

@martinpitt martinpitt added string-freeze blocked Don't land until something else happens first (see task list) labels Aug 30, 2023
@martinpitt martinpitt changed the title networkmanager: Use TrashIcon instead of MinusIcon for field groups networkmanager: Use TrashIcon instead of MinusIcon for field groups, and text-based add buttons instead of PlusIcon Aug 30, 2023
@skobyda skobyda removed blocked Don't land until something else happens first (see task list) string-freeze labels Sep 6, 2023
@garrett
Copy link
Member

garrett commented Sep 11, 2023

The + versus "Add something" is not super clear on PatternFly:

If we are to keep the + icons, they would have to be icons that would have to be properly centered and have tooltip and proper ARIA text. Having "Add" and what you're adding is more obvious overall. However, they're probably obvious visually by context.

The text does add visual noise (looks like a "jagged" "rough edge") and it breaks the alignment of other elements (switches).

While the - to trash icons are a super obvious change, seeing the screenshot makes me wonder about the + instead.

Would you, instead, be able to fix the alignment of the + icons and ensure they have tooltips and a proper aria-label?

@skobyda
Copy link
Contributor Author

skobyda commented Sep 18, 2023

@garrett something like this:

Screenshot from 2023-09-18 14-43-37

@skobyda skobyda requested review from garrett and removed request for garrett September 18, 2023 12:43
@martinpitt
Copy link
Member

Code-wise this looks okay -- it needs to actually add the pixel ref of course. Leaving the UI review to @garrett. Thanks!

garrett
garrett previously approved these changes Sep 20, 2023
Copy link
Member

@garrett garrett left a comment

Choose a reason for hiding this comment

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

That's better, for sure. There are still 2 pixels more on the bottom than the top, oddly. If it was shifted down a pixel, it'd be correct. (Sides are correct at least.)

image

(To help visualize this: The orange box is the same height as the space above the + icon.)

Is this a PF bug? Possibly.

Additionally, the icon isn't hinted; it has some odd subpixel going on. It's probably designed for another size. But this is either a PF issue or the icons they use.

Anyway, it looks correct in diff; these have to be PF issues. And this PR improves everything, so I'm approving. 👍

@garrett
Copy link
Member

garrett commented Sep 20, 2023

I was playing around with it further and did discover when you select "Manual", it shows a trash icon that's in a disabled state:

image

Shouldn't this trash icon not be there, instead of being disabled? Could you add this to the PR or as a follow-up?

image

It seems you can add more addresses? Should this be a "remove, but there must be one" situation? Or should there only be one? Or is it really the first one cannot be changed and you can remove additional?

I guess the scope for this should be in a follow-up.

Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

I mopped up the new pixel test, thanks!

@martinpitt martinpitt merged commit 2a38e15 into cockpit-project:main Oct 4, 2023
97 of 98 checks passed
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.

Networking add/remove addresses should use standard field group icons
3 participants