Feat/list scoped properties#61
Merged
Merged
Conversation
…e/Files migration The reorder/drag-handle grip "stuck to the content" in every list & table: the hover-revealed six-dot grip was absolutely positioned over the first cell with NO reserved gutter, so its 16px box overlapped the leading status glyph / title. Root cause was the same class as DS-input — the grip element + its spacing CSS were re-implemented per surface (.dbv-grid__drag-grip / .content-row__drag-grip, identical copy-pasted blocks), so nothing owned "the grip clears the content." - .bs-drag-grip in @brainstorm/sdk/app-theme.css: the shared drag-handle face (box / text-faint glyph / grab cursor / hidden->revealed transition / absolute pin). Host supplies only the gutter offset (--bs-drag-grip-inset) and its one row-hover reveal selector. - Database grid + Files content rows migrated onto the face, each reserving a real leading gutter so the grip parks clear of the first cell. The stage / list scroll containers clip overflow-x, so the gutter is reserved INSIDE the row (not floated into negative space — a negative offset just hid the grip's left half). Measured 4px grip->content gap on both, no clipping; head/body/ foot share .dbv-grid__row so the grid columns stay aligned. Files group headings re-aligned to the indented row content. typecheck (database+files) + database/files build + control-face/css-token/ biome ratchets clean. Verified by dogfood session 372. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…OQ-LD-2)
The "adding an object to a collection makes it inherit that collection's
properties" mechanism (book → Horror/Fantasy) was a documented contract
(Scope = { kind: "list", target }) with NO implementation: the property catalog
is a flat global key→PropertyDef map with no scope, and nothing resolves list
overlays onto members.
This lands the storage + resolution foundation:
- PropertyDef gains an optional scope field (backward-compatible; unscoped =
today's global property). A def scoped { kind:"list", target: listId } is a
collection overlay.
- New pure @brainstorm/sdk module list-scoped-properties: listsContainingEntity
+ inheritedPropertyDefs(entity, lists, catalog) → the overlay defs an entity
inherits from its collections, over the shared effectiveMembers math. +8 tests.
OQ-LD-2 positions (documented in the module): manual membership for now
(query-list overlays resolved app-side); first-list-in-id-order wins on a key
collision; value HELD on leave (editing writes to the entity's own bag).
Next: authoring (add a property to a collection) + surfacing inherited props in
the inspector (database reference first), then roll to all apps.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Database inspector's InspectorProperties now renders the entity's own properties PLUS the collection-scoped overlays it inherits — resolved via inheritedPropertyDefs(entity.id, state.lists, vault catalog). Inherited rows are editable through the same shared cells; an own value for the same key wins (entity > list precedence); editing writes to the entity's own bag (held on leave). Reference implementation for the cross-app rollout. typecheck + biome + database build clean; resolver logic covered by the 8 list-scoped-properties unit tests. End-to-end dogfood verify lands with the authoring stage (creating a collection property), the next increment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… property)
Completes the demoable loop: the column-adder gains '+ Add collection property…'
for collections you can manually add to (Manual/Hybrid lists). It opens the
shared inline property form and persists a PropertyDef scoped
{ kind: 'list', target: listId } — no view column; member entities pick it up
via inheritedPropertyDefs and render it editable in their inspectors.
So: add a property to Horror → add a book to Horror → the book's inspector shows
that property, editable, written to the book's own bag.
typecheck + biome + database build clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # apps/database/src/app.ts # apps/database/src/react/inspector-properties.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.