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

Use card for repository setting #339

Closed
wants to merge 1 commit into from

Conversation

marusak
Copy link
Member

@marusak marusak commented Feb 28, 2023

Looks like this:
Screenshot from 2023-02-28 14-04-09

Tests is broken and trying to understand why. Posting for now for design review

COCKPIT-908: Use card for repository setting

@@ -25,7 +25,6 @@ Cockpit component for managing software updates for ostree based systems.

%files
%doc README.md
%license LICENSE dist/ostree.js.LICENSE.txt.gz
Copy link
Member Author

Choose a reason for hiding this comment

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

oops :)

@garrett
Copy link
Member

garrett commented Mar 1, 2023

What you've implemented is a very rough first pass I did a few years ago. Not the current design.

The current design supposed to be like this (from #176 (comment)):

image

And editing it would open a modal.

I had several modals implemented, but didn't get to finish the rebase (branch selection) due to context switching (being pulled in different directions all the time), so since you're working on this now, I spent time today getting back to this to share what the modal would look like.

The biggest change I've made is splitting out repo management from an all-in-one UI, as you don't really edit repos all that frequently. Generally, you're more concerned with branches. Branch rebasing is usually not a frequent action either, but it's much more common (especially on Silverblue) than repo editing.

As a result, the revised main page would look like this (the change is removing the edit button and making it a kebab):

OStree page

And here's what's hiding there in the menu:

Source kebab

And these are the dialogs for the actions:

Rebase - 1 repo
(When there's only 1 repo, the selector is not there. It's just text.)

Rebase- 2 or more
(When theres > 1 repo, the repo list is hidden away in a dropdown. Usually, I wouldn't suggest a dropdown for things that are less than 4 or 5, but generally, someone would never switch this, so it's a way to hide away things that almost never matter, but still allow for a choice.)

Add repository
Adding gets its own dialog. It's too complex otherwise.

Remove repository
Currently selected repository is disabled. Items are not checked by default. The "Remove" button would be disabled when nothing is checked.

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.

Please change according the the new mockups, based on the current mockups (and not the 2 year old mockups).

Thanks! 👍

@marusak marusak changed the title Use card for repository setting COCKPIT-908: Use card for repository setting Mar 8, 2023
@marusak marusak changed the title COCKPIT-908: Use card for repository setting Use card for repository setting Mar 13, 2023
COCKPIT-908: Use card for repository setting
@marusak
Copy link
Member Author

marusak commented Mar 20, 2023

@garrett what about "edit" repo action? How would user pick which repo they want to edit?

@marusak marusak requested a review from garrett March 20, 2023 14:11
@garrett
Copy link
Member

garrett commented Mar 20, 2023

@marusak: It'd use the modal dialogs, as mocked up above?

I spec'd it out as a kebab menu with rebase, add, and remove. The point of the redesign is that we were trying to do everything at the same time, which doesn't make sens, so I refactored it all in the mockups in the immediately previous comment @ #339 (comment).

Start with "As a result, the revised main page would look like this".

@garrett
Copy link
Member

garrett commented Mar 20, 2023

Oh, you mean edit an already added repo instead of adding and removing? Would people really use that in practice? Adding would have a validation, so you wouldn't be able to add something that doesn't exist, so therefore, you wouldn't need to edit it really, IMO.

@marusak
Copy link
Member Author

marusak commented Mar 21, 2023

I think that editing is always a good practice. If we don't add it it is just matter of time before someone will come and ask for it. Same as with timers, firewall services... If user can create something from UI they should be able to edit it. Nobody likes to delete and create new one when they realize they actually need something bit different.

Moreover right now if you want to add more keys you need to do it in the edit option. This seems weird and should be fixed but for example that is usecase where you might want to edit repo when you need to use different gpg key.

@garrett
Copy link
Member

garrett commented Mar 22, 2023

So the question is if you can only edit the currently active repo or any repo.

If it's only the current, it would be rather straightforward:

  • The edit modal would be the same as the add, but with a different title and action button and have the values prefilled.
  • And it would have an entry on the menu, under add; it would probably say "Edit active repository".

I literally had this mocked up and thought I exported and shared it here. Anyway, here's a fresh export:

edit modal

Source kebab(1)


However, remove has you select a repo to remove that isn't the current. And editing the current one might not work (you might need to rebase into anthing that's edited).

If that's the case, then we'd need to have some way to select the repo. It could be indeterminate in length, and might be very long. Considering this and that you're acting only on one and not multiple, I guess we could use a dropdown select and then have the form items below it prefilled, much like the above suggestion.

However, if we're selecting on name and also changing the name, that could be problematic — I suppose in this case, we just keep the previous name in the modal for the time being as it won't become active until the edits are saved anyway.

It'd look like this:

image

There's an intentional separation between the repository dropdown and the edit area.

The menu would be like the one above, but it would only say "Edit repository", as you can only edit one at a time.

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.

2 participants