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

Redesign OSTree page (to fix "change repository" modal) #176

Open
garrett opened this issue Mar 24, 2021 · 10 comments
Open

Redesign OSTree page (to fix "change repository" modal) #176

garrett opened this issue Mar 24, 2021 · 10 comments

Comments

@garrett
Copy link
Member

garrett commented Mar 24, 2021

The modal currently looks like this:

Screenshot_2021-03-24 Software Updates - garrett Rain(3)

Screenshot_2021-03-24 Software Updates - garrett Rain(4)

Instead, it should probably be using:

Or a table with editable rows: https://www.patternfly.org/v4/components/table#editable-rows

Since there's a lot of interaction inside the dialog with different states, we might even want to reconsider using a sub-page instead of a modal.


Redesign mockups start @ #176 (comment)

Everything above that comment is a WIP on the path to the mockup. (Which is probably still interesting to see the thought behind things.)

KKoukiou added a commit to KKoukiou/cockpit-ostree that referenced this issue Mar 25, 2021
Also put the content of the 'Add new repository' modal into another
dialog. The previous dialog had too many forms inside.

Fixes cockpit-project#176
KKoukiou added a commit to KKoukiou/cockpit-ostree that referenced this issue Mar 25, 2021
Also put the content of the 'Add new repository' modal into another
dialog. The previous dialog had too many forms inside.

Fixes cockpit-project#176
KKoukiou added a commit to KKoukiou/cockpit-ostree that referenced this issue Mar 25, 2021
Also put the content of the 'Add new repository' modal into another
dialog. The previous dialog had too many forms inside.

Fixes cockpit-project#176
KKoukiou added a commit to KKoukiou/cockpit-ostree that referenced this issue Mar 25, 2021
Also put the content of the 'Add new repository' modal into another
dialog. The previous dialog had too many forms inside.

Fixes cockpit-project#176
KKoukiou added a commit to KKoukiou/cockpit-ostree that referenced this issue Mar 26, 2021
Also put the content of the 'Add new repository' modal into another
dialog. The previous dialog had too many forms inside.

Fixes cockpit-project#176
@garrett
Copy link
Member Author

garrett commented Mar 29, 2021

Problems with the dialog:

  1. Add new repository is a link, but should be a button. However, then it would clash with the other buttons in the dialog.
  2. The inline editing is very weird and adds too much functionality in this dialog.
  3. Adding a new repository closes this dialog and brings forth another... and dialogs should never ever call another one.
  4. There's selection in the lists in the new PR, but this has nothing to do with selection... it has to do with which is active, not selected... selection is a temporary state to do something with an item, whereas active is a semi-permanent state.

However, redesigning this means we need to redesign the page itself so that it fits in properly too.

Here's a first start at that:

cockpit-ostree-2021-03-29(2)

I'm not very happy with the repository part yet, but this is better than what we have. There's probably a better set of widgets for it. Perhaps we really want to make it show only the current repository and make the editing behind some sort of disclosure widget or inline editing. I don't know. But the goal is to split apart the current repo dialog, so editing and adding can be their own separate dialogs, while the main part is not in a modal.

We could probably drop architecture from being visible and filter the branch to be the only arch (or arches if there is more than one) avaialble. But we don't have to worry about the i386/x86_64 split. Would we need to worry about an ARM HFP / AArch64 split though?

As for the … menus, the repository actions would be:

  • Edit, Set active, Delete

And the deployment actions would be:

  • Pin, Deploy, Delete
  • Unpin, Deploy, Delete

(In addition to the main action of update + reboot / roll back + reboot.)

We currently do not have pinning or unpinning capability in cockpit-ostree. This is how I think it would work, but it can be ignored and implemented later.

@garrett
Copy link
Member Author

garrett commented Mar 29, 2021

There are definitely some issues with the above mockup. The one that sticks out at me is that changing the branch probably would cause stuff to happen, so you'd have to confirm it somehow.

