Skip to content

refactor(frontend): one shared save bar for every edit-then-save page - #452

Merged
sabinem merged 1 commit into
mainfrom
feat/consistent-save-bar
Dec 1, 2026
Merged

sabinem merged 1 commit into
mainfrom
feat/consistent-save-bar

Conversation

@sabinem

@sabinem sabinem commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

The save bar works the same on every page that has one

Four pages already showed which changes weren't saved yet and asked before you left:

  • Settings
  • Manage Teams,
  • a team's submission
  • an admin's user page.

Each had its own copy of that bar, and they had drifted apart. On the submission and user pages, the bar scrolled out of view on a long page. The wording differed from page to page. The admin user page asked a differently worded question when you left. Now all four use one shared bar, so they look and behave the same.

  • the bar stays pinned under the top navigation on all four pages, so Save and Discard are always in reach.
  • The bar reads Unsaved changes: … everywhere. The "…, marked below" and "…, marked on the page" variants are gone.
  • Leaving with unsaved changes asks the same Leave without saving? question on every page.
  • On Manage Teams, a failed save's message is now announced in the bar as well as in the box below it.

Left out: other edit forms (public page, tracks, phases and so on) get the bar in follow-up PRs, one per form. Create forms keep their plain buttons.

Settings, Manage Teams, a team's submission and an admin's user page each
carried their own copy of the same save bar and leave guard. They now use
SaveBar, which brings LeaveGuard along: the bar names what Save would
write, Discard puts it back, and leaving with unsaved changes asks first.
LeaveGuard stands on its own for a form without a bar.

Visible differences: the bar now sticks below the nav bar on the
submission and user pages too, and reads "Unsaved changes: …" everywhere
rather than "…, marked below/on the page" on two of them.

The test setup stubs ResizeObserver, which jsdom lacks and the bar's
height binding needs.
@sabinem
sabinem merged commit 169aaf7 into main Dec 1, 2026
4 checks passed
@sabinem
sabinem deleted the feat/consistent-save-bar branch December 1, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant