Skip to content
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

Theme: Add Row Height option (including "Compact") #1166

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

joepavitt
Copy link
Collaborator

@joepavitt joepavitt commented Aug 6, 2024

Description

  • Adds a new "Row Height" field to the UI Themes
  • Defaults to "Default (48px)"
    • Also provides "Comfortable (38px)" and "Compact (32px)
  • Originally tried to do this solely through Vuetify's "Density" property, but it sizes heights very inconsistently for each widget, plus it didn't cover our own custom widgets
    • Ended up still setting this in Baseline.vue, but had to add in overrides for ui-button as that behaves differently to all others.
  • Consistency in use of widget-row-height CSS variable to drive row height (and inheritance into widgets)
  • Add in documentation for the new "Row Height" option

Related Issue(s)

Closes #1095

Examples

Default

Screen.Recording.2024-08-06.at.16.53.32.mov

Comfortable

Screen.Recording.2024-08-06.at.16.54.32.mov

Compact

Screen.Recording.2024-08-06.at.16.54.56.mov

@joepavitt joepavitt requested a review from gayanSandamal August 6, 2024 16:26
@joepavitt
Copy link
Collaborator Author

joepavitt commented Aug 6, 2024

Perhaps the most noticeable differences is in the UI Table (cc @thebaldgeek - know this'll be of interest for you)

Compact

Screenshot 2024-08-06 at 17 28 00

Comfortable

Screenshot 2024-08-06 at 17 27 48

Default

Screenshot 2024-08-06 at 17 28 15

@thebaldgeek
Copy link

Thanks for the tag, it does look interesting.
Have you tested it on mobile? I wonder how the (card) view looks on the smaller screen.
BTW, I could not use this ui_table node on the website since it only displays 10 rows before the uncontrollable pagination cuts in and makes the table take up a ton more height and sort of breaks mobile view.
Great to see some progress to reducing the default jumbo size.

@joepavitt
Copy link
Collaborator Author

before the uncontrollable pagination cuts in

It is very controllable via the "Max Rows" option:

https://dashboard.flowfuse.com/nodes/widgets/ui-table.html#pagination

Copy link
Contributor

@gayanSandamal gayanSandamal left a comment

Choose a reason for hiding this comment

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

This looks good to me

@gayanSandamal gayanSandamal merged commit ea226f8 into main Aug 8, 2024
1 of 2 checks passed
@gayanSandamal gayanSandamal deleted the 1095-compact-view branch August 8, 2024 09:57
return {
rowHeight: 45
rowHeight
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this causes a change in the default width of the Fixed items, meaning users will need to narrow their groups

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.

Theme: Compact View
3 participants