So, I think it is probably better if we just show informational stuff in the "OSTree source" card (or whatever we call it) and then go into a special inline edit mode for the entire card. Then you'd have to save it for it to be active. I guess. We'll have to spend more time on it. I wanted to communicate early thoughts on the design and the ideas behind it, even if it's not quite ready it.

But the rest should be pretty self-explanitory. The content of the expanded list should be the content of our current cards, even with the tabs, I guess. A big change is the information we bubble up to the list and using badges for marking things like new, active, pinned.

@garrett
Copy link
Member Author

garrett commented Mar 29, 2021

Here's how it would look like within Cockpit, using a PF4-like full page editing pattern (but with the editing action in the top-right, consistent with the rest of our card usage).

We aren't really editing things like this inline elsewhere in Cockpit, but it is a normal PF4 pattern.

Also, this is something that will not be changed often. And when it does, I think the OSTree list below needs to be refreshed, at least for the latest available item.

Default view mode

cockpit-ostree-2021-03-29(3)

Editing "OSTree souce"

cockpit-ostree-editing

This makes it kind of modal-like without having to dive into another page. And then the actual modals (to add and to edit) will pop up over this like normal dialogs.

@garrett
Copy link
Member Author

garrett commented Mar 29, 2021

I just realized that the list has to be more than just deployments if we're going to have the latest available there as well. Deployments are what's on the disk. The new one is something that's available but not deployed yet.

Perhaps "Deployments & updates"? And have only newer versions than what is deployed available? Or consider an update to an available deployment? Or is there better terminology for this?

If so, we it could look like this:

cockpit-ostree-update

@garrett
Copy link
Member Author

garrett commented Mar 29, 2021

Retrofit

Since having the status makes sense... why not retrofit this into something that resembles the PackageKit software updates?

cockpit-ostree-updates

Editing source

And editing the OSTree source would look like this:

cockpit-ostree-updates-edit-source

@garrett
Copy link
Member Author

garrett commented Mar 29, 2021

Finally looping back around to dialogs, as this is all so we can detangle the odd dialog. 😆

Add repo

cockpit-ostree-updates-add-repo

Edit repo

cockpit-ostree-updates-edit-repo

@garrett garrett changed the title Change repository modal is odd Redesign OSTree page (to fix "change repository" modal) Apr 12, 2021
@marusak
Copy link
Member

marusak commented Jan 31, 2023

@garrett What about these errors? How should we handle those?

Screenshot from 2023-01-31 11-05-36

@garrett
Copy link
Member Author

garrett commented Jan 31, 2023

I guess an error would go in the status area, unless it's contextual based on an action.

add-software-ostree-expanded-2023-01-30-1423 excalidraw

Regarding this error specifically:

  • Will updating still work with this error?
  • Is there a way to fix it?
  • Is there a way to ignore it?

@garrett
Copy link
Member Author

garrett commented Feb 13, 2023

Here's a higher def version I made in Penpot.

  • I've reordered things, in order of uniqueness and importance.
  • It now has headings, as it should.
  • I dropped the "and reboot" as it's necessary and redundant. We'll have a confirmation modal that opens and we can message about rebooting in there.
  • I split the version and bolded the first part, as it's the major release version.

OStree page(2)

@garrett
Copy link
Member Author

garrett commented Feb 22, 2023

Deployments and updates menu would have (at least) two items, clean up and reset:

Kebab menu-2

Clean up action would have a modal with things to clean up, with non-interferring items (basically just cache) pre-checked:

Clean up

Reset is kind of "destructive", as it changes what you have installed, but gets you back to a pristine deployment. You can remove packages added after the fact and those that have been swapped out (if someone was testing an alternate or adding an RPM as a one-off). But it's not fully dangerous (unless you expect those packages to be installed), hence a it's a warning and not a danger level. And items are not pre-selected. (The reset to original state would actually be disabled until something is checked.):

Reset overlays and overrides

Kebab menu for individual items would have pin (or unpin, if something is pinned) and delete:

Kebab menu

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

No branches or pull requests

2 participants