The last item from the settings-reorg spec's Applies to every form: "Reset to default" on each page that has changed values.
The button. A Settings page (a singleton form) shows Reset to default beside Cancel and Save whenever one of its fields differs from its default. It uses the same rule as the changed tag on a field and the Overview's count, so the three always agree.
The dialog lists each field it would put back, with its value now and its default in words (e.g. Spam threshold 4 → 5). Server-set fields are left out.
Nothing is written straight away.Fill in defaults puts the defaults into the form. It then shows Unsaved changes, and only Save writes them; Cancel, or leaving, keeps the server as it was.
changedFields() is the new helper in features/settings/changedFromDefault.ts. countChanged() for the Overview now uses it too. As a result, a field listed twice on one page no longer counts twice, and server-set fields no longer count at all.
Checked:
New unit tests: what's listed, server-set fields left out, and an empty list when nothing differs. 502 tests pass in total.
Typecheck, lint and build are clean.
In Chrome against a local server, Spam filter › General with thresholds 4 / 12 showed the button. The dialog listed Spam threshold 4 → 5 and Reject threshold 12 → 0. Fill in defaults cleared both changed tags and showed Unsaved changes. After Save and a reload, the page showed Balanced as current and no reset button.
English only: 6 new strings.
The last item from the settings-reorg spec's *Applies to every form*: "Reset to default" on each page that has changed values.
- **The button.** A Settings page (a singleton form) shows **Reset to default** beside Cancel and Save whenever one of its fields differs from its default. It uses the same rule as the *changed* tag on a field and the Overview's count, so the three always agree.
- **The dialog** lists each field it would put back, with its value now and its default in words (e.g. *Spam threshold 4 → 5*). Server-set fields are left out.
- **Nothing is written straight away.** *Fill in defaults* puts the defaults into the form. It then shows *Unsaved changes*, and only Save writes them; Cancel, or leaving, keeps the server as it was.
- **`changedFields()`** is the new helper in `features/settings/changedFromDefault.ts`. `countChanged()` for the Overview now uses it too. As a result, a field listed twice on one page no longer counts twice, and server-set fields no longer count at all.
**Checked:**
- New unit tests: what's listed, server-set fields left out, and an empty list when nothing differs. 502 tests pass in total.
- Typecheck, lint and build are clean.
- In Chrome against a local server, Spam filter › General with thresholds 4 / 12 showed the button. The dialog listed *Spam threshold 4 → 5* and *Reject threshold 12 → 0*. *Fill in defaults* cleared both *changed* tags and showed *Unsaved changes*. After Save and a reload, the page showed Balanced as current and no reset button.
English only: 6 new strings.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The last item from the settings-reorg spec's Applies to every form: "Reset to default" on each page that has changed values.
changedFields()is the new helper infeatures/settings/changedFromDefault.ts.countChanged()for the Overview now uses it too. As a result, a field listed twice on one page no longer counts twice, and server-set fields no longer count at all.Checked:
English only: 6 new strings.