experiment: add dialog base styles and visual tests#9438
Conversation
e1baa6f to
1ab2729
Compare
1ab2729 to
654b885
Compare
web-padawan
left a comment
There was a problem hiding this comment.
Rebased and force-pushed to work after some core styles refactoring on main branch.
packages/dialog/src/styles/vaadin-dialog-overlay-base-styles.js
Outdated
Show resolved
Hide resolved
6e7938b to
42784d0
Compare
Thanks. Actually, that checkbox sets the height, I just forgot to update the label when I copied it. And setting the height of the dialog triggers the size container and size containment, which ends up collapsing the width. I can fix this if I remove this if statement here, and always set the original bounds when resize is initiated: web-components/packages/dialog/src/vaadin-dialog-resizable-mixin.js Lines 75 to 77 in f2fec4a I’m not sure what this optimization accomplishes. |
For the record, I ended up removing this feature (2a9aedd), as it’s likely unexpected for users/designers/developers. It’s probably better to leave this type of behavior for app-specific styles. Alternatively, we should flesh out the feature properly, how it could behave more robustly. |
Added back in vaadin/vaadin-dialog@37a460c - apparently it was supposed to be only called on first drag / first resize. |
Right. Would be great to find out what the original issue was. I didn't notice any immediate downsides, but who knows, might be some weird edge case. |
4ad6f0b to
36b30d5
Compare
|
But regardless of the original issue, the size of the dialog should become fixed when the users drags it. Also, the size can become fixed in both directions when the user resizes either the width or the height. |
Checked the review comments and couldn't find any issue that was referring to this change specifically 🤷♂️ |
This allows overflow to be visible when there's no need for a scroll container.
|
@web-padawan, any idea why the visual tests fail? |
|
Looks like I handled rebase incorrectly, pushed a fix to import overlay base styles from the correct location. |
web-padawan
left a comment
There was a problem hiding this comment.
Let's consider reviewing #9486 and then rebasing this PR once that one is merged.
web-padawan
left a comment
There was a problem hiding this comment.
One more thing which is demo-page specific: on main branch, when you open a dialog, then drag it, close and reopen, it will use the previous position. In the new dev page, every button click opens another dialog, which isn't immediately obvious. Not sure if we should spend time changing this.
web-padawan
left a comment
There was a problem hiding this comment.
LGTM overall, but maybe someone else from the team should also review before merging.
|




Supported custom properties
--vaadin-dialog-background--vaadin-dialog-border-width--vaadin-dialog-border-color--vaadin-dialog-border-radius--vaadin-dialog-box-shadow--vaadin-dialog-min-width--vaadin-dialog-max-width--vaadin-dialog-title-color--vaadin-dialog-title-font-size--vaadin-dialog-title-font-weight--vaadin-dialog-title-line-height--vaadin-dialog-padding--vaadin-dialog-toolbar-gap