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

GH-101/FP-1458: Header Redesign #222

Draft
wants to merge 142 commits into
base: main
Choose a base branch
from
Draft

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented May 12, 2021

To Do

Warning
The main branch has changed drastically since work on header redesign began.

✓ Before Small-Screen UI Design
  • large-screen
    • support on unedited Portal and Docs
    • fix bugs
  • small-screen (designed by dev)
    • design (by developer)
    • implement design
    • support on unedited Portal and Docs
    • fix bugs
✓ After Small-Screen UI Design
  • small-screen
    • re-style menu toggles
    • position menu toggles
    • position menu content
    • re-style menu content
→ After Small-Screen UI Design Review
  • small-screen
    • implement UI/UX changes
    • fix bugs
→ Clean Up Code
  • abandon support for unedited Portal and Docs
    • small-screen menu toggles
    • small-screen anything else
    • large-screen anything else
  • remove gh-101 class and usage
  • polish so component-ization can be pushed off until later
→ Merge in Sub-Branches
  • task/GH-101-header-redesign
    • task/GH-101-header-redesign--mobile-nav-layout-2
… Clean Up PR Desc
  • update screenshots
  • review "Notes"

Overview

Redesign the header.

Related

Note to Self
  • Estimated Completion Time: 2 weeks
  • Actual Completion Time: 4+ weeks

This difference is almost made up for by #264. Progress has been delayed by other work.

Changes


all pull requests

* fixes & polish

complete changelog
  • New: Add more future-compatible CMS support:
  • New: Import env() vars for all themes (ea43ec9)
  • New: Install merge-lite (ea43ec9)
  • New: Remove "freeze variables" (faab92b, 54635b6)
    • new searchbar design does not need them
    • new env() support replaces them
  • Minor: Add misc. helpful comments
  • Minor: Add more CSS plugin tests (ebeebe5, dc4f7db)
  • New: Add new components:
    • c-branding
    • c-logo
  • New: Redesign Search bar
  • New: Backwards compatibility for backdrop-filter (dc4f7db)
  • New: Add @custom-media for navigation breakpoints (59a97d3)
  • New: Add new mixins (in "tools"):
    • x-arrow
    • x-hide
    • x-mobile-button
  • Doc: Add missing Readme for trumps
  • New: Add docs-specific and portal-specific header-dependent stylesheets
  • New: Redesign Portal and CMS navs
  • Minor: Update s-portal-nav sample markup (to reflect future Portal markup)
  • New: Add new utilities (in "trumps"):
    • u-hide
  • Doc: Document themes
  • Minor: Import all icon styles
  • Doc: Describe site assets required by subsites
  • New: Add [data-status="loaded"] after Portal nav load (for styling) (e38594d)
  • Minor: Remove Frontera-specific stylesheets
  • Untracked: Changes after 1248117.

Screenshots

⚠️ Out of date!

Hover over an image to see a description (on desktop browser).

Wide Screen (1200px)

⚠️ Out of date!

Docs (Logged Out)

(No State)
Docs [Wide] (No Auth)

CMS (Logged Out)

CMS Nav: Link (Hover) | Dropdown (Open) | Dropdown Item/Link (Hover)
CMS [Wide] (No Auth) - CMS Nav - Link HoverCMS [Wide] (No Auth) - CMS Dropdown - OpenCMS [Wide] (No Auth) - CMS Dropdown - Item Hover

Portal (Logged In)

Portal Nav: Closed | Link (Hover) | Open
Portal [Wide] (Authed)Portal [Wide] (Authed) - Portal Nav - Link HoverPortal [Wide] (Authed) - Portal Nav - Open

Portal (Logged Out)

Portal Nav: Closed | Link (Hover)
Portal [Wide] (No Auth)Portal [Wide] (No Auth) - Portal Nav - Link Hover

Narrow Screen (768px)

⚠️ Out of date!

Docs (Logged Out) — CMS Nav & Login Link & Search Field

