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

simpler one click edit mode for edit forms #860

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

edlerd
Copy link
Collaborator

@edlerd edlerd commented Aug 26, 2024

Done

  • simpler one click edit mode for edit forms on instances, profiles networks, storage pools, storage volumes and projects

Fixes WD-14393

QA

  1. Run the LXD-UI:
  2. Perform the following QA steps:
    • check edit and creation of instances, profiles networks, storage pools, storage volumes and projects

@webteam-app
Copy link

@Kxiru
Copy link
Contributor

Kxiru commented Aug 27, 2024

To clarify, should the one click editing only work on dropdown and text fields? Not the overridable aspects of configs?
image

@edlerd
Copy link
Collaborator Author

edlerd commented Aug 27, 2024

To clarify, should the one click editing only work on dropdown and text fields? Not the overridable aspects of configs?

Previously you had to click "Edit instance", then those pencil icons would appear. When clicking a pencil to create an override, the input element appears.

Now the pencil icons are always visible, clicking them will go into edit-instanc-mode and show the input element.

@mas-who
Copy link
Collaborator

mas-who commented Aug 27, 2024

Thanks for this change, the interaction is really nice now for editing configurations on resources 👍

Only two smallish comments from QA:

  1. On the network device form, seems like the config row cell content alignment is a little off. In non-edit mode, the configuration column cell value seems to be off vertical center.
    Screenshot from 2024-08-27 18-33-24

  2. When editing network main configurations, clicking the edit icon for one of the config row puts all other config rows in edit mode. I think this seems to be a little inconsistent with other pages where config rows can go into edit mode individually?
    Screencast from 27-08-2024 18:41:31.webm

@edlerd
Copy link
Collaborator Author

edlerd commented Aug 27, 2024

  1. On the network device form, seems like the config row cell content alignment is a little off. In non-edit mode, the configuration column cell value seems to be off vertical center.
    Screenshot from 2024-08-27 18-33-24

This is a local override, hence the placement on the right. I agree this looks off, though. Maybe we can adopt a similar layout as in disk device section: with inherited and custom devices as headings.

  1. When editing network main configurations, clicking the edit icon for one of the config row puts all other config rows in edit mode. I think this seems to be a little inconsistent with other pages where config rows can go into edit mode individually?
    Screencast from 27-08-2024 18:41:31.webm

This is intended. Any fields with an override will go into edit mode once the user starts editing. I have no idea if or how we could improve this.

Both of those are implemented as intended. Maybe @piperdeck has an idea how to improve it?

@piperdeck
Copy link

  1. On the network device form, seems like the config row cell content alignment is a little off. In non-edit mode, the configuration column cell value seems to be off vertical center.

This is a local override, hence the placement on the right. I agree this looks off, though. Maybe we can adopt a similar layout as in disk device section: with inherited and custom devices as headings.

I think Mason was talking about this alignment:

CleanShot 2024-08-27 at 16 47 37

I think it would look better if we could give it this alignment:

CleanShot 2024-08-27 at 16 57 32

  1. When editing network main configurations, clicking the edit icon for one of the config row puts all other config rows in edit mode. I think this seems to be a little inconsistent with other pages where config rows can go into edit mode individually?
    Screencast from 27-08-2024 18:41:31.webm

This is intended. Any fields with an override will go into edit mode once the user starts editing. I have no idea if or how we could improve this.

Both of those are implemented as intended. Maybe @piperdeck has an idea how to improve it?

As for that point, I agree that this is implemented as intended, and personally I think it's working well

@mas-who
Copy link
Collaborator

mas-who commented Aug 28, 2024

On the devices form, for custom devices, the "Mount point", "Read limit" and "Write limit" configs are not editable. When I make a change for anything else on the devices form, then those fields for a custom device becomes editable. Is it possible to have the edit button next to those fields too?

@mas-who
Copy link
Collaborator

mas-who commented Aug 28, 2024

The alignment for the custom device "Pool / volume" field seems off
Screenshot from 2024-08-28 09-45-26

Copy link
Collaborator

@mas-who mas-who left a comment

Choose a reason for hiding this comment

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

This is a great change, the code also look cleaner than before on top of the UI improvements! Left some comments for feedback :)

src/components/forms/DiskDeviceFormCustom.tsx Show resolved Hide resolved
src/pages/instances/forms/EditInstanceDetails.tsx Outdated Show resolved Hide resolved
src/pages/instances/CreateInstance.tsx Show resolved Hide resolved
src/pages/instances/EditInstance.tsx Outdated Show resolved Hide resolved
src/pages/networks/CreateNetwork.tsx Outdated Show resolved Hide resolved
@edlerd edlerd force-pushed the simplify-edit-mode branch 3 times, most recently from a7fb183 to ebd1ba1 Compare August 28, 2024 08:55
…profiles networks, storage pools, storage volumes and projects

Signed-off-by: David Edler <[email protected]>
@mas-who
Copy link
Collaborator

mas-who commented Aug 28, 2024

Code and QA LGTM, thanks for the updates 👍

@edlerd
Copy link
Collaborator Author

edlerd commented Aug 28, 2024

Addressed all the design requests @piperdeck please have another look at this.

@piperdeck
Copy link

Looks good to me!

@edlerd edlerd merged commit e593c13 into canonical:main Aug 28, 2024
12 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 28, 2024
@edlerd edlerd deleted the simplify-edit-mode branch September 4, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants