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

Header & sidebar toggle on mobile - styling cleanup #8906

Open
5 tasks
Tracked by #9228
lb- opened this issue Jul 26, 2022 · 7 comments
Open
5 tasks
Tracked by #9228

Header & sidebar toggle on mobile - styling cleanup #8906

lb- opened this issue Jul 26, 2022 · 7 comments

Comments

@lb-
Copy link
Member

lb- commented Jul 26, 2022

Is your proposal related to a problem?

  • Currently the header layout relies on a mix of floats and position absolute to ensure that it has the correct column layout and also so that it does not overlap with the sidebar 'small' variant (a single absolute positioned button).
  • Also, as noted, the sidebar relies on absolute positioning when on small screens, this is actually not working correctly on Safari and the content comes down part way on the screen.
  • Finally, these two issues create some potential problems when there is a page message (error/success) on small devices.

Describe the solution you'd like

  • For the header, it would be good to avoid floats, we can now reliably use CSS grid OR CSS Flexbox to achieve the column layout, this also makes it easier to adopt RTL styles in more places.
  • For the sidebar positioning, find a way to either avoid the absolute positioning OR ensure that the styles required for the header content are not having to be duplicated in every variant of the header (slim header, breadcrumbs if present etc - all need a 50px gap just in case).
  • It might also be good to review the page wide padding left/right on reports page of 50px - it is likely this was added just to work around the side bar issue on small devices.

Describe alternatives you've considered

  • Leave as is, it is mostly working right now, just very hard to maintain and super easy for new code to cause problems where the sidebar button is shown 'over' any header content.

Additional context or ideas

  • Not sure if it is possible, but ideally the sidebar button would be positioned 'inline' inside the header container so that all other header content wraps around it.
  • Maybe the header element needs to move in the DOM to account for the sidebar content being there and then it contains a fixed side margin or padding on small devices to account for the sidebar toggle position.

Screen Shot 2022-07-26 at 11 31 31 pm

Screen Shot 2022-07-26 at 11 31 06 pm

Screen Shot 2022-07-26 at 11 33 35 pm

Requirements

  • Replace any floats & clear usage in the shared header styling with either flexbox or css grid
  • Remove all position absolute usage in the shared header AND slim header, remove the padding left 50px set throughout header items including breadcrumbs & then ensure the sidebar toggle still shows correctly with not overlapping header content.
  • Set up a variable, if needed, for the sidebar toggle, so that if we do still need that 50px value - we are not hard-coding it everywhere, but have it linked to a SCSS variable for tracing the 'purpose' of this.
  • Remove the side 50px padding on report pages but still ensure content shows correctly
  • Resolve any styling conflicts when page messages exist (top of page) - may just be Safari - check the Styleguide screenshot above for a reference

Related issues and PRs

@lb-
Copy link
Member Author

lb- commented Jul 28, 2022

Related to #8126

@lb-
Copy link
Member Author

lb- commented Aug 8, 2022

See also
#8449
#8125

@lb- lb- changed the title UX Unification - header & sidebar styling fixes Header & sidebar styling cleanup Sep 10, 2022
@lb- lb- changed the title Header & sidebar styling cleanup Header & sidebar toggle on mobile - styling cleanup Sep 10, 2022
@lb-
Copy link
Member Author

lb- commented Sep 19, 2022

Reviewed - this would be a great improvement to the UI as the mobile toggle causes constant issues in its current state with CSS work-arounds required for many header scenarios that only partially fix the problems.

@akshay-gupta7
Copy link

@lb- , can I get started on this

@lb-
Copy link
Member Author

lb- commented Sep 27, 2022

@akshay-gupta7 this may be quite a tricky one - unless you are very confident with CSS

@shindodkar
Copy link

@lb- is it still open

@lb-
Copy link
Member Author

lb- commented Aug 2, 2023

@shindodkar - yep, no movement on this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Ready
Development

No branches or pull requests

3 participants