@marver-design/marver 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,23 +62,33 @@ viewport and lays it out:
62
62
 
63
63
  ## Folders - organising the sidebar
64
64
 
65
- Boards can sit in folders, one level deep (folders hold boards, never folders).
66
- Files are the truth, and two files carry it:
65
+ Boards can sit in folders, two levels deep: a folder holds boards and folders, a folder
66
+ inside a folder (a **sub-folder**) holds boards only. A board can sit at the root, in a
67
+ folder, or in a sub-folder. Files are the truth, and two files carry it:
67
68
 
68
69
  - **Membership lives on the board**: `"folder": "research"` in the board file, next
69
- to `order`. `order` then ranks the board among its folder siblings (root boards and
70
- folders share the root sequence). Same grammar as board names
70
+ to `order` - always the ONE folder it sits in directly, at either level (a board in a
71
+ sub-folder names the sub-folder, never a path). `order` then ranks it among its
72
+ siblings: at every level, the boards and folders there share one sequence (the root's
73
+ boards and top-level folders; a folder's boards and sub-folders; a sub-folder's boards). Same grammar as board names
71
74
  (`^[a-z0-9][a-z0-9-]*$`); an invalid value means top level. `all-scenes` never
72
75
  lives in a folder.
73
76
  - **Folders live in `design/boards/_folders.json`** - the underscore marks it as
74
77
  infrastructure, never a board:
75
78
 
76
79
  ```json
77
- { "version": 1, "folders": [
80
+ { "version": 2, "folders": [
78
81
  { "name": "research", "order": 1, "title": "R&D", "description": "The thinking behind the live boards - specs, flows, references" },
82
+ { "name": "flows", "parent": "research", "order": 2, "description": "One board per user flow" },
79
83
  { "name": "archive", "order": 3, "description": "Retired directions and scene versions, oldest first" } ] }
80
84
  ```
81
85
 
86
+ **Nesting lives here only**: a sub-folder's entry carries `"parent": "<folder>"`, and the
87
+ file says `"version": 2` while any entry has a parent (`"version": 1` when none does - an
88
+ older Marver can read that, and refuses a version-2 file rather than lose its nesting).
89
+ A parent must itself be a registered top-level folder; a sub-folder never holds a
90
+ folder. Folder names are unique across both levels.
91
+
82
92
  A folder's `name` is its slug - the identity its boards point at with `folder`; its
83
93
  `title` (optional, free text) is what humans see, exactly as on a board; its
84
94
  `description` says what belongs in it - the next session files boards right without
@@ -87,7 +97,8 @@ Files are the truth, and two files carry it:
87
97
  It exists so an EMPTY folder can exist and so a folder has a rank at the root.
88
98
  A folder a board names but the registry lacks is still real (it sorts after the
89
99
  ranked items, by name) - two boards with `"folder": "research"` make a Research
90
- folder on their own. A malformed registry is an error the canvas shows, not an
100
+ folder on their own. Such an implied folder is always top-level: to nest it, register
101
+ it with its `parent`. A malformed registry is an error the canvas shows, not an
91
102
  empty one - fix it, never delete it.
92
103
 
93
104
  **Look before you organise: `npx marver boards`** prints the sidebar as the files say
@@ -99,39 +110,53 @@ have rearranged things since you last looked, and their arrangement stands.
99
110
  The moves, each a file edit, so the files always agree:
100
111
  - **Create** a folder: add `{ "name": "<slug>", "order": <n>, "description": "…" }`
101
112
  to the registry's `folders` (create the file if absent) - or just point a board at it.
102
- - **Move a board in**: write `"folder": "<slug>"` on the board and give it an `order`
103
- among that folder's boards. **Move it out**: delete the `folder` field and give it
104
- an `order` among the top-level items.
113
+ **Create a sub-folder**: the same entry with `"parent": "<top-level folder>"`, its
114
+ `order` among that folder's boards and sub-folders, and `"version": 2` on the file.
115
+ - **Move a folder in or out**: set its `parent` (only a folder with no sub-folders of its
116
+ own can move into another - never three levels) or delete it; re-rank the siblings you
117
+ touch, and set `"version"` to 2 while any parent remains, 1 when none does.
118
+ - **Move a board in**: write `"folder": "<slug>"` on the board - any folder, at either
119
+ level - and give it an `order` among that folder's boards and sub-folders. **Move it
120
+ out**: delete the `folder` field and give it an `order` among the top-level items.
105
121
  - **Rank** folders and boards: `order` on the board (among its siblings) and on the
