Skip to content

Save buttons turn grey once saved, active again after a change (#121) - #123

Merged
Oceandek merged 1 commit into
mainfrom
feat/save-buttons
Nov 12, 2026
Merged

Oceandek merged 1 commit into
mainfrom
feat/save-buttons

Conversation

@Oceandek

Copy link
Copy Markdown
Collaborator

Closes #121 (team change request R15).

What's new

  • Save buttons show whether there is anything to save: greyed out (disabled) while the form shows exactly what is saved, red as soon as a field differs. Changing a field back to the saved value greys the button out again.
  • After a successful save the button turns grey. After a refused save (for example "no-hashtag" is not a hashtag) it stays red, because nothing was stored.
  • One helper, shell.SaveButton(fields, on_click, label="Save"):
    • it listens to each field's value changes and compares them with the saved values;
    • empty and None count as the same, spaces around text don't matter, and neither does the order of a multiple choice;
    • each form calls saved() after a successful save.
  • Used on the five forms that stay on the page after saving:
    • Social media settings;
    • Weekly update text;
    • a Project's details (_project_form now also returns its fields);
    • a User's details;
    • the Repository name.
  • Save buttons in dialogs that close after saving (chat message edit, deadlines and meetings, Programme rename) are unchanged.
  • docs/CHANGELOG.md: R15 entry, plus History lines for Save buttons turn grey once saved, active again after a change #121 and the PR of Social media: video upload and processing, weekly backup, disk warning #113.

Tests

  • Frontend: 135 passed. New test_save_buttons.py covers all five forms:
    • each starts disabled;
    • a change enables it, and changing back disables it again (Social media);
    • it is disabled after saving;
    • a refused save keeps it enabled.
  • Backend: unchanged.

🤖 Generated with Claude Code

Team change request R15. shell.SaveButton disables a form's Save button while
the fields show what is saved and enables it when one differs; used on the
Social media settings, Weekly update, Project details, User details and
Repository name forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Oceandek
Oceandek merged commit bfa471d into main Nov 12, 2026
2 checks passed
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.

Save buttons turn grey once saved, active again after a change

1 participant