-
Notifications
You must be signed in to change notification settings - Fork 86
experiment: add dialog base styles and visual tests #9438
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
base: main
Are you sure you want to change the base?
Conversation
e1baa6f
to
1ab2729
Compare
1ab2729
to
654b885
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.
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. |
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.
Let's consider reviewing #9486 and then rebasing this PR once that one is merged.
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.
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.
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 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