Repository navigation
Conversation
|
@coderabbitai review |
|
Rebased onto |
✅ Action performed
|
|
@coderabbitai review |
Rate Limit Exceeded
|
3e6e473 to
b341826
Compare
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: text sizes have names, the seven type roles of the theme (LR-PREF-INTERFACE). Hard-coded .size(11.0) calls on labels in the dialogs, keymap and settings appearance pages are replaced by .font(t.caption()), so a size comes from a role in the theme and can be scaled by the interface size preference. Naming the roles removes magic numbers and is the precondition for an interface-size setting; the changes in the lines I saw keep the colour calls as they were. A mechanical replacement across many files should be checked for any place where the explicit size was deliberately different from the role (the replacement changes 11.0 to whatever caption() returns), and the PR should list the role values and the places that were not converted. A screenshot of one dialog before and after is the cheap evidence. I read three hunks. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
|
@coderabbitai review |
Action performed
|
… theme theme::TextSize names seven sizes a point or more apart (10 micro, 11 caption, 12 label, 13 body, 14 title, 15 panel title, 18 display), and Tokens gives each in both faces: t.caption(), t.body_strong() and the like. The call sites that already asked for one of those sizes by number (.size(11.0), t.font(13.0), the Body, Button and Small text styles) name the role instead. Nothing on screen changes: the sizes that are off the scale (12.5, 11.5, 13.5 and the rest), t.font(n) and t.semibold(n) are as they were. Tests: tests_type_roles.rs (the seven sizes and their steps, both faces of each role, the text styles). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
Action performed
|
wanikhawar
left a comment
There was a problem hiding this comment.
A check is failing and this conflicts with main. Please rebase and fix the failure. Since this is part 1 of 8, it is worth keeping it free of changes from the later parts.
Off
main.Part 1 of 8 of what was this one 3,200-line PR: it was too large to review in one sitting and held eight changes with their own behavior, so it is split along those lines (the list is under Not in this PR). Each later part is opened off
mainonce the one before it has landed, so none is stacked.Problem
Text sizes are numbers written where the text is drawn: 44 places set a size past
Tokens::fontandTokens::semibold, and there is no name for a size that a panel can use. The interface drew 17 sizes from 8.5 to 20 pt, 102 of 237 uses on half points, and nothing says which size has which job.This part gives the sizes names and moves the call sites that already ask for one of those sizes. It changes nothing on screen: the sizes that are off the scale come in the next part, because that change reaches every panel and needs its own before and after.
Change
theme::TextSize: seven sizes, each with a job and each a point or more from the next. 10 micro (a badge on a thumbnail), 11 caption (an explanation, the caption over a field), 12 label (a count, a tab's title), 13 body (controls, rows, values), 14 title (a section's header), 15 panel title (a panel's or window's name), 18 display (the title over the photos).Tokens::caption(),body_strong()and the like give each in the regular and the semibold face;Tokens::regular(size)andTokens::strong(size)take the size as a value..size(11.0),.size(12.0),.size(13.0), oneFontId::proportional(14.0)) name the role instead, and theBody,ButtonandSmalltext styles arebody(),body()andcaption(). In each, the size and the face are what they were.tests_type_roles.rs: the seven sizes and their order, each role's size in both faces (a regular and a semibold font, the same asregular(size)andstrong(size)), the three text styles.Not in this PR (the rest of the old #1374, in this order, each its own PR off
mainafter this one; they are not opened yet, so they have no numbers):t.font(n)andt.semibold(n)give the nearest size, the window title (Heading, 16 pt now) is 15, the Export dialog is 602 pt wide where it was 615. With before and after screenshots.Tokens::legible,text_link, …).cargo xtask typeas a step ofci, and its rule inCLAUDE.md: a maintainer's decision, so it is alone.How it was checked
main472560b309; one conflict,panels/edit.rs, where main's lens readout replaced the label this PR had changed and its.size(11.0)became.font(t.caption())): approved, no P1 or P2.cargo xtask ci: not run locally; the hostedCIgate runs it on this head. Run here ate4095acc06on this Mac after the rebase ontomain472560b309:cargo check --workspace --all-targets;cargo clippy --workspace --all-targets -- -D warnings;cargo test -p lightcraft-ui-egui type_roles theme edit(117); the rebase check (conflict markers, doubled docs rows, locale keys); a comparison of the PR's diff before and after the rebase (3 groups, all main's lens readout replacing the "No lens data" label, read and accepted).tests_type_roles.rsis new and uses the new API (it does not build without it).size(x)and.font(font)pick the same family for each of these widgets in egui 0.36), and thatHeading,font()andsemibold()are untouchedScreenshots
None: nothing drawn changes.
Merging
panels/settings.rs(also changed by LR-PREF-GENERAL: the Settings window is one size on every tab, and nothing in it runs off the side #1287, LR-PREF-GENERAL: Settings tabs look like tabs, and the keyboard focus shows and moves in one short way #2522, LR-PREF-GENERAL: Settings asks before Clear Cache, a model's Remove and deleting smart previews #2523, LR-PREF-GENERAL: what Settings says can be read in every theme, and in every language it has #2525 and LR-VIEW-FILMSTRIP: filmstrip and grid thumbnails share one overlay, and it degrades on narrow tiles #2164),edit.rsandmasking.rs(Shrink LightCraft chrome to PhotoCraft control scale #1589, which sets the interface type at 11 pt and so also decides sizes),denoise.rs(LR-PREF-GENERAL: Settings asks before Clear Cache, a model's Remove and deleting smart previews #2523, LR-PREF-GENERAL: what Settings says can be read in every theme, and in every language it has #2525),grid.rs(LR-VIEW-PHOTOGRID: the active photo's selection ring shows on light themes and differs from the other selected photos by weight #2162, LR-VIEW-FILMSTRIP: filmstrip and grid thumbnails share one overlay, and it degrades on narrow tiles #2164) andtheme.rs(Shrink LightCraft chrome to PhotoCraft control scale #1589, LR-VIEW-PHOTOGRID: the active photo's selection ring shows on light themes and differs from the other selected photos by weight #2162, LR-PREF-GENERAL: what Settings says can be read in every theme, and in every language it has #2525; this adds functions aftersemibold). The usual resolution of a conflict is to take the other side and name the size the line has; the size of a line that is not on the scale is not touched here. The old LR-PREF-INTERFACE: text sizes have names, the seven type roles of the theme #1374 and its closed originals Type: what the interface writes can be read in every theme (stacked on #1374) #1375 to Type: emphasis shows, and the smaller repairs of the critique (stacked on #1378) #1379 are what this is cut from.theme.rs: web: ship the craft-fonts faces beside the WASM so the web release can use craft-fonts #2395.unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none. Thextaskstep is in the last part.crates/ui-egui/src/thumb.rs,grid.rs); whichever lands second takes this from the integration build: thumbnail marks are drawn only bythumb.rs:film_badges,star_pitch(with its test) and the grid's reject dimming are dropped,thumb.rs'sbar_layoutfits the stars and dims rejects; marks over a picture useTokens::on_photo, with aTokens::photo_shaderect under each group and a rejected flag inon_photo_reject.t.legible(...)and the Settings text styles; whichever lands second takes this from the integration build: ours' structure is kept (legible_controls, heading registration) with the type-role fonts;t.legible(caution)/t.legible(accent)becomet.text_caution()/t.text_link().Buttoncomponent (crates/ui-egui/src/button.rs) and its dialogs; whichever lands second takes this from the integration build: theButtonstructure is kept with the type-role fonts.Progresscomponent (crates/ui-egui/src/); whichever lands second takes this from the integration build: theProgressstructure is kept with the type-role fonts.crates/ui-egui/src/panels/activity.rs; whichever lands second takes this from the integration build: the bell's rewrite is re-roled: 12.5 pt becomesbody(), 11.0 ptcaption()and 12.0 ptlabel().crates/ui-egui/src/(tests_type_on_photo); whichever lands second takes this from the integration build:tests_type_on_photobuilds aToaststruct literal.crates/ui-egui/src/panels/left.rs; whichever lands second takes this from the integration build: the row font is regular =t.body(), heavy =t.body_strong(), and the width is noted frommeasure_in(®ular).cargo xtask typeand its rule inCLAUDE.md, a maintainer's decision). They replace the "not opened yet" in Not in this PR above.Checklist
🤖 Generated with Claude Code
Summary by CodeRabbit