Three curated symbol vocabularies — boards, lanes, and cards each pick from their own shelf
`CuratedSymbols` was one flat ~65-glyph list serving every style-editor target alike. It is now three level-specific sets — `boards` (project/container/identity), `lanes` (workflow/stage/status), `cards` (work-item/content) — each ~30-40 entries, seeded from the original list and `SymbolPickerCatalog.defaultSet`, reorganized by which level a glyph actually reads as being about. Overlap is kept where a glyph genuinely fits everywhere (`flag`, `star`). Wiring: - `BoardInfoPopover`'s board-glyph `SymbolPicker` now passes `CuratedSymbols.availableBoards` instead of the picker's domain-agnostic default. - The card sidebar's `SymbolPicker` (`CardSidebarSections`) now passes `CuratedSymbols.availableCards` instead of the old flat `available`. - The style editor's own curated grid (`StyleEditorView`, the Style… popover's only remaining anchor) reads `CuratedSymbols.availableForStyleEditor(level:spansLevels:)`: a homogeneous target reads its own level's set, and a target that somehow spans more than one level (today unreachable — 04-interactions.md's cards-XOR-lanes rule keeps a live selection homogeneous) reads the three combined, via a new `BoardStore.styleTargetSpansLevels` seam that asks the question `styleLevel(of:)` deliberately collapses. - `CuratedSymbols.combined` (the three sets' stable-order union) also replaces the old `.all` in `SymbolPickerCatalog`'s full-catalog fallback. - `SymbolPickerCatalog.defaultSet` is kept as the fallback for a caller naming no level (a future saved-search picker, say) rather than retired. DESIGN/03-board-ui.md and DESIGN/05-card-window.md's Styling/sidebar prose amended minimally where they named "the curated set" as a single list. Tests: three new/rewritten suites in KanbanTests/StyleModelTests.swift (set shape, availability, overlap, `combined`, the style-editor level/span decision, the board-anchor width tripwire), one new test in KanbanTests/StyleWriteTests.swift (`styleTargetSpansLevels`), and the old single-list-pinning tests in KanbanTests/SymbolPickerTests.swift and KanbanTests/CardSidebarTests.swift updated to the new set names. 2834 tests, 487 suites green (KanbanTests, arm64); one unrelated flaky failure (RootRecoveryTests.vanishAndReturn under full-suite load) passed clean in isolation. Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
@@ -407,4 +407,21 @@ struct StyleWriteTests {
|
||||
#expect(ItemSymbol.default(for: store.styleLevel(of: .items([lane1]))) == ItemSymbol.lane)
|
||||
#expect(ItemSymbol.default(for: .board) == ItemSymbol.board)
|
||||
}
|
||||
|
||||
/// **The curated symbol grid's finer question** (`CuratedSymbols.availableForStyleEditor`'s own
|
||||
/// doc comment): unlike `styleLevel(of:)`, which collapses a target naming both a lane and a card
|
||||
/// to `.card`, `styleTargetSpansLevels` says so plainly — a target the live UI can never build
|
||||
/// (04-interactions.md's cards-XOR-lanes rule) but that `styleSubjects`' own fixture above
|
||||
/// (`.items([card2, card1, lane1])`) shows is perfectly constructible by hand.
|
||||
@Test("A target naming both a lane and a card is flagged spanning; a homogeneous or board target is not")
|
||||
func spansLevelsDetectsAGenuineMix() throws {
|
||||
let fixture = try makeBoard()
|
||||
defer { fixture.tearDown() }
|
||||
let store = try BoardStore(rootURL: fixture.root)
|
||||
|
||||
#expect(store.styleTargetSpansLevels(.board) == false)
|
||||
#expect(store.styleTargetSpansLevels(.items([lane1, lane2])) == false)
|
||||
#expect(store.styleTargetSpansLevels(.items([card1, card2])) == false)
|
||||
#expect(store.styleTargetSpansLevels(.items([lane1, card1])) == true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user