Skip to content

Feat/team unsaved changes - #329

Merged
sabinem merged 3 commits into
mainfrom
feat/team-unsaved-changes
Oct 9, 2026
Merged

sabinem merged 3 commits into
mainfrom
feat/team-unsaved-changes

Conversation

@sabinem

@sabinem sabinem commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Manage Teams: see and keep unsaved team changes

As an organizer rearranging teams, I can see exactly what I have not saved
yet, Save is always in reach, and I can no longer lose my work by clicking a
link.
Before, clicking the sidebar or "← Settings" with unsaved changes threw
them away without asking; only closing the tab was guarded. The only hint of
unsaved work was a small line of text next to a Save button that scrolled out of
view.

  • A bar under the page title sticks below the nav bar while scrolling: grey with
    "No unsaved changes", warning-colored with a summary, Discard and Save as soon
    as anything changes. It shows "Saving…" and repeats a failed save's error.
  • People whose team changed and teams that are new or renamed are marked in the
    same warning color until saved.
  • Leaving the page through an in-app link (or the browser's back button) with
    unsaved changes asks first; closing the tab still gets the browser's own
    prompt.
  • Questions (replace teams on upload, delete a team, leave without saving)
    appear in the app's own dialog instead of the browser's: themed, with Cancel
    focused and a confirm button that names its action. The dialog is a new
    reusable component, ConfirmDialog.

Deliberately left out

  • Deleted teams are not marked, as they are no longer on the page; the bar
    still counts them.
  • Back button: answering "Leave without saving" after the browser's back
    button opens that page as a new history entry rather than stepping back,
    because the navigation has to be cancelled before the dialog can ask.
  • Other pages still use the browser's confirm() (e.g. submissions); they
    can move to ConfirmDialog separately.

Following an in-app link off Manage Teams dropped unsaved changes without
a word, because only closing the tab was guarded. A beforeNavigate guard
now asks first. A sticky bar with the change summary, Discard and Save
appears while anything is unsaved, so Save stays in reach however far
down the projects one scrolls, and it repeats a failed save's message.
The save bar moves to the top, sticks below the nav bar and is always
there — quiet while everything is saved, warning-colored once anything
is not — so Save is in one place. People whose team changed and teams
that are new or renamed carry the same warning color until saved, so
the page shows what the bar is counting.
The native confirm() cannot be styled, introduces itself as
"localhost:8081 says" and only offers "OK". A ConfirmDialog component,
built on <dialog> with showModal(), asks instead: themed, with Cancel
focused and a confirm button that names its action. Manage Teams uses it
for replacing teams on upload, deleting a saved team, and leaving with
unsaved changes; the navigation guard cancels, asks, and resumes the
navigation on a "leave".
@sabinem
sabinem merged commit 9491f14 into main Oct 9, 2026
3 checks passed
@sabinem
sabinem deleted the feat/team-unsaved-changes branch October 9, 2026 06:08
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