sentry icon indicating copy to clipboard operation
sentry copied to clipboard

ref(selectoption): Tweak list items alignment

Open priscilawebdev opened this issue 1 year ago • 9 comments

Before:

When no item is selected, the alignment of the items looks odd — they are shifted to the right

image image

After:

image image image

priscilawebdev avatar Aug 01 '24 12:08 priscilawebdev

I think the current version looks normal. It's that way due to a combination of 2 design constraints. The first is establishing and maintaining minimal keylines. The new version breaks that by introducing a second keyline to the menu, making the menu less tidy and skimmable: image The second is avoiding layout/location shifts. The new version also breaks that by shifting the selected element label's x-position upon selection. Screenshot 2024-08-01 at 2 50 46 PM Screenshot 2024-08-01 at 2 51 09 PM A hypothetical, alternative solution could be: no left padding when no element is selected, but left paddings for all elements when at least one element is selected. This solution would satisfy the first constraint about key lines, but still fail the second. That's why we ended up with the current version, which again I don't think is abnormal.

vuluongj20 avatar Aug 01 '24 21:08 vuluongj20

@vuluongj20 thanks for your review! I wasn’t aware that we were following the Material Design guidelines, so it was great to read through them. I understand now why there’s empty space on the left of the menu items when nothing is selected. However, it still feels a bit strange to have that space.

what about we display the icon next to an empty row as the following:

https://github.com/user-attachments/assets/d40139d7-1aef-48e9-a3da-f91a3790d288

I am also interested to know your opinion on the '+' icon next to the 'Create' word

priscilawebdev avatar Aug 02 '24 08:08 priscilawebdev

@priscilawebdev Hmm I'd be supportive of that if we also added a label "None"/"None selected" label, otherwise I wouldn't know what the white space meant: image

vuluongj20 avatar Aug 02 '24 17:08 vuluongj20

Bundle Report

Changes will increase total bundle size by 218 bytes :arrow_up:

Bundle name Size Change
app-webpack-bundle-array-push 28.64MB 218 bytes :arrow_up:

codecov[bot] avatar Aug 05 '24 14:08 codecov[bot]

@vuluongj20 what do you think?

https://github.com/user-attachments/assets/020daf99-f915-4355-a0fb-92808eac7011

priscilawebdev avatar Aug 07 '24 10:08 priscilawebdev

@priscilawebdev If we go with an additional option for no value, I would render it as disabled.

ArthurKnaus avatar Aug 07 '24 13:08 ArthurKnaus

@priscilawebdev I'd prefer "None selected"/"None" over "Select span attribute". Having "None" as a the first makes it extra clear what it stands for. "Select span attribute" sounds like a call to action rather than a value state.

vuluongj20 avatar Aug 07 '24 22:08 vuluongj20

Looks great otherwise!

vuluongj20 avatar Aug 07 '24 22:08 vuluongj20

@ArthurKnaus @vuluongj20 Thank you for the reviews 🙏 I have applied your suggestions!

https://github.com/user-attachments/assets/6814d745-50ab-4b79-9d91-bbe8a1febbfd

priscilawebdev avatar Aug 08 '24 09:08 priscilawebdev