(No State)
Docs [Narrow]

Nav Open: Close Button (Hover) | CMS Link (Hover)
Docs [Narrow] - Nav - OpenDocs [Narrow] - Nav - Open - Close HoverDocs [Narrow] - Nav - Open - CMS Nav - Link Hover

Dropdown Open: CMS Link (Hover) | CMS Dropdown Item/Link (Hover)
Docs [Narrow] - Nav - Open - CMS Nav - Dropdown Open & Link HoverDocs [Narrow] - Nav - Open - CMS Nav - Dropdown Open & Item Hover

Dropdown Open: Login Link (Hover) | Search Field (Focus) | Search Field (Input)
Docs [Narrow] - Nav - Open - CMS Nav - Dropdown Open & Login HoverDocs [Narrow] - Nav - Open - CMS Nav - Dropdown Open & Search FocusDocs [Narrow] - Nav - Open - CMS Nav - Dropdown Open & Search Input

Dropdown Open
Docs [Narrow] - Nav - Open - CMS Nav - Dropdown Open

CMS (Logged In) — Portal Nav

Nav Open
CMS [Narrow] - Nav - Open

Nav Open: Link (Hover) | Dropdown (Open) & Link (Hover) | Dropdown (Open) & Dropdown Item/Link (Hover)
CMS [Narrow] - Nav - Open - Portal Nav - Link HoverCMS [Narrow] - Nav - Open - Portal Nav - Dropdown Open & Link HoverCMS [Narrow] - Nav - Open - Portal Nav - Dropdown Open & Item Hover

Nav Open: Dropdown (Open)
CMS [Narrow] - Nav - Open - Portal Nav - Dropdown Open

Minimum Width (320px)

⚠️ Out of date!

CMS

CMS does respect cross-site minimum width.

At Minimum Width

Nav Open
CMS [Min Width] - Nav Open

Below Minimum Width

Nav Open
CMS [Below Min Width] - Nav OpenCMS [Below Min Width] - Nav Open - Scroll

Nav Open: Portal Nav
CMS [Below Min Width] - Nav Open - Portal Nav - OpenCMS [Below Min Width] - Nav Open - Portal Nav - Open - Scroll

Docs

Docs does not yet respect cross-site minimum width.

Docs can respect cross-site min width. I have temporary solution for now.

At Minimum Width

Nav Open
Docs [Min Width] - Nav Open

Below Minimum Width

Nav Open
Docs [Below Min Width]Docs [Below Min Width] - Nav Open

Portal

Portal does not respect cross-site minimum width.

Portal can not easily respect cross-site min width until a mobile design.

At Minimum Width

Nav Open
Portal [Min Width] - Nav OpenPortal [Min Width] - Nav Open - Scroll

