Modernise sensor summary and remove Gin specific selectors

Created on 17 June 2024, 10 months ago

Problem/Motivation

I had the same issues with the current stable with Gin, I do see 🐛 The display is broken with gin Fixed has addressed it, albeit with Gin specific selectors.

Steps to reproduce

Proposed resolution

I think we can do without the specific selectors, by ridding ourselves of the CSS floats, and adopt flexbox.

Though this resolution does change the markup of the summary template, and the used CSS, it does retain the existing variables

Switches:

  • CSS selector structure, componentized
  • Markup structure, suitable for better customisation
  • Switched statuses to a "pill" style with more modern colors than the plain square box.
  • Balances out the layout into a 2+2 or stacked in small screen. Consistent spacing, better margins compatible with Gin.
  • Switches out twig trans tags

Remaining tasks

Nil.

User interface changes

Yes.

API changes

Modified template/translation strings/css.

Data model changes

Nil

Feature request
Status

Active

Version

1.0

Component

User interface

Created by

🇦🇺Australia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dpi
  • 🇦🇺Australia dpi Perth, Australia
  • 🇦🇺Australia dpi Perth, Australia
  • Merge request !16Resolve #3455062 "Modernise sensor summary" → (Open) created by dpi
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • 🇦🇺Australia dpi Perth, Australia
  • 🇦🇺Australia dpi Perth, Australia

    The pill markup adds quite large diffsize. Willing to do away with it and stick to a simplified version if we can keep the markup and layout/flexbox pieces, so we can potentially use the markup+selectors in extended/custom themes.

  • Pipeline finished with Failed
    10 months ago
    Total: 281s
    #200912
  • 🇦🇺Australia dpi Perth, Australia

    The code is looking less insane with this revision.

  • Pipeline finished with Failed
    10 months ago
    Total: 327s
    #201777
  • First commit to issue fork.
  • 🇨🇭Switzerland berdir Switzerland

    Hi, thanks for this. It certainly looks much better, thanks for working on this. I discussed it a bit with a colleague, our thoughts:

    * The colored pills text on background color is not accessible and especially green is barely readable. Based on our testing, I think I'd prefer to keep the text color black, then contrast is fine.
    * It looks bigger on your screenshots, but on claro, the text is tiny and also on larger screens far off to the right:

    Thinking about it, I think the important parts are actually the status summary (the pills) and the buttons. the cache/execution time is not the most important thing to see at first glance. So maybe we could invert the position to what it is now? And instead of completely right aligned I think we should have the two the right just follow with a bit of margin? a quickfix is to not do a text align right, it's a somewhere in the middle then.

    On text size, I prefer to have them in regular text size.

    I even wondered about moving the cache/execution time info to after the table and not doing any flex at all. it is kind of related with the execute all button though.

    Would then look something like this for me, but there might be better ways than my quick hacks, especially for the position. And instead of a pure css order, maybe we should rearrange the render array?

  • 🇦🇺Australia dpi Perth, Australia

    Hoping to revisit this with D11 upgrades, but that could end up being any time this year.

Production build 0.71.5 2024