106
122
  registry entry (among the top-level items). Renumber the siblings you touch.
107
123
  - **Retitle** a folder (or a board): set `title` on the registry entry (on the board
108
124
  file). **Rename a slug** - a folder's `name`, a board's file name - only when asked,
109
- and as one refactor: a folder slug is on every member's `folder` field (rewrite them
110
- all, AND the registry entry - a registry rename alone leaves the members in the old,
111
- implied folder); a board file name is in `publish.json`, in its comment threads and in
125
+ and as one refactor: a folder slug is on every member's `folder` field and on
126
+ every sub-folder's `parent` (rewrite them all, AND the registry entry - a registry rename
127
+ alone leaves the members in the old, implied folder and the sub-folders pointing at a
128
+ parent that no longer exists); a board file name is in `publish.json`, in its comment threads and in
112
129
  every path anyone copied. A title does what a rename usually wanted.
113
- - **Delete** a folder: remove `folder` from every member, then its registry entry.
114
- Folders organise, never own: deleting one never deletes a board.
115
- - The **landing board** is the first board in sidebar order, folders included -
116
- rank a folder first and its first board opens the canvas.
130
+ - **Delete** a folder: what it holds moves up one level, into its place - a top-level
131
+ folder's boards lose `folder` and its sub-folders lose `parent` (they become top-level
132
+ folders, keeping their boards); a sub-folder's boards take its parent as their `folder`.
133
+ Then remove its registry entry and re-rank the level it emptied into. Folders organise,
134
+ never own: deleting one never deletes a board.
135
+ - The **landing board** is the first board in sidebar order, reading down through
136
+ folders and sub-folders - rank a folder first and its first board opens the canvas.
117
137
 
118
138
  Use folders proactively, the way a tidy studio would: a canvas past six or eight
119
139
  boards wants grouping - the live feature boards at the top level, `research` /
120
140
  `specs` for the thinking, `decks` for slides, `archive` for history and versions
121
- last. Propose the grouping in one sentence and do it; keep folder names short and
141
+ last. Reach for a sub-folder when a folder itself grows past six or eight boards and
142
+ splits naturally (features by surface, archive by year) - not before; one level reads
143
+ faster than two. Propose the grouping in one sentence and do it; keep folder names short and
122
144
  plain.
123
145
 
124
146
  The human does all of this too - from the sidebar: New folder (right-click the Boards
125
- header, or its `+`), Rename (the title - slugs never move from the sidebar), Delete
126
- folder, "Move to …" on a board, and DRAG: boards into and out of folders, folders among
127
- boards. Each drag rewrites `order` (and
147
+ header, or its `+`), New folder inside (a top-level folder's menu), Rename (the title -
148
+ slugs never move from the sidebar), Delete folder, Move to top level (a board in a folder,
149
+ a sub-folder), Move to new folder (a board), and DRAG: boards into and out of folders at
150
+ either level, folders among boards and - when they hold no sub-folders - into a top-level
151
+ folder. Each drag rewrites `order` (and
128
152
  `folder`) on the boards it touches and the registry - the shell owns those fields
129
153
  while the canvas is open, exactly as it owns `order`; write membership and new
130
154
  folders freely, and never rewrite an arrangement the human just made. The shell
131
155
  refuses a write that would overwrite an edit it has not seen (your file write and
132
156
  the human's drag can never silently erase each other), so read a board file before
133
- you rewrite it. Published canvases show the folders of the published boards only; a
134
- folder with nothing published never reaches the bundle.
157
+ you rewrite it. Published canvases show the folders of the published boards only - a
158
+ sub-folder's parent included; a folder with nothing published at any depth never reaches
159
+ the bundle.
135
160
 
136
161
  ## The default composition: one horizontal band
137
162