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

network: distinguish create and edit dialogs #19209

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

subhoghoshX
Copy link
Member

@subhoghoshX subhoghoshX commented Aug 21, 2023

Based on @garrett's suggestions here.

Is this a create dialog? Then it should say "Create VPN", not "Save". In edit mode, it should say "Save", however.

The title "WireGuard settings" should either be "Create WireGuard VPN" or "Edit WireGuard VPN", based on the mode of the modal.

And here.

Can you add more than one WireGuard VPN? (It doesn't look like it. It's "WireGuard settings" here with a "Save" button. It's not settings though? Shouldn't it be "Add WireGuard VPN"? With an "Add" button?

This needed to be a separate PR as the code/issue is shared between the other interface Dialogs.

For the time being, create dialogs have a "Add" button and edit dialogs have a "Save" button.

Create Dialog:

image

Edit Dialog:

image

I haven't changed the titles yet; changing "Bond settings" to "Create bond settings" seems redundant and should be obvious from the context, but happy to get any feedback on that.

@martinpitt
Copy link
Member

Thanks! I think changing the titles would make sense as well. E.g. "Add VLAN" and "Edit VLAN" or "Edit VLAN settings". Please no "Add ... settings", that sounds weird.

@subhoghoshX
Copy link
Member Author

Went with "Add VLAN" and "Edit VLAN settings".

Oops! Too many tests failed to ignore... only TestFirewall.testNetworkingPage seem to be repeating.

@@ -151,7 +151,8 @@ export const TeamDialog = ({ connection, dev, settings }) => {
<NetworkModal dialogError={dialogError}
idPrefix={idPrefix}
onSubmit={onSubmit}
title={_("Team settings")}
title={!connection ? _("Add team") : _("Edit team settings")}
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test. Details

@@ -88,7 +88,8 @@ export const VlanDialog = ({ connection, dev, settings }) => {
<NetworkModal dialogError={dialogError}
idPrefix={idPrefix}
onSubmit={onSubmit}
title={_("VLAN settings")}
title={!connection ? _("Add VLAN") : _("Edit VLAN settings")}
Copy link
Contributor

Choose a reason for hiding this comment

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

This added line is not executed by any test. Details

@martinpitt martinpitt marked this pull request as ready for review September 4, 2023 07:50
martinpitt
martinpitt previously approved these changes Sep 4, 2023
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.

Perfect, thanks! I suppose that will need some pixel updates, I'm happy to deal with them. @garrett , @mvollmer okay for you?

@martinpitt
Copy link
Member

We now have the expected pixel diffs.

mvollmer
mvollmer previously approved these changes Sep 4, 2023
Copy link
Member

@mvollmer mvollmer left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@martinpitt martinpitt added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Sep 4, 2023
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 pushed the updated pixels. Only re-running a few tests now, as they already went green before, and the 3x retry is quite taxing.

@martinpitt martinpitt merged commit f8e8a18 into cockpit-project:main Sep 4, 2023
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants