-
Notifications
You must be signed in to change notification settings - Fork 83
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
feat: add colspan support to dashboard #7657
Conversation
Quality Gate passedIssues Measures |
*/ | ||
__updateItemMaxColspan() { | ||
// Temporarily set max colspan to 1 | ||
this.style.setProperty('--_vaadin-dashboard-item-max-colspan', 1); |
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 seems to cause flickering when resizing.
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.
Screen.Recording.2024-08-16.at.12.48.39.mov
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.
Sure, a ResizeObserver
isn't synchronous (and there is no CSS-only way to implement the colspan capping). We can later try to improve this by, for example, wrapping the content inside another container that we manually resize to match the host's size.
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 added an issue for this to the ideas column.
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.
wrapping the content inside another container that we manually resize to match the host's size
Did a quick prototype of this here https://github.com/vaadin/web-components/tree/proto/dashboard-container and it does eliminate the flickering
Description
Add column spanning support for
<vaadin-dashboard-layout>
Kapture.2024-08-16.at.09.33.16.mp4
Added API:
--vaadin-dashboard-item-colspan
: Applied to a child element of a dashboard layout. Affects its column span in the layout grid.Fixes https://github.com/orgs/vaadin/projects/70/views/1?pane=issue&itemId=74625129
Part of vaadin/platform#6626
Type of change
Feature