Skip to content

Commit fa61d9d

Browse files
okohlbacherclaude
andcommitted
feat(999.70-02): document Restore Defaults scope — help page + button tooltip (TUT-02, #523)
Restore Defaults resets only the currently-open Preferences page and intentionally does NOT reset font/language/style (style_box_/languageComboBox_ are unregistered from the reset path; font is held separately). Document this on two surfaces: - new in-app help page data/BALLView/help/preferences/01-restore-defaults.md - null-guarded tr() tooltip on the QDialogButtonBox::RestoreDefaults button No reset behavior changed. VIEW builds clean. TUT-01 PDF/screenshots remain Wave-2 (human). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 95e8bea commit fa61d9d

4 files changed

Lines changed: 97 additions & 2 deletions

File tree

.planning/REQUIREMENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ collision with prior PKG/DOCS/FEAT IDs.
282282

283283
### Documentation (Phase 999.56)
284284
- [ ] **TUT-01**: The PDF tutorial content / screenshots / URLs / build-flow are refreshed to the v1.7.x stack (#560).
285-
- [ ] **TUT-02**: The "Restore Defaults" scope (does not reset font / language / style) is documented (#523).
285+
- [x] **TUT-02**: The "Restore Defaults" scope (does not reset font / language / style) is documented (#523).
286286

287287
### Inspector cosmetic (v1.7.5 carry-in)
288288
- [ ] **INSPCLIP-01**: Right-edge Inspector controls (per-section reset glyphs, value spinners, unit labels) are not clipped when an Inspector tab scrolls (the v1.7.4 known issue).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# 999.70-02 Summary — Restore Defaults scope docs (TUT-02 / #523)
2+
3+
**Status:** complete (autonomous). Executed inline by the orchestrator after the
4+
Wave-1 executor stalled on the stream watchdog (TUT-01 commits recovered + merged;
5+
TUT-02 finished here).
6+
7+
## Delivered on two surfaces
8+
9+
1. **In-app help page**`data/BALLView/help/preferences/01-restore-defaults.md`
10+
(new `preferences/` help section; markdown + YAML frontmatter matching the
11+
existing `help/tutorial/` pages). States explicitly that Restore Defaults
12+
resets only the *currently open* page's registered values and does **not**
13+
reset **font**, **language**, or **style**, and points users to
14+
Preferences → General to change those.
15+
16+
2. **Button tooltip**`source/VIEW/DIALOGS/preferences.C`, in the
17+
`Preferences(QWidget*, const char*)` constructor (after `setupUi`):
18+
```
19+
"Resets this page's settings to their defaults. Font, language, and
20+
interface style are not changed."
21+
```
22+
Retrieved via `buttonBox->button(QDialogButtonBox::RestoreDefaults)`,
23+
null-guarded, wrapped in `tr()` for i18n. No reset behavior changed.
24+
25+
## Accuracy basis
26+
Wording derived directly from the confirmed code path: `setDefaultValues()`
27+
`restoreDefaultValues()` on the selected page only; `mainControlPreferences.C`
28+
deliberately `unregisterObject_(style_box_)` / `unregisterObject_(languageComboBox_)`,
29+
and the font is held in a separate `font_` member — all outside the registered-object
30+
reset path. Intentional design (#523, confirmed by A. Hildebrandt), documented not changed.
31+
32+
## Verification
33+
- Both plan verify gates PASS (help page names font/language/style + "not changed";
34+
tooltip present on the RestoreDefaults button mentioning the three).
35+
- `cmake --build build/ci-macos --target VIEW``preferences.C` compiled clean,
36+
libVIEW linked.
37+
38+
## Not done here (Wave 2 / human — plan 999.70-03)
39+
TUT-01's PDF render + `tut1_screenshot` recapture remain a human checkpoint.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Restore Defaults
3+
order: 1
4+
prev: null
5+
next: null
6+
prereq: none
7+
expected-runtime: 1 minute
8+
---
9+
10+
# Restore Defaults
11+
12+
The **Restore Defaults** button at the bottom of the Preferences
13+
dialog resets the settings on the **currently open Preferences
14+
page** back to their built-in default values. It acts on the page
15+
you have selected in the list on the left — not on every page at
16+
once. To restore another page, open it first, then click Restore
17+
Defaults again.
18+
19+
## What is *not* reset
20+
21+
Restore Defaults deliberately leaves three General-tab settings
22+
unchanged:
23+
24+
- your chosen application **font**,
25+
- the interface **language**, and
26+
- the widget **style**.
27+
28+
These three are intentionally preserved so that an accidental
29+
click cannot, for example, switch your interface back to English
30+
or to a different platform style in the middle of a session. This
31+
is by design, not a bug — Restore Defaults will never touch them.
32+
33+
## How to change font, language, or style
34+
35+
Set them directly in **Preferences → General**:
36+
37+
- **Font** — pick a new application font.
38+
- **Language** — choose the interface language (a restart may be
39+
required for the change to take full effect).
40+
- **Style** — select the widget style.
41+
42+
Changing them here applies immediately (or after the noted
43+
restart); they are simply outside the scope of Restore Defaults.

source/VIEW/DIALOGS/preferences.C

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,20 @@ namespace BALL
3030
{
3131
setupUi(this);
3232
setObjectName(name);
33-
33+
34+
// TUT-02 (#523): document the Restore Defaults scope at the point of
35+
// confusion. The button resets only the currently-open page's
36+
// registered values; font/language/style are intentionally outside
37+
// the reset path (mainControlPreferences unregisters style_box_ and
38+
// languageComboBox_, and the font is held separately), so users who
39+
// expect those to revert are surprised. Spell out the scope here.
40+
// The button may be absent on some platform layouts — null-guard it.
41+
if (QPushButton* restore_button = buttonBox->button(QDialogButtonBox::RestoreDefaults))
42+
{
43+
restore_button->setToolTip(tr("Resets this page's settings to their defaults. "
44+
"Font, language, and interface style are not changed."));
45+
}
46+
3447
// signals and slots connections
3548
connect( entries_listview, SIGNAL(itemSelectionChanged()), this, SLOT(entrySelected()));
3649
//for some reason the ok_button and the apply button is connected in VIEW/KERNEL/mainControl.C

0 commit comments

Comments
 (0)