-
Notifications
You must be signed in to change notification settings - Fork 4.4k
[VAULT-35871] UI: Address design UI feedback on namespace picker #30571
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
Conversation
CI Results: |
…getting the width.
73be9a6
to
4c1276f
Compare
Build Results: |
@extend .truncate-second-line, .is-word-break; | ||
white-space: normal; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work and creative solution! My main concern is not having a max width set and forever expanding to the widest namespace. But perhaps there's a css class I missed that covers this.
Also, just a nit about naming css classes 🙃
@@ -23,6 +23,11 @@ | |||
padding: size_variables.$spacing-36; | |||
} | |||
|
|||
.has-side-padding-4 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the updated pattern for new css classes is to drop has-
or is-
[docs]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wonder if it might make sense to move some of these helpers to the namespace-picker.scss
file. I'll defer to your judgement, just a thought 💭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching this!! I was following the existing patterns in the spacing file, but that makes sense to not add new css classes following the old pattern. 🎉
I could be convinced either way. If we moved them into namespace-picker.scss
they would still have the generic spacing css class names (like top-padding-10
instead of something like namespace-picker__{element}
) since they are reused throughout the file. So, if no one has a strong opinion, I think it makes sense to keep them in spacing.scss
file.
const namespaceLinks = document.querySelectorAll('[data-test-namespace-link]'); | ||
namespaceLinks.forEach((checkmark: Element) => { | ||
const width = (checkmark as HTMLElement).offsetWidth; | ||
if (width > maxWidth) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this wrap at any point or will it always expand to the longest namespace? Wondering if we should have/need some sort of max limit 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for confirming
|
||
@use '../helper-classes/general'; | ||
|
||
.namespace-picker { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call on making this a component specific css file and class! 🎉
) * [VAULT-35871] UI: Address design UI feedback on namespace picker * remove unused css class * dynamic width based on namespace length; not help messages * handle long namespace name - truncate the second line * hide/show message element so that it doesn't affect the layout while getting the width. * add cop 6BF8 yright header to scss file * address PR comments & additional design feedback * fix syntax error * address more design feedback: use small buttons
Description
Address design UI feedback on namespace picker:
Screenshots: