Do not merge yet : feat(component-header-footer): add isUnbranded and unbrandedLogo props for unbranded (KE) sites - #1762
Do not merge yet : feat(component-header-footer): add isUnbranded and unbrandedLogo props for unbranded (KE) sites#1762juanmitriatti wants to merge 4 commits into
Conversation
…s for unbranded (KE) sites When isUnbranded is true, the ASU logo is replaced by unbrandedLogo (src, alt, brandLink), the universal navbar keeps only the skip-nav and report-accessibility links (focus-revealed via the standard skip-link pattern), and Sign In/Out, ASU Home, My ASU, Colleges and Schools and the ASU search input are not rendered. navTree, CTA buttons, title and parentOrg behave exactly as today. Requested by Webspark for the Unbranded (KE) profile work (WS2-2964, WS2-3128). UDS-2248
|
Storybook deployed at https://unity-uds-staging.s3.us-west-2.amazonaws.com/pr-1762/index.html |
… for unbranded (KE) sites When isUnbranded is true, the endorsed social row and the ASU innovation row are not rendered. Contact and legal rows behave exactly as today, and the default (branded) footer is unchanged when the prop is absent/false. Mirrors the header isUnbranded work. Drupal side (MR !1093) already sends isUnbranded from asu_footer; inert until this bundle ships (WS2-3128). UDS-2248
mlsamuelson
left a comment
There was a problem hiding this comment.
In the footer, if the ContactComponent renders (Webspark has an option to enable/disable it), the button in that component has a hardcoded "Support ASU" label.
Two possible solutions:
- add a label prop for that button. Will also require WS2 side-changes.
- remove the button if isUnbranded is true.
I'm leaning towards simplicity, and suggesting 2.
mlsamuelson
left a comment
There was a problem hiding this comment.
Do not display the footer colophon when unbranded - the gray bar with Copyright and accessibility and other links should not display. If needed, on an unbranded site, the site owner can add a block to add their own custom colophon.
mlsamuelson
left a comment
There was a problem hiding this comment.
In the unbranded stories, instead of "KE" and "Knowledge Enterprise" let's just use "Unbranded"
- Suppress the Contact "Support ASU" contribution button when isUnbranded - Do not render the footer legal colophon when isUnbranded - Rename KE/Knowledge Enterprise references to generic "Unbranded" across code, comments, stories, mocks, types and docs
# Conflicts: # packages/component-header-footer/docs/README.props.md
|
Hi @mlsamuelson |
Summary
Adds two new optional props to the Global Header (
component-header-footer), requested by Webspark for the Unbranded (KE) profile work (WS2-2964, WS2-3128). Jira: UDS-2248.isUnbranded(bool, defaultfalse)unbrandedLogo(object:src,alt,brandLink)When
isUnbrandedis true:unbrandedLogo, mirroring howpartnerLogois injected forisPartner.:focus-within, standard skip-link pattern).Rationale: the universal nav links were hardcoded inside the React bundle with no prop to suppress them, so unbranded rendering was impossible without this change.
Changes
ASUHeader: newisUnbranded/unbrandedLogoprops, wired through the app context, PropTypes, JSDoc typedefs andtypes/main.d.ts.Logo: rendersunbrandedLogo(src/alt/brandLink) instead of the ASU logo when unbranded.UniversalNavbar: filters the nav links down to the two accessibility links, dropsLoginandSearch, and adds auds-hdr-universal-nav-unbrandedclass whose CSS visually hides the bar (still keyboard-reachable) except under:focus-within.HeaderMain: the mobile-menu search input is also suppressed when unbranded.UnbrandedStorybook story, updateddocs/README.props.md.Testing
header.test.js(logo replacement, link reduction, sign-in/search suppression, focus-reveal class, nav/title regression). Full package suite: 51/51 passing, including the Playwright dataLayer tests.yarn testat the repo root shows a pre-existing, unrelated failure in@asu/app-webdir-ui(MessageChannel is not definedjsdom environment issue); this PR touches no files in that package.