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

storage: Action redesign #19882

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Jan 24, 2024

  • Erase dialog: No overwriting
  • Partition table dialog: Use radio buttons
  • Move "Format as swap" code back into generic format dialog code, allow encryption.
  • Everywhere: drop "/dev/" prefix
  • tests, coverage

Action redesign for Storage

Demo: https://youtu.be/BkDCAOvOPVc

Goals:

  • Simplify the "Format" dialog. It does too much.

    Especially, don't require people to figure out that they need to
    use it with type "No filesystem" to wipe a block device before they
    can use it as a LVM2 physical volume, etc.

Design:

  • Have "primary" actions. Only those will be a button in a non-mobile card. Everything else is in the menu.
  • Move "Format" to the card that will not change, like Partition, Drive, Logical volume. This makes more sense.
  • Move "Lock" and "Unlock" to "Encryption" card. This also makes more sense.
  • Remove "Unformatted data" and "Locked data" cards.
  • New "Add encryption" action to create empty LUKS devices. This would only be offered for empty block devices, you can't add encryption to existing filesystems.
  • Offer "Format" also on "Encryption" card and remove "keep" logic from format dialog. (Formatting from Encryption card would not offer encryption options at all.)
  • Move "no partition table" and "no filesystem" into new "Erase" dialog. Don't use "initialize" term anymore. Keep "no filesystem" for "create partition" dialog only, and move it to the top of the dropdown and make it default. Move "Type" after "Size".
  • Only offer "Format" and "Create partition table" for unformatted block devices, offer "Erase" else. Make Format and CreateP non-dangerous and primary actions.
  • Also offer "Create partition" on PartitionCard. This will pick the first free space that is big enough for the requested size. Make it a primary action.
  • Add "Format as swap" action. Don't let people create encrypted swap.

@mvollmer mvollmer added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Jan 24, 2024
And make "Mount" and "Create new logical volume" primary actions.
Offer it on the "Partition" card instead of the "Filesystem" card, for
example.

This makes more sense. One formats a partition, but mounts the
filesystem.
That's where they belong. Filesystems are still automatically locked
and unlocked when mounting and unmounting them.
This allows us to make the format dialogs non-dangerous and primary,
and give them more descriptive names.

The "Create partition" version of the "Format" dialog now defaults to
"empty", and "empty" can not be encrypted. This makes it a very simple
dialog.
@mvollmer
Copy link
Member Author

mvollmer commented Apr 8, 2024

@garrett, what do you think of this? There is a demo: https://youtu.be/BkDCAOvOPVc .

One point I didn't make in the demo: The awkward "Unformatted data" and "Locked data" cards are gone.

@jelly
Copy link
Member

jelly commented Apr 8, 2024

Some things from my side:

It looks interesting!

  • Instead of Format as swap, maybe, Create swap partition? Although I guess you can format a whole /dev/sda as swap?

  • I would list both Format actions next each other.

  • Add encryption feels a bit weird, I understand what you mean, but I am not sure if others do. It feels that this action would be to "add encryption" to a Filesystem. Maybe something easier? Encrypt disk, Add disk encryption, I understand that this acts on a disk so maybe it is logical after all. (Also this can handles LVM logical volumes as well so we can't put disk in there). So in the end, maybe it is just fine as is :)

  • Format cleartext device - This is feels like a lot of technical jargon, for a user this just means format $encrypted_device so maybe we can keep it as Format device?

@mvollmer
Copy link
Member Author

mvollmer commented Apr 9, 2024

Here is a mockup from Garrett:

image

@mvollmer
Copy link
Member Author

mvollmer commented Apr 9, 2024

It looks interesting!

Thanks, yes! And I exactly share your concerns!

  • Instead of Format as swap, maybe, Create swap partition? Although I guess you can format a whole /dev/sda as swap?

Hmm. We could add "swap" as a type to the "Create partition dialog". It can do more than filesystems anyway, like "biosboot" etc.

I really wanted to have "Format as filesystem" as the action title, and then we can't have anything else but filesystems in it. And if we want to still allow people to make swap on arbitrary block devices, we need a "Format as swap" action.

  • I would list both Format actions next each other.

Yes, I was going back and forth on the menu order many times, exactly because I wanted the two "Format as ..." next to each other. But "Add encryption" is argueably more important than formatting swap, so... I really don't know.

  • Add encryption feels a bit weird,

Absolutely. I am not happy about the wording.

I understand what you mean, but I am not sure if others do. It feels that this action would be to "add encryption" to a Filesystem. Maybe something easier? Encrypt disk, Add disk encryption, I understand that this acts on a disk so maybe it is logical after all. (Also this can handles LVM logical volumes as well so we can't put disk in there). So in the end, maybe it is just fine as is :)

"Format with encryption only"? This could give the idea that other actions can also use encryption.

  • Format cleartext device - This is feels like a lot of technical jargon, for a user this just means format $encrypted_device so maybe we can keep it as Format device?

"Format as encrypted filesystem"?

"Erase encrypted device"?

This is a good PR for a user study...

It's not a secure erase by any means.
Use radio buttons, and only offer MBR when it will work.
@mvollmer
Copy link
Member Author

So I start to have doubts about making "Erase" and "Format" mutually exclusive. It just forces people to do in two steps what the tool can actually do in one. I still think it's good to have a dedicated "Erase" action and dialog, but we shouldn't hide "Format as ..." until people have done the Erase.

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.

None yet

2 participants