-
Notifications
You must be signed in to change notification settings - Fork 86
experiment: add multi-select-combo-box base styles and visual tests #9608
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
35a623a
to
de8c921
Compare
@@ -27,6 +27,7 @@ class MultiSelectComboBoxContainer extends InputContainer { | |||
display: flex; | |||
width: 100%; | |||
min-width: 0; | |||
gap: var(--_wrapper-gap); |
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.
Added reset for this custom CSS property to Lumo as otherwise it breaks visual tests.
Moving this CSS to styles
folder is also an option but that sounds like an overkill.
@jouni I ended up changing |
309b8d9
to
71c7867
Compare
Yeah, that’s good. I think I didn't fully understand the behavior of how the sizes are computed and how the min-widths affect that. |
@@ -69,7 +69,6 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin. | |||
* `--vaadin-field-default-width` | Default width of the field | `12em` | |||
* `--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto` | |||
* `--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh` | |||
* `--vaadin-multi-select-combo-box-chip-min-width` | Min width of the chip | `50px` |
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.
This is now only used by Lumo so I think we should either remove it from API docs (as it has no effect on base styles) or make a separate PR for renaming it also in core / Lumo styles. Not sure which is better.
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 suppose we could also keep it working in base styles, but remove it from the docs or mark it deprecated.
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 restored it for now to avoid unintentional breaking change but IMO it's ok to remove it from API docs.
I think we need to go through the JSDocs of all components and update the custom property lists. For example, I didn't add properties for multi-select-combo-box specifically, it just uses the same as combo-box. |
Good point about API docs. Created #9617, will link actual PRs with base styles to that issue. |
8b91a23
to
7d88fb0
Compare
b286e8b
to
1cc873a
Compare
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.
LGTM but it would be good to have another review as I also made some modifications in the PR.
|
Supported custom properties
The chip properties are not “scoped” to the just MSCB, as this component might be useful in the future in other places as well.
--vaadin-chip-min-width
--vaadin-chip-gap
--vaadin-chip-padding
--vaadin-chip-background
--vaadin-chip-color
--vaadin-chip-font-size
--vaadin-chip-font-weight
--vaadin-chip-height
--vaadin-chip-border-radius
--vaadin-chip-border-width
--vaadin-chip-border-color
--vaadin-chip-remove-button-color