Shell: tile settings in a window beside the tile; schemas per tile kind
The gear popover lived inside its tile, so a tile could be too small for its own settings, and the settings sat on top of the thing they change. It is now a small window: placed beside the tile (right when there is room, else left, else over it), clamped to the viewport, moved by a grab bar, closed by clicking away, Escape, the ✕ or the gear. Settings still apply as they change — that is the point of putting the window beside the tile. With it, four pieces of contract the module work needs: - A picker entry may carry its own `instanceSchema` / `instanceGroups`: tiles added from it get settings that fit that tile, nothing else. A tile showing one ProPresenter timer has no use for a clock's format switches. - `instanceGroups[name].toggle` puts a group's on/off switch in its title row and dims the body while it is off — the admin page's convention, in the popover. - `select` and `multiselect` in tile settings may take `optionsRoute`; `multiselect` also `columns` and `allByDefault` (nothing saved until someone flips a switch, so options that turn up later are on too). - `template`: a text with placeholders built by dragging or clicking the variables a module offers into it. And the + picker's descriptions are tooltips now — the list stays a list. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b9e895d324
commit
7a44b25d4b
@@ -466,6 +466,11 @@ function sanitizeTileEntry(raw) {
|
||||
// at most one tile of this entry per dashboard (the picker greys it out)
|
||||
single: raw.single === true,
|
||||
};
|
||||
// An entry may offer its own gear settings — a solo timer wants none of a
|
||||
// full tile's switches. Same shape as the manifest's instanceSchema/Groups.
|
||||
for (const key of ['instanceSchema', 'instanceGroups']) {
|
||||
if (raw[key] && typeof raw[key] === 'object') out[key] = raw[key];
|
||||
}
|
||||
for (const key of ['minSize', 'defaultSize']) {
|
||||
const size = raw[key];
|
||||
if (size && Number(size.w) > 0 && Number(size.h) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user