Testing

  1. Set up testing environment using method from Test CMS Changes. Specifically,

    1. npm run settings (new step, from GH-191: Theme (for ProTX Light Header & TACC Blue Header) #192)
    2. npm ci|install
    3. npm run build
    4. collect static files
  2. Test these elements are present, functional, and match design on the matching subsites:

    Table
    Element →
    Subsite ↓
    CMS Nav (Dropdown) CMS Nav (Main Links) Branding Bar Logo Search Portal Nav (Logged In) Portal Nav (Logged Out)
    CMS (sans Portal)
    CMS (with Portal)
    Portal
    Docs ~ ~ ~

    Legend:

    • ✓ Has
    • ~ Has (but only because Frontera has portal and is only project with new docs)
  3. Test these elements have these layouts occur at the matching breakpoints on the matching subsites:

    Table
    Subsite Breakpoint →
    Elements ↓
    320px– 1200px– 1200px+ 1200px—1400px 1400px—1680px 1680px+
    CMS (sans Portal) CMS Nav ┣━ vert. list horz. list at right some space between links more space between links ━┫
    CMS, Portal, Docs CMS Nav ┣━ vert. list horz. list at left ┣━ some space between links more space between links
    CMS, Portal, Docs CMS Nav Bkgd ┣━ translucent opaque ━━ ━━ ━┫
    CMS, Portal, Docs Portal Dropdown ┣━ wide list narrow list ━━ ━━ ━┫
    CMS, Portal, Docs Portal Nav Toggle ┣━ narrow layout wide layout ━━ ━━ ━┫
    CMS, Portal, Docs Nav Bar ┣━ large text small text ━━ ━━ ━┫
    CMS, Portal, Docs Menu Icon flex. width static width absent ━━ ━━ ━┫
    CMS, Portal, Docs Branding Bar ┣━ short height taller height ━━ ━━ ━┫
    CMS, Portal, Docs Nav Bar ┣━ short height taller height ━━ ━━ ━┫
    CMS, Portal, Docs Search Bar ┣━ taller height short height ━━ ━━ ━┫
  4. Ensure dropdown icon is:

    List
    • when dropdown is open
    • ^ when dropdown is closed
    • bigger for CMS Nav at 1200px–
    • smaller for CMS Nav at 1200px+
    • consistent size for Portal Nav above and below 1200px

Notes

Known Issues

  1. On mobile nav, the dropdown toggle ("chevron") is not thick enough.

    I am forgoing adding complexity in code to solve this, because there should be a Cortal icon for this shape.

  2. Stand-alone CMS navbar collapses for a wider screen than before.
    • Before, on a screen of < 992px, navbar would collapse.
    • Now, on a screen of < 1200px, navbar will collapse.

    A CMS that belongs to a Portal is not affected, because it already behaves like this.

Known Deviations From Design

Expected to Remain

  1. Some color(s) of Search Bar use a standard color instead of color in design.

    I have prior private permission to make these "fixes" during translation. I plan (eventually) to teach Portal devs how to do the same.

Mobile Portal Nav Menu

If the mobile portal nav menu were moved to outside the navbar dropdown, then these likely would all be resolved. But Design has agreed to let me do that later.

  1. On narrow screen, Search Bar height and Search Bar + Portal Nav link height are shorter than design.

    I just didn't want to maintain another value when the two were so close—and sometimes Design is close when they mean to match. If this is noticed as a bug, then I will fix it.

  2. On medium and wide screen, space left of Logo and right of Portal Nav do not match design.
    • Before, Design said space left of Logo should match space left of Portal sidebar icon.
    • Now, Design says left of logo space should be 30px and match space right of portal nav.
    • Also, the width appears static and too wide (see Known Deviation 5).

    So, I ignored 30px and made spaces align because my experience shows me that aligning and consistency is Design's goal here, not an exact pixel value.

  3. On narrow screen, Portal Nav dropdown is pushing down CMS Nav.

    This is a stopgap to not have the Portal Nav dropdown fall over CMS Nav, but not yet move it to the Designer-suggested location (which is a deviation form design, see Known Deviation 6).

  4. On narrow screen, Portal Nav link is wider than necessary (for short usernames)
    • To (A) place the Portal Nav link and Search Bar on one row and (B) have Portal Nav dropdown push down CMS Nav but (C) not reinvent Bootstrap functionality, the Portal Nav link must have a fixed width.
    • The fixed width for the Portal Nav link is the maximum needed to fit the widest username (8-characters, all m's).
  5. On narrow screen, Portal Nav location is not deviating from design as Designer suggested it should.
    • Design has said the Portal Nav link should (deviate from design) be on the Navbar to the right of the close button.
    • The current location is achieved using code that may support the move to the desired location.
    • The change is major and I am already well beyond time estimated for this task.

wesleyboar and others added 4 commits May 11, 2021 10:50
- Migrate `branding_logos` CSS to `c-branding` & `c-logo`.
- In `s-header` style `.c-logo` not `.navbar-brand`.
- Update and format markup for `header_branding` and `header_logo`.
- Comment on now-unused secrets values.
wesleyboar and others added 21 commits May 13, 2021 17:01
- Remove now-moot taccsite_custom:frontera-cms search bar font sizes.
- Support CSS custom selectors (known external bug).
- Test CSS custom selectors (known external bug).
- Remove outdated comment from `c-branding`.
- Set `c-logo` image height in component stylesheet.
- Add TODO for `html { font-size: 62.5%; }`
- Add arrow "mixin" (note: using `%-arrow` syntax).
- Redesign header (but not dropdowns and not portal nav).
- Remove now-moot `s-portal-nav` styles.
- Add & Update header env variables for themes.
- Perform "GH-129: Do Not Support CMS Menu Nav Link & Dropdown".
Prevent dropdown link from being flagged as active.
- (Real Fix) Ensure colors are available to Docs.
- (Possible Fix) Ensure correct colors are available to Portal.\*

\* The Portal has its own settings/color.css that is almost identical.
- Load new styles solely for docs header.
- Force branding styles on old markup.
- Migrate subsite selectors from `trumps/s-header` to `tools/selectors`.
- Rename `:--in-__subsite__` selectors to `:--from-__subsite__`.
- Create new styles solely for docs header.
- Document "For (Other Sites)" i.e. `trumps/for-docs.*.css` stylesheets.
Unset Docs' `img { max-width; }`. Docs does this too but for old markup.
- Install `merge-lite` for deep merge constants and theme data.
- Use env() vars for header height.
- Remove unnecessary code and improve comments.
- Create constants for theme JSON.
- Merge constants on top of theme data.
- Update theme data comment syntax.
- Add frontera-cms logo width overwrite (temp. ineffectual, see GH-223).
- Prevent Core (but not a project) from stretching logo too wide.
- Align CMS nav for narrow logos. Allow project-specific adaptation.
- Remove redundant color assignment for nav-link.
…riables

Task/gh 101 header redesign  env variables (update)
- Add font weight constants.
- Add border constants.
- Style dropdowns and use new constants.
Use correct global var not wrong env var for branding bar bkgd.
Scope dropdown styles to header so as to not effect any other dropdowns.
1. Scope header-specific `.c-branding` styles with `.s-header`.
2. Clarify which `s-header` is being styled and why.
3. Remove `s-header` ID from sample header markup.
4. Add `s-header` class to `header-branding`.
5. Replace `s-header` ID with `header-navbar` ID.
Portal needs to overwrite Bootstrap's color for active `dropdown-item`.
Instead of defining a value to be overwritten, set a fallback.

This reduces one level of overwrite when tracking/debugging values.
Ensure Portal & Docs line-height (in header) matches CMS.
- The responsive space between nav items now considers portal elements.
- Whether header is loaded on portal is noted by presence of a class.
@wesleyboar wesleyboar added priority ▲ High priority and removed priority ▲▲ Very high priority labels Aug 5, 2021
@wesleyboar wesleyboar mentioned this pull request Aug 13, 2021
@wesleyboar wesleyboar changed the title GH-101 Header Redesign GH-101: Header Redesign Sep 3, 2021
Base automatically changed from task/GH-191-support-light-navbar-for-dark-logos to main September 23, 2021 01:12
@wesleyboar wesleyboar added priority ━ Medium priority and removed priority ▲ High priority labels Sep 23, 2021
@wesleyboar wesleyboar changed the title GH-101: Header Redesign GH-101/FP-1458: Header Redesign Jan 12, 2022
@wesleyboar wesleyboar removed the priority ━ Medium priority label Feb 2, 2022
@wesleyboar wesleyboar added the paused Started but not actively in progress label Mar 22, 2022
@wesleyboar wesleyboar added the priority ▲ High priority label Nov 11, 2022
@wesleyboar wesleyboar removed the priority ▲ High priority label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paused Started but not actively in progress
Projects
None yet
2 participants