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

Redesign header area #530

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gordlin
Copy link
Member

@gordlin gordlin commented Jan 28, 2025

RECREATION OF PR #514, AS THAT BRANCH WAS HAVING ISSUES

DEPENDS ON #510 (this branch is based on that branch). Pull that first!

Related Item(s)

Issues:
#504
#518

Changes

  • [FEATURE] Implements the UI/UX team's Figma suggestions for the header, with a few extra changes.
    • Header now has two layers: The "upper header", containing the Leave editor button and all the save-related UI elements (unsaved changes warning, reset changes button, save button); and the "lower header", containing the product title/UUID and all other buttons (preview, download, etc.)
    • Share feedback button moved to lower header.
    • Redesigned unsaved changes warning and reset changes button.
    • Add icons to save and preview buttons.
    • Save and reset changes buttons will now be disabled until there are unsaved changes.
    • Added an editor language toggle in the upper header, which will only show up when not on the Canada.ca template.
    • Set title and UUID to truncate at one line, to prevent wrapping.
    • Add tooltips to all header elements. These can also be accessed on mobile by holding the element for 500ms.
    • On mobile display sizes, header is now sticky and most buttons have their text hidden (only icons).
    • Added a dark border between the upper/lower headers.
  • [FIX] Repairs various layout issues and bugs related to the Canada.ca template.
    • Added left/right-padding equal to that of the Canada.ca elements.
    • Fixed ToC not showing up.
    • Fixed new/load product pages being partially hidden by the footer.
  • [FIX] Makes the Preview dropdown buttons wider, equal to the width of the Preview parent button.

Notes

Header, desktop, no unsaved changes:
image

Header, desktop, with unsaved changes:
image

Header, mobile, with unsaved changes and long truncated title:
image

Testing

Steps:

  1. Open any product.
  2. Try out each of the above-listed changes in the header. Try testing in different environments and screen sizes, with long and short titles/UUIDs, etc.
  3. Go to the Canada.ca version of the editor, and test it out, keeping an eye out for the above listed fixes. Things should work the same as the standalone app.

This change is Reviewable

@gordlin gordlin added PR: Active PRs that require a fierce eyeballin. PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review. labels Jan 28, 2025
Copy link

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/new-header-bar-recreated

@gordlin gordlin force-pushed the new-header-bar-recreated branch from a86973a to 4e0347b Compare January 28, 2025 20:09
Copy link
Member Author

@gordlin gordlin left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @IshavSohal, @RyanCoulsonCA, and @yileifeng)


a discussion (no related file):
All comments on the prior PR (#514) should be fixed here. Let me know if anything's been undone that I didn't notice.

@gordlin gordlin force-pushed the new-header-bar-recreated branch from 4e0347b to d87028b Compare January 28, 2025 20:14
Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 4 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @IshavSohal and @yileifeng)

Copy link
Member

@IshavSohal IshavSohal left a comment

Choose a reason for hiding this comment

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

Noticed that the product's title remains the same when changing languages.

Also, the editor language toggle still appears for the Canada.ca template, but it also appears for all other pages (dashboard, edit existing product, create new product), so not sure if the issue pertains to this PR.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yileifeng)

@gordlin gordlin force-pushed the new-header-bar-recreated branch from d87028b to dcaf8fc Compare February 7, 2025 22:20
Copy link
Member Author

@gordlin gordlin left a comment

Choose a reason for hiding this comment

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

Noticed that the product's title remains the same when changing languages.

This is expected behaviour. The product title language, and other metadata, is controlled by the config language (i.e. the thing you change with the "View English/French Config" button) and not the page language.

Also, the editor language toggle still appears for the Canada.ca template, but it also appears for all other pages (dashboard, edit existing product, create new product), so not sure if the issue pertains to this PR.

Yeah, odd. It seems to be an issue with the URLs used for the "Is this a Canada.ca template?" check. I've fixed it for the editor, new/load product pages, and the dashboard; the language toggle should now hide properly.

Donethanks!

Reviewable status: 2 of 5 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA and @yileifeng)

Copy link
Member

@IshavSohal IshavSohal left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 5 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA and @yileifeng)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Active PRs that require a fierce eyeballin. PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants