The board's symbol takes a tint — a 4×2 colour row under the picker's glyphs, and the glyph itself moves into the titlebar
iconColor stops being hand-written-only (user-ruled, superseding 03's "schema yes, control no"): it rides StyleCommand.apply → applyStyle as the third styled dimension — per-dimension no-op skip, one bracket, one history step, ExpectedField.iconColor for staleness. The SymbolPicker grows an opt-in colour row (leading None plus seven Palette.foregrounds hues, None removes the key); the board popover is its one caller. The window-title widget now draws the board's resolved glyph in that tint beside the name. Doc realignment filed on the Redesign board (Minor). Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
@@ -43,6 +43,7 @@ order: 3072
|
||||
project: lanework # agent overlay
|
||||
background: {color: blue}
|
||||
icon: star
|
||||
iconColor: chalk
|
||||
created: 2026-01-01T09:00:00Z
|
||||
---
|
||||
Styled body.
|
||||
@@ -249,6 +250,27 @@ struct RestyleUndoTests {
|
||||
let undone = try document(fixture, card3Path)
|
||||
#expect(undone.background.value == "blue")
|
||||
#expect(undone.icon.value == "star", "a dimension the gesture did not touch is not touched back")
|
||||
#expect(undone.iconColor.value == "chalk", "the third dimension rides the same rule")
|
||||
}
|
||||
|
||||
@Test("The colour row's dimension round-trips: a tint undoes to the prior tint, and to absence where there was none")
|
||||
func iconColorRoundTrip() throws {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
let (store, history) = try makeStore(fixture)
|
||||
|
||||
// card3 carries `iconColor: chalk`; card1 carries none.
|
||||
store.applyStyle(to: .items([card3]), iconColor: .set("fern"))
|
||||
#expect(try document(fixture, card3Path).iconColor.value == "fern")
|
||||
|
||||
history.undo()
|
||||
#expect(try document(fixture, card3Path).iconColor.value == "chalk")
|
||||
history.redo()
|
||||
#expect(try document(fixture, card3Path).iconColor.value == "fern")
|
||||
|
||||
store.applyStyle(to: .items([card1]), iconColor: .set("carnation"))
|
||||
history.undo()
|
||||
#expect(try document(fixture, card1Path).iconColor.isMissing, "no prior tint undoes to no key at all")
|
||||
}
|
||||
|
||||
@Test("A styling batch is one step, with a plural title")
|
||||
|
||||
Reference in New Issue
Block a user