Skip to content

Dashboard style update #8962

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Dashboard style update #8962

wants to merge 17 commits into from

Conversation

rolfsmeds
Copy link
Contributor

Description

  • Elevated and Flat style variants
  • Shaded background variant for board itself
  • Wrapping title support (and a style prop for disabling wrapping)

Fixes #8961
Fixes #8706

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/pr
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.
  • I have not completed some of the steps above and my pull request can be closed immediately.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.


:host::before {
content: '';
display: block;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, but this is not required, as absolute/fixed positioned elements become block containers automatically.

Suggested change
display: block;

* `--vaadin-dashboard-item-rowspan` | rowspan of the widget
* Custom Property | Description
* --------------------------------------------|----------------------
* `--vaadin-dashboard-item-colspan` | colspan of the widget
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we align the naming for all the properties to maybe use --vaadin-dashboard-item-xyz?

@ugur-vaadin
Copy link
Contributor

We should probably add some visual tests for the themes.

* `--vaadin-dashboard-widget-shadow` | widget shadow (non edit mode)
* `--vaadin-dashboard-widget-editable-shadow` | widget edit mode shadow
* `--vaadin-dashboard-widget-selected-shadow` | selected widget shadow
* `--vaadin-dashboard-widget-padding` | padding around widget content
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add the new properties to the TS file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added them.

}

[part='title'] {
flex: 1;
color: var(--lumo-header-text-color);
margin: 0;
white-space: nowrap;
white-space: var(--vaadin-dashboard-widget-title-wrap, wrap);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be missing from the property list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this property.

@ugur-vaadin
Copy link
Contributor

We should probably add some visual tests for the themes.

Added some tests. Can you check the baseline images @rolfsmeds ?

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elevated and Flat Dashboard Widget styles Dashboard: style variant for wrapping widget titles
3 participants