Skip to content

Header styling & paper-tabs improvements#7238

Merged
bramkragten merged 48 commits intohome-assistant:devfrom
maykar:header-styling
Oct 15, 2020
Merged

Header styling & paper-tabs improvements#7238
bramkragten merged 48 commits intohome-assistant:devfrom
maykar:header-styling

Conversation

@maykar
Copy link
Contributor

@maykar maykar commented Oct 6, 2020

Proposed change

This changes the styling of the header across most of the frontend. It removes the large amount of space on the left side of the screen and allows tabs to span the width of the header.

Additionally, this adds an ha-tabs element to modify paper-tabs. It adds:

  • Optimized space for scroll arrows (keeps them "inside" the scrolling container element and only take up space when needed)
  • Tweaks to scrolling to make it fluid (no jumping while scrolling when scroll arrows hide/show).
  • Scrolls active tab into view if needed.

This is also to help pave the way for compacting the header later on.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

drawing

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten
Copy link
Member

bramkragten commented Oct 6, 2020

The main-title needs margin left when there is no button, I think 16px.

@maykar
Copy link
Contributor Author

maykar commented Oct 6, 2020

For main-title I only removed app-toolbar ha-menu-button + [main-title]

This remains

  app-toolbar ha-icon-button-arrow-prev + [main-title],
  app-toolbar ha-icon-button + [main-title] {
    margin-left: 24px;
  }

@bramkragten
Copy link
Member

For main-title I only removed app-toolbar ha-menu-button + [main-title]

This remains

  app-toolbar ha-icon-button-arrow-prev + [main-title],
  app-toolbar ha-icon-button + [main-title] {
    margin-left: 24px;
  }

Yes, but the [main-title] was never shown with an element in front. The title should align with the tabs.

Copy link
Member

@bramkragten bramkragten left a comment

Choose a reason for hiding this comment

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

Looks good!

@bramkragten
Copy link
Member

Checking the material guidelines, I wonder we can could offset the items, or show an icon to show that there are more items

https://material.io/components/tabs#scrollable-tabs

maykar and others added 2 commits October 14, 2020 17:44
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
maykar and others added 6 commits October 14, 2020 18:34
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
@bramkragten bramkragten merged commit ce80285 into home-assistant:dev Oct 15, 2020
@poldim
Copy link

poldim commented Oct 15, 2020

@maykar are you sure you meant fixes #7107? That wasn’t about the header but rather page layout.

BTW, I’m hoping hiding the header is made into the core since CCH is no longer supported!

@maykar
Copy link
Contributor Author

maykar commented Oct 15, 2020

Commented on the original issue, it was a misunderstanding on my part, tagged bram to reopen.

@maykar maykar mentioned this pull request Oct 17, 2020
9 tasks
@bramkragten bramkragten mentioned this pull request Oct 21, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants