Skip to content

Settings: tabs grouped by task, with Library and Files (stacked on #1299) - #1309

Closed
nledford wants to merge 6 commits into
storytold:mainfrom
nledford:settings-regroup
Closed

nledford wants to merge 6 commits into
storytold:mainfrom
nledford:settings-regroup

Conversation

@nledford

@nledford nledford commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #1299 (which holds #1289 and #1287): the commits under the last one are theirs. The commit "the Settings tabs are grouped by what a person comes to do" is new.

Rebased onto main after integration batch 35 (#1682) on 2026-10-14, with the PRs under it. One conflict, in the Spanish catalog: main reworded "Wait for the import to finish" ("Esperar a que termine la importación") on the line before the new "Files" and "Monitor"; main's wording is kept beside them.

The Settings tabs did not match where a photographer would look. General held the library's location beside the language and the external editors. XMP sidecar writing, which governs every later edit, sat under Import. Forgetting unchanged photos and the smart previews folder, which are the library's own, sat under Performance. And "Display" was the monitor's colour profile while "Interface" was how LightCraft looks.

General before; General, Library and Files after

Left, BEFORE: General, with the library, startup, culling and both external editors on one page. Middle, AFTER: General (top) and the new Library tab (bottom). Right, AFTER: the new Files tab.

The tabs now

Tab Holds Id
General Language, Startup, Culling general
Library where the library is, Open / New Library, the smart previews folder, Local folders library (new)
Import Raw defaults, Other images, Metadata, Auto Import import
Files XMP sidecars, External Editing files (new)
Performance Rendering, Thumbnail cache performance
Monitor Monitor profile display
Appearance Appearance, Filmstrip, Grid, Detail interface
Faces, AI Denoise as before faces, denoise
  • Every tab id from before still opens its tab, so app.settings {tab} from agents, scripts and the rest of the app is unaffected; two ids are new. Controls keep their widget ids.
  • What is saved with the library says, in a library that is in memory, that it will not last, on each tab that holds such settings (it was only on Import).
  • A section's heading is findable as heading:<its English name> in ui.widgets, whatever the interface language.

Decisions worth a look

Limits

Overlap

Trial-merged against 53 open pull requests. It adds a conflict with:

The three that add tabs (#1120, #921, #929) and the rest merge cleanly.

Verification

  • Scenarios written first and seen to fail (tests_dialog_settings_groups.rs, 7): the tabs' names and order; every heading of every tab, so a section on the wrong tab is seen; each old id and the two new ones opening; an unknown id refused; controls found by the same widget id where they moved to; the smart previews folder under Library for a library on disk; the in-memory note on the tabs with library settings; the names on the tab bar. A unit test for tracing interface text back to its English source. The older settings tests were changed only where they named a tab a section has left.
  • An independent review found nothing lost or drawn twice in the split, and found: section ids that changed with the language, the in-memory note no longer covering XMP sidecars, a test that could not see a section it did not list, stale tracker rows, and "Files" missing from the catalogs. All fixed except the tracker rows and comments under Limits.
  • "Files" and "Monitor" are in the nine catalogs as single words; "Library" and "Appearance" were there.
  • After the rebase: fmt, clippy for the UI crate and the engine, parity, layers and assets pass. The UI crate's tests were not run on this branch itself after the rebase (no source conflict here); they were run on LR-PREF-GENERAL: the Settings window is one size on every tab, and nothing in it runs off the side #1287 (850 pass; the six tests_model_setup tests fail, as on main under cargo test -p lightcraft-ui-egui) and on LR-PREF-INTERFACE: text sizes have names, the seven type roles of the theme #1374, which holds this branch (939 pass, the same six fail). The wasm check was not run after the rebase.
  • The desktop app was not run; looked at in headless screenshots.

🤖 Generated with Claude Code

nledford and others added 6 commits October 14, 2026 07:28
…thing in it runs off the side

General was 970 pt wide and the other tabs about 600, because a row of
controls never wrapped and the widest row set the window's width; the
window was also as tall as each tab's content, so it moved up and down
between tabs and the tabs moved under the pointer. In a 900 pt wide app
window the row labels and the Close button of General were off screen at
the left, and a long library path made the window wider than the screen.

- settings::window draws the tab bar, which stays put, above the page of the
  open tab, which scrolls: 560 pt wide and up to 640 pt tall whatever the
  page holds, less when the app window is smaller. Each page keeps a scroll
  position of its own, and one that goes on below shows its scroll handle
  without the pointer on it. It is still drawn in the scroll area every
  dialog has, which has nothing to scroll; in a window with under 120 pt for
  the page (far below the desktop minimum) that area scrolls tabs and page
  together, as before.
- A row's controls wrap in the room beside the label, further lines starting
  under the first control, and a label longer than its column wraps in it
  (Forget unchanged photos pushed its choices 8 pt out of line).
- Paths are one line, shortened from the front after either kind of
  separator, with all of the path in a tooltip only when it was cut: Library
  > Location, the folder Auto Import watches (it wrapped over several lines),
  the smart previews folder (it lost its end, and had two tooltips) and a
  monitor profile's file.

row(), choices() and TABS keep their signatures, the match on the tab is
where it was and the shared dialog code changes by one call, so the open
pull requests that add tabs and rows still merge. Below 640 pt of app
window a row holding a 240 pt field can still be wider than the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore reading it

The row is at the foot of Import. With more sections above it (another
pull request adds one) it is below the fold of the 640 pt page, and a row
that is not drawn has no text to read: the test failed for the page's
length, not for the path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… or has the focus shows

One widget drew the tab bar and every row of choices: on General the
languages read as a second tab bar. What was chosen differed from what was
not by its fill alone, 1.35 to 1.56:1 in the four themes, and a tab or choice
reached with Tab showed nothing (the frame with and without the focus was
the same, pixel for pixel).

- widgets::tab_button: a tab is its name on the window, a size up from the
  headings inside a page, the open one in the text colour over a 2 pt line
  of that colour; no border, no fill. Each line of tabs stands on a 1 pt
  line the width of the window, so the open tab's line never hangs over the
  names below when the tabs take two lines (a narrow window, or Russian at
  full width).
- widgets::choice_button, used by settings::choices: the chosen option keeps
  its fill and is outlined in the label colour (5.5:1 or more against its
  fill, a button and the window in every theme), and is a radio button to a
  screen reader. The Export dialog's own rows of choices are as they were.
- Both, and text_button wherever it is used, show a ring while they have the
  keyboard focus: 2 pt in the text colour with a 1 pt line of the surface's
  colour inside it, within their rect. A double line, where a chosen option
  has a single thin one, so the two are told apart by shape. Tab, the arrow
  keys, Space and Return already worked.

Widget ids are as they were (button:settingsTab-{id}, button:{id}-{index}).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Esc in its text boxes gives the text back

- Clear Cache and a model's Remove (Faces, AI Denoise) open a small panel
  under the button that says what the action costs, with the action and Keep
  (settings::ask_first; {id}:confirm, {id}:keep). Keep has the focus, so
  Return alone changes nothing; Esc or a click elsewhere answers no. They
  acted on one click: a cache that takes hours to make again in a large
  library, a model that is a 261 MB download.
- Smart previews: "Delete them" was a choice made beforehand that a later
  press of Choose Folder or Use Library Folder carried out without a word.
  The change now waits, says how many smart previews would go and what they
  are for, and is made on Delete and Change Folder or dropped on Cancel. The
  choice and a waiting change are kept from one frame of the section to the
  next only, for the library and folder they were made in (SmartAsk): closing
  Settings, another tab, another library, or the folder changed some other
  way leaves nothing chosen or asked, and the choice goes back to "Move
  them" after any change.
- The text boxes of Settings go through settings::field: Esc gives the text
  back and is used up by that, so Settings stays open. Copyright, Creator and
  the Auto Import album become the project's TextField; Esc there used to
  save what was typed (the box lost the focus) and close the window.
- A tab clicked opens on the next frame, so the page being left is drawn
  once more and Copyright or Creator saves what was typed; it was dropped.
- The album box keeps its text per library (one library's album name could
  be written into another's).
- Automatically write changes into XMP sidecars has a line saying what is
  written where.

The lines that run the commands (let _ = app.run(..)) and the ones next to
them are as they were: storytold#1153's sweep of those lines still applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to do

General held the library's location beside the language and the external
editors; XMP sidecar writing, which governs every later edit, sat under
Import; forgetting unchanged photos and the smart previews folder, which
are the library's own, under Performance. "Display" was the monitor's
colour profile and "Interface" how LightCraft looks.

- Library (new, `library`): where the library is, opening or making
  another, where its smart previews are kept, and Local folders.
- Files (new, `files`): XMP sidecars and External Editing.
- General keeps Language, Startup and Culling; Import keeps what happens to
  photos as they come in; Performance keeps Rendering and Thumbnail cache.
- Display is labelled Monitor and Interface is labelled Appearance
  (settings::tab_label). Their ids, and every other tab id, are as they
  were: `app.settings {tab}` from agents, scripts and the rest of the app
  opens what it opened.
- What is saved with the library says, in a library that is in memory, that
  it will not last, on each tab that holds such settings.
- A section's heading is registered as `heading:{its English name}`
  whatever the language (i18n::source_of).
- Files and Monitor are in the nine catalogs.

No section's code moved. The tab functions are split where their sections
begin by inserting the end of one function and the start of the next, and
the tabs call the sections: the lines other open pull requests change are
where they were. Controls keep their widget ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… they click it

Library is a long page once it also holds Backups (another pull request):
the smart previews buttons are then below the fold of the 640 pt page, where
a control is not drawn and a click on its place goes nowhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nledford

Copy link
Copy Markdown
Contributor Author

Folded into #1287, which now holds this PR's commits together with the rest of its chain, rebased onto current main (0da998f2). The description there covers every step, links back here, and has fresh screenshots. This PR's description and discussion stay here for reference.

@nledford nledford closed this Oct 15, 2026
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