brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 45 forks source link

Improve UI for save as, rename, and import dialogs. #379

Closed asolove closed 3 years ago

asolove commented 3 years ago

This PR improves UI styling, a11y, visual hierarchy, and some micro text for three of the CPO modal dialogs.

(After starting work on other modals, they require enough thinking that they need to be in separate PRs.)

Scope

Global dialog improvements

Individual dialogs

Preview

Save As / Rename

Production: image

With this PR: image

Import image

Production: image (Code samples show like this, even when only 1 or 2 files selected.)

With this PR: Code samples change depending on number of files selected.

jpolitz commented 3 years ago

I like all the changes above!

I don't have data on this, but I would bet a small amount that the number people who have used the [list: ...] option in that import dialog is in the single digits. The first two are by far the most common. I suspect we could eliminate that option to simplify things.

Edited to add – and anyone who is sophisticated enough to want the list option doesn't really need it.

sorawee commented 3 years ago

The list with one element option also looks kinda useless.

shriram commented 3 years ago

Wow. Who knew this could be this nice.

asolove commented 3 years ago

I was going to ask about usage of the import options and any feedback folks had heard.

I agree the single file case looks a bit odd right now, but here's the weird chain of thinking that led me there:

All of this thinking in circles led me to offering all options all the time, though some of them are more sensible than others. Moving further in this direction, we might also consider inserting single image values at the current cursor location rather than a new line, if you want to specifically import the file inside an existing expression.

But I could see an equally-strong argument for just removing this step and always using values and letting users figure out variable names or additional structure themselves.

asolove commented 3 years ago

Note: after starting to think about the tricky bits of the publish dialog, I'm going to cut scope of this one to just the current set (save as, rename, and insert image) and start the publish work in another issue.

shriram commented 3 years ago

Just a comment that this is a good argument for leaving the list import option. I also think it has the benefit of inspiring ideas — e.g., you realize you can list-import, so you create a bunch of images to import that way (for instance, to make a zoetrope). TBH, I had forgotten/not realized you can do a list import until I saw the GUI proposal…

jpolitz commented 3 years ago

Fair enough @shriram . I guess list is handy if you navigate to a directory, cmd/shift select a bunch. Doing values and inserting the [list: ..., ..., ...] would be annoying because of all the commas. Probably really magical for those <10 people :-)

asolove commented 3 years ago

Hey all! The perfect is the enemy of the good, and I think this branch is now a clear enough improvement over the current state that I'd like to get it into Horizon.

Let me know if y'all have any objections or suggestions.

jpolitz commented 3 years ago

I'm going to merge and so we can poke at it on horizon and give any feedback after. This is a pretty clear improvement, thanks!