create-pmos 0.443.0 → 0.445.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.
- package/package.json +25 -25
- package/payload/KIT-VERSION +2 -2
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/payload/state/log.md +1 -1
- package/workspace/adler-moments-test.js +8 -0
- package/workspace/adler-seasons-art-test.js +3 -0
- package/workspace/board-columns-test.js +168 -0
- package/workspace/board-programs-test.js +1 -1
- package/workspace/briefing-premium-board-test.js +91 -8
- package/workspace/briefing-premium-insights-test.js +83 -38
- package/workspace/briefing-premium-test.js +2 -1
- package/workspace/calm-timeline-test.js +3 -1
- package/workspace/changelog.json +24 -0
- package/workspace/goals-clear-ui-test.js +34 -20
- package/workspace/guide/home.md +5 -0
- package/workspace/guide/jira.md +13 -1
- package/workspace/guide/ready-made-dashboards.md +2 -2
- package/workspace/intel-report-ui-test.js +1 -1
- package/workspace/lib/board-fold.js +33 -5
- package/workspace/lib/board-premium.js +1 -1
- package/workspace/lib/console-state.js +5 -1
- package/workspace/lib/engine/boards.js +9 -2
- package/workspace/lib/factory-join.js +46 -14
- package/workspace/lib/freshness.js +14 -1
- package/workspace/lib/initiative-rows.js +38 -4
- package/workspace/lib/issues.js +8 -1
- package/workspace/lib/jira-cli.js +18 -2
- package/workspace/lib/jira-moves.js +119 -0
- package/workspace/lib/jira-tickets.js +23 -4
- package/workspace/lib/notes.js +4 -2
- package/workspace/lib/offloop.js +75 -29
- package/workspace/lib/page-build.js +97 -0
- package/workspace/lib/plan-items.js +24 -3
- package/workspace/lib/plan-tree.js +62 -9
- package/workspace/lib/ready-reports.js +22 -8
- package/workspace/lib/refresh.js +14 -2
- package/workspace/lib/routes-board-premium.js +9 -1
- package/workspace/lib/routes-boards.js +114 -16
- package/workspace/lib/routes-brief-page.js +3 -1
- package/workspace/lib/routes-calendar-import.js +13 -1
- package/workspace/lib/routes-ready-reports.js +28 -5
- package/workspace/lib/task-links.js +12 -1
- package/workspace/lib/workflows-store.js +14 -3
- package/workspace/live-pill-round-test.js +178 -0
- package/workspace/milestone-pins-test.js +1 -1
- package/workspace/okr-goals-ui-test.js +21 -19
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/panels-test.js +375 -0
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/premium-vw-item-test.js +10 -2
- package/workspace/premium-vw-jira-test.js +3 -0
- package/workspace/program-panel-test.js +6 -6
- package/workspace/public/pm/bd-cols.js +149 -0
- package/workspace/public/pm/bd-ini-panel.js +3 -2
- package/workspace/public/pm/bd-pane.js +41 -0
- package/workspace/public/pm/bd-span.js +29 -11
- package/workspace/public/pm/cozy-adler.js +21 -0
- package/workspace/public/pm/cozy-board.css +45 -0
- package/workspace/public/pm/cozy-divider.css +32 -0
- package/workspace/public/pm/cozy-divider.js +45 -0
- package/workspace/public/pm/cozy-insights.css +22 -0
- package/workspace/public/pm/cozy-live-pill.css +17 -22
- package/workspace/public/pm/cozy-live-pill.js +38 -18
- package/workspace/public/pm/cozy-panels.css +80 -0
- package/workspace/public/pm/cozy-panels.js +691 -0
- package/workspace/public/pm/cozy-viewer.js +148 -70
- package/workspace/public/pm/dash-view.js +5 -2
- package/workspace/public/pm/goals-clear.js +9 -2
- package/workspace/public/pm/home-app.js +30 -19
- package/workspace/public/pm/home-ini.js +9 -3
- package/workspace/public/pm/home-today.js +4 -2
- package/workspace/public/pm/ini-edit.js +405 -0
- package/workspace/public/pm/ini-tasks.js +175 -46
- package/workspace/public/pm/ini-versions.js +18 -4
- package/workspace/public/pm/ini-view-model.js +12 -7
- package/workspace/public/pm/ini-view.css +162 -26
- package/workspace/public/pm/ini-view.js +44 -13
- package/workspace/public/pm/ini-wf-model.js +9 -0
- package/workspace/public/pm/ini-wf.js +14 -9
- package/workspace/public/pm/ins-pane.js +55 -0
- package/workspace/public/pm/jira-move.js +50 -0
- package/workspace/public/pm/live-model.js +3 -2
- package/workspace/public/pm/pn-narrow.js +76 -0
- package/workspace/public/pm/premium-board.js +85 -32
- package/workspace/public/pm/premium-insights.js +211 -43
- package/workspace/public/pm/task-card.css +2 -0
- package/workspace/public/pm/task-card.js +4 -1
- package/workspace/public/premium-board.html +2 -0
- package/workspace/ready-dash-ui-test.js +4 -4
- package/workspace/server.js +71 -20
- package/workspace/skills/jira-move.skill +35 -0
- package/workspace/stage-card-tasks-test.js +397 -0
- package/workspace/stage-card-test.js +1 -1
- package/workspace/task-delete-test.js +9 -1
- package/workspace/task-links-test.js +1 -0
- package/workspace/task-milestones-test.js +3 -3
- package/workspace/task-plans-test.js +1 -1
- package/workspace/task-press-test.js +12 -4
- package/workspace/task-views-test.js +166 -13
- package/workspace/test-lists/batch18-live-pill-round.json +10 -0
- package/workspace/test-lists/batch18-panels.json +9 -0
- package/workspace/test-lists/board-columns.json +5 -0
- package/workspace/test-lists/jira-moves.json +11 -0
- package/workspace/test-lists/page-speed-fold.json +5 -0
- package/workspace/test-lists/page-speed-reads.json +5 -0
- package/workspace/test-lists/stage-card-tasks.json +6 -0
- package/workspace/timeline-holds-test.js +1 -1
|
@@ -176,11 +176,11 @@ button.iv-wf:hover, .iv-prog:hover { background: var(--cz-well2) !important; col
|
|
|
176
176
|
.iv-wbs { display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--cz-hair); overflow: hidden; }
|
|
177
177
|
.iv-ws { display: flex !important; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 4px 12px 4px 14px !important; position: relative; }
|
|
178
178
|
.iv-wbs > .iv-ws + .iv-ws::before, .iv-wbs > .iv-wl + .iv-ws::before, .iv-wl > .iv-ws + .iv-ws::before, .iv-wl > .iv-wl + .iv-ws::before { content: ""; position: absolute; left: 14px; right: 12px; top: 0; height: 1px; background: var(--cz-hair); }
|
|
179
|
-
.iv-ws .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; }
|
|
180
|
-
.iv-ws .w b { font-size: var(--fs-3); font-weight: 800; }
|
|
181
|
-
.iv-ws .w small { font-size: var(--fs-2); font-weight: 600; color: var(--cz-ink3); }
|
|
182
|
-
.iv-ws .w small.w { color: var(--cz-risk); font-weight: 700; }
|
|
183
|
-
.iv-ws.mut .w b { color: var(--cz-ink3); font-weight: 700; }
|
|
179
|
+
.iv-ws > .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; }
|
|
180
|
+
.iv-ws > .w b { font-size: var(--fs-3); font-weight: 800; }
|
|
181
|
+
.iv-ws > .w small { font-size: var(--fs-2); font-weight: 600; color: var(--cz-ink3); }
|
|
182
|
+
.iv-ws > .w small.w { color: var(--cz-risk); font-weight: 700; }
|
|
183
|
+
.iv-ws.mut > .w b { color: var(--cz-ink3); font-weight: 700; }
|
|
184
184
|
.iv-ws.in { padding-left: 24px !important; }
|
|
185
185
|
.iv-ws .n, .iv-grp .n, .iv-fr .n { font-size: var(--fs-2); color: var(--cz-ink3); font-weight: 700; white-space: nowrap; }
|
|
186
186
|
.iv-ws .n.w { color: var(--cz-risk); }
|
|
@@ -189,11 +189,11 @@ button.iv-wf:hover, .iv-prog:hover { background: var(--cz-well2) !important; col
|
|
|
189
189
|
.iv-wl > .iv-ws.in { margin-left: -46px; width: calc(100% + 60px); }
|
|
190
190
|
.iv-tr { display: flex !important; align-items: flex-start; gap: 12px; min-height: 44px; padding: 7px 0 !important; width: 100%; }
|
|
191
191
|
.iv-tr + .iv-tr, .iv-sub > .iv-tr + .iv-tr { border-top: 1px solid var(--cz-hair); }
|
|
192
|
-
.iv-tr .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; }
|
|
192
|
+
.iv-tr > .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; }
|
|
193
193
|
.iv-tt { display: block; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); }
|
|
194
194
|
button.iv-tt:hover { text-decoration: underline; text-decoration-color: var(--cz-hair); }
|
|
195
|
-
.iv-tr .w > span { font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
196
|
-
.iv-tr .w > span.w { color: var(--cz-risk); font-weight: 700; }
|
|
195
|
+
.iv-tr > .w > span { font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
196
|
+
.iv-tr > .w > span.w { color: var(--cz-risk); font-weight: 700; }
|
|
197
197
|
.iv-tr.done .iv-tt { color: var(--cz-ink3); font-weight: 600; }
|
|
198
198
|
.iv-tt em { font-style: normal; color: var(--cz-blueink); font-weight: 800; }
|
|
199
199
|
.iv-cb { width: 18px; height: 18px; border-radius: 5px; border: 1.6px solid color-mix(in srgb, var(--cz-ink3) 60%, var(--cz-card)) !important; flex: none; margin-top: 1px !important; display: inline-flex !important; align-items: center; justify-content: center; background: var(--cz-card) !important; color: var(--cz-card) !important; }
|
|
@@ -201,6 +201,13 @@ button.iv-tt:hover { text-decoration: underline; text-decoration-color: var(--cz
|
|
|
201
201
|
.iv-cb.off { opacity: .6; }
|
|
202
202
|
.iv-jq { width: 12px; height: 12px; border-radius: 3px; background: var(--cz-blue); flex: none; margin: 4px 3px 0; }
|
|
203
203
|
.iv-jq.dn { background: var(--cz-ink3); }
|
|
204
|
+
/* a Jira ticket moving in Jira (Exploring · Move Jira tasks, JmA3States): its mark is a dashed outline until Jira answers */
|
|
205
|
+
.iv-jq.mv, .ig-sq.mv { background: transparent !important; border: 1.5px dashed var(--cz-blue); box-sizing: border-box; }
|
|
206
|
+
.iv-jm.mv { opacity: .55; }
|
|
207
|
+
.iv-jmv { color: var(--cz-blueink); font-weight: 700; white-space: nowrap; }
|
|
208
|
+
.ivk-d[data-ivk-jira] { cursor: grab; }
|
|
209
|
+
.tkc.ivq .ivq-st.jq { flex-wrap: wrap; }
|
|
210
|
+
.tkc.ivq .ivq-st.jq > .ivq-jn { flex-basis: 100%; margin: 2px 8px 4px; font-size: var(--fs-1); font-weight: 600; color: var(--cz-ink3); }
|
|
204
211
|
.iv-bxw > .iv-jq { margin: 3px 3px 0; }
|
|
205
212
|
.iv-more, .iv-grp { display: flex !important; align-items: center; gap: 8px; width: 100%; min-height: 40px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); border-top: 1px solid var(--cz-hair) !important; }
|
|
206
213
|
.iv-grp b { flex: 1; font-size: var(--fs-3); font-weight: 700; color: var(--cz-ink); }
|
|
@@ -237,6 +244,9 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
237
244
|
|
|
238
245
|
/* the box: one press marks done; the caret (hover or focus; a long press on a phone) opens the status picker */
|
|
239
246
|
.iv-bxw { position: relative; display: inline-flex; flex: none; align-self: flex-start; }
|
|
247
|
+
button.iv-bxw.jr { padding: 0; border: 0; background: none; cursor: pointer; min-height: 0; border-radius: 6px; }
|
|
248
|
+
button.iv-bxw.jr:hover .iv-cb { box-shadow: 0 0 0 3px var(--cz-well); }
|
|
249
|
+
.iv-cb.mv { background: transparent !important; border: 1.5px dashed var(--cz-blue) !important; }
|
|
240
250
|
.iv-cb.pr { border-color: var(--cz-blue) !important; background: linear-gradient(90deg, var(--cz-card) 50%, var(--cz-bluebg) 50%) !important; }
|
|
241
251
|
.iv-cb.wo { background: var(--cz-well) !important; position: relative; }
|
|
242
252
|
.iv-cb.wo::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1.6px; margin-top: -.8px; background: var(--cz-ink3); transform: rotate(-45deg); }
|
|
@@ -253,7 +263,7 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
253
263
|
/* the date: a press; the start and due picker opens under it. No dates: a calendar icon on hover */
|
|
254
264
|
.iv-dc { display: inline-flex !important; align-items: center; vertical-align: top; white-space: nowrap; gap: 4px; height: 22px; padding: 0 6px !important; margin: 0 -6px !important; border-radius: 999px !important; color: var(--cz-ink3) !important; font-weight: 600; }
|
|
255
265
|
.iv-dc:hover, .iv-dc[aria-expanded="true"] { background: var(--cz-bluebg) !important; color: var(--cz-blueink) !important; }
|
|
256
|
-
.iv-dc.w { color: var(--cz-
|
|
266
|
+
.iv-dc.w { color: var(--cz-late) !important; font-weight: 700; } /* late says --cz-late everywhere (StsA1Desk) */
|
|
257
267
|
.iv-dc.none { margin-left: 0 !important; opacity: 0; }
|
|
258
268
|
.iv-tr:hover .iv-dc.none, .iv-dc.none:focus-visible, .iv-dc.none[aria-expanded="true"] { opacity: 1; }
|
|
259
269
|
.iv-jm { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-blueink); margin-top: 1px; }
|
|
@@ -290,7 +300,7 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
290
300
|
.ivt-gh b { flex: 1; min-width: 0; font-size: var(--fs-3); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
291
301
|
.ivt-gh.mut b { color: var(--cz-ink3); font-weight: 700; }
|
|
292
302
|
.ivt-gh .n, .ivt-df .n { font-size: var(--fs-2); color: var(--cz-ink3); font-weight: 700; white-space: nowrap; }
|
|
293
|
-
.ivt-gh .n.w { color: var(--cz-
|
|
303
|
+
.ivt-gh .n.w { color: var(--cz-late); }
|
|
294
304
|
.ivt-df { display: flex !important; align-items: center; gap: 8px; width: 100%; min-height: 40px; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); }
|
|
295
305
|
.ivt-df .n { margin-left: auto; }
|
|
296
306
|
.ivt-r.g .ivt-c { background: color-mix(in srgb, var(--cz-well) 40%, var(--cz-card)); }
|
|
@@ -298,13 +308,16 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
298
308
|
.ivt-grid { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
|
|
299
309
|
.ivt-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--cz-hair); }
|
|
300
310
|
.ivt-band { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: color-mix(in srgb, var(--cz-blue) 16%, transparent); }
|
|
301
|
-
.ivt-b { position: absolute !important; top: 50%; height: 20px; margin-top: -10px !important; border-radius: 999px !important; background: var(--cz-
|
|
311
|
+
.ivt-b { position: absolute !important; top: 50%; height: 20px; margin-top: -10px !important; border-radius: 999px !important; background: var(--cz-card) !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)); display: flex !important; align-items: center; justify-content: flex-end; padding: 0 3px !important; z-index: 1; touch-action: pan-y; }
|
|
302
312
|
.ivt-b[data-ivt-drag] { cursor: grab; }
|
|
303
313
|
.ivt-b.drag { cursor: grabbing; box-shadow: 0 0 0 2px var(--cz-blue); z-index: 4; }
|
|
304
|
-
|
|
305
|
-
.ivt-
|
|
306
|
-
.ivt-b.
|
|
307
|
-
.ivt-b.
|
|
314
|
+
/* the bar wears its task box (StsA1Desk): To do hollow, In progress solid blue, Done grey, Won't do dashed. Late keeps the status fill and
|
|
315
|
+
* draws .ivt-late after the bar: a --cz-late line from the day after the due day to Today, ending in a dot. A Jira ticket's bar is the same. */
|
|
316
|
+
.ivt-b.pr { background: color-mix(in srgb, var(--cz-blue) 82%, var(--cz-card)) !important; box-shadow: none; }
|
|
317
|
+
.ivt-b.dn { background: color-mix(in srgb, var(--cz-ink3) 30%, var(--cz-card)) !important; box-shadow: none; }
|
|
318
|
+
.ivt-b.wo { background: transparent !important; box-shadow: none; outline: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)); outline-offset: -1.5px; }
|
|
319
|
+
.ivt-late { position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--cz-late); z-index: 1; pointer-events: auto; }
|
|
320
|
+
.ivt-late::after { content: ""; position: absolute; right: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--cz-late); }
|
|
308
321
|
.ivt-gp { position: absolute; top: 3px; bottom: 3px; width: 6px; border-radius: 3px; background: var(--cz-card); box-shadow: 0 0 0 1px var(--cz-hair); cursor: ew-resize; opacity: 0; }
|
|
309
322
|
.ivt-gp.l { left: 2px; } .ivt-gp.r { right: 2px; }
|
|
310
323
|
.ivt-b:hover .ivt-gp, .ivt-b.drag .ivt-gp { opacity: 1; }
|
|
@@ -312,9 +325,10 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
312
325
|
.ivt-b .ivt-av { pointer-events: none; }
|
|
313
326
|
.ivt-d { position: absolute !important; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px !important; border-radius: 50% !important; background: var(--cz-card) !important; border: 2.5px solid var(--cz-ink3) !important; z-index: 1; }
|
|
314
327
|
.ivt-d.pr { border-color: var(--cz-blue) !important; }
|
|
315
|
-
.ivt-d.
|
|
328
|
+
.ivt-d.to { border-color: color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)) !important; }
|
|
329
|
+
.ivt-d.pr:not(.ms) { background: var(--cz-blue) !important; }
|
|
316
330
|
.ivt-d.dn { border-color: color-mix(in srgb, var(--cz-ink3) 40%, var(--cz-card)) !important; }
|
|
317
|
-
.ivt-d.
|
|
331
|
+
.ivt-d.wo { border-style: dashed !important; }
|
|
318
332
|
.ivt-g { position: absolute !important; top: 50%; height: 20px; width: 36px; margin-top: -10px !important; border-radius: 999px !important; border: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 50%, var(--cz-card)) !important; display: inline-flex !important; align-items: center; justify-content: center; color: var(--cz-ink3) !important; z-index: 1; }
|
|
319
333
|
.ivt-g:hover { border-color: var(--cz-blue) !important; color: var(--cz-blueink) !important; }
|
|
320
334
|
.ivt-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--cz-solid); color: var(--cz-onsolid); font-size: var(--fs-2); font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
|
|
@@ -323,10 +337,42 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
323
337
|
.ivt-lg { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-2); color: var(--cz-ink3); padding: 8px 4px 0; }
|
|
324
338
|
.ivt-lg span { display: inline-flex; align-items: center; gap: 6px; }
|
|
325
339
|
.ivt-lg i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; background: var(--cz-well2); }
|
|
326
|
-
.ivt-lg i.pr { background: color-mix(in srgb, var(--cz-blue) 30%, var(--cz-card)); }
|
|
327
|
-
.ivt-lg i.lt { background: color-mix(in srgb, var(--cz-risk) 30%, var(--cz-card)); }
|
|
328
340
|
.ivt-lg i.dd { width: 10px; height: 10px; border-radius: 50%; background: var(--cz-card); border: 2px solid var(--cz-ink3); }
|
|
329
341
|
.ivt-lg .h { margin-left: auto; }
|
|
342
|
+
/* the columns (StsA5Columns): Task, then Key, Status, Start, Due, Owner as the PM keeps them (the view sheet's Columns). Each cell's width is
|
|
343
|
+
* its place's --tl-cNw (ini-tasks.js place); the name column is the title's room plus theirs. A narrow panel hides them from the right,
|
|
344
|
+
* zeroing the width it hides; a phone shows none (the title sits above its bar). The box shows once: in Status, or before the title. */
|
|
345
|
+
.ivt.cols { --nw: calc(clamp(150px, 24cqw, 280px) + var(--tl-c1w, 0px) + var(--tl-c2w, 0px) + var(--tl-c3w, 0px) + var(--tl-c4w, 0px) + var(--tl-c5w, 0px)); }
|
|
346
|
+
.ivt.cols .ivt-n { gap: 0; }
|
|
347
|
+
.ivt-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
|
|
348
|
+
.ivt-r.ax .ivt-t, .ivt-r.ax .ivt-col { font-size: var(--fs-1); font-weight: 700; color: var(--cz-ink3); }
|
|
349
|
+
.ivt-col { flex: none; box-sizing: border-box; padding-left: 8px; display: flex; align-items: center; min-width: 0; font-size: var(--fs-2); color: var(--cz-ink2); white-space: nowrap; overflow: hidden; }
|
|
350
|
+
.ivt-col.p1 { width: var(--tl-c1w); } .ivt-col.p2 { width: var(--tl-c2w); } .ivt-col.p3 { width: var(--tl-c3w); } .ivt-col.p4 { width: var(--tl-c4w); } .ivt-col.p5 { width: var(--tl-c5w); }
|
|
351
|
+
.ivt-col .lt { color: var(--cz-late); font-weight: 700; }
|
|
352
|
+
.ivt-key { font-size: var(--fs-2); font-weight: 700; color: var(--cz-blueink) !important; text-decoration: underline; text-underline-offset: 2px; padding: 0 !important; min-height: 0 !important; }
|
|
353
|
+
.ivt-st { display: inline-flex !important; align-items: center; gap: 7px; height: 28px; padding: 0 8px 0 4px !important; margin-left: -4px; border-radius: 8px !important; font-size: var(--fs-2); color: var(--cz-ink2) !important; white-space: nowrap; min-height: 0 !important; }
|
|
354
|
+
.ivt-st .iv-cb { margin-top: 0 !important; }
|
|
355
|
+
button.ivt-st:hover, button.ivt-st[aria-expanded="true"] { background: var(--cz-well) !important; }
|
|
356
|
+
.ivt-st.dr .iv-cb { border-style: dashed !important; border-radius: 50% !important; }
|
|
357
|
+
.ivt-bx, .ivt-t > .iva-mg { display: inline-flex; flex: none; }
|
|
358
|
+
@container (min-width: 521px) {
|
|
359
|
+
.ivt.cols .ivt-bx[class*="bx-p"] { display: none; }
|
|
360
|
+
.ivt.cols .ivt-wn[class*="wn-p"] { display: none; }
|
|
361
|
+
}
|
|
362
|
+
@container (max-width: 939px) { .ivt.cols { --tl-c5w: 0px !important; } .ivt-col.p5 { display: none; } .ivt-bx.bx-p5, .ivt-wn.wn-p5 { display: inline-flex !important; } }
|
|
363
|
+
@container (max-width: 859px) { .ivt.cols { --tl-c4w: 0px !important; } .ivt-col.p4 { display: none; } .ivt-bx.bx-p4, .ivt-wn.wn-p4 { display: inline-flex !important; } }
|
|
364
|
+
@container (max-width: 759px) { .ivt.cols { --tl-c3w: 0px !important; } .ivt-col.p3 { display: none; } .ivt-bx.bx-p3, .ivt-wn.wn-p3 { display: inline-flex !important; } }
|
|
365
|
+
@container (max-width: 679px) { .ivt.cols { --tl-c2w: 0px !important; } .ivt-col.p2 { display: none; } .ivt-bx.bx-p2, .ivt-wn.wn-p2 { display: inline-flex !important; } }
|
|
366
|
+
@container (max-width: 559px) { .ivt.cols { --tl-c1w: 0px !important; } .ivt-col.p1 { display: none; } .ivt-bx.bx-p1, .ivt-wn.wn-p1 { display: inline-flex !important; } }
|
|
367
|
+
/* the view sheet's Columns (StsA7Picker): a check box for each, two to a row; Task always */
|
|
368
|
+
.ivs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
|
|
369
|
+
.ivs-ck { display: flex !important; align-items: center; gap: 10px; height: 36px; padding: 0 6px !important; border-radius: 10px !important; font-size: var(--fs-3); font-weight: 600; color: var(--cz-ink) !important; text-align: left; }
|
|
370
|
+
.ivs-ck:hover { background: var(--cz-well) !important; }
|
|
371
|
+
.ivs-ck[aria-disabled="true"] { cursor: default; background: transparent !important; }
|
|
372
|
+
.ivs-ck i { width: 18px; height: 18px; border-radius: 5px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1.6px solid color-mix(in srgb, var(--cz-ink3) 60%, var(--cz-card)); color: var(--cz-card); box-sizing: border-box; }
|
|
373
|
+
.ivs-ck.on i { background: var(--cz-blue); border-color: var(--cz-blue); }
|
|
374
|
+
.ivs-ck small { margin-left: auto; font-size: var(--fs-1); font-weight: 600; color: var(--cz-ink3); }
|
|
375
|
+
|
|
330
376
|
/* a phone: the title sits above its bar; no drag (tap a bar for the picker) */
|
|
331
377
|
@container (max-width: 520px) {
|
|
332
378
|
.ivt { --nw: 0px; }
|
|
@@ -358,7 +404,7 @@ button.iv-chip:hover { background: var(--cz-well) !important; }
|
|
|
358
404
|
.ivk-d { background: var(--cz-card); border-radius: 12px; border: 1px solid var(--cz-hair); padding: 9px 9px 7px; display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
|
|
359
405
|
.ivk-d[draggable="true"] { cursor: grab; }
|
|
360
406
|
.ivk-d.drag { opacity: .5; }
|
|
361
|
-
.ivk-d .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; gap: 2px; }
|
|
407
|
+
.ivk-d > .w { flex: 1; min-width: 0; color: inherit; font-weight: 400; display: flex; flex-direction: column; gap: 2px; }
|
|
362
408
|
.ivk-d .iv-tt { font-size: var(--fs-3); line-height: 1.3; overflow-wrap: anywhere; }
|
|
363
409
|
.ivk-d.x .iv-tt { color: var(--cz-ink3); font-weight: 600; }
|
|
364
410
|
.ivk-m { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2); color: var(--cz-ink3); min-height: 22px; }
|
|
@@ -593,7 +639,8 @@ button.lk-mt:hover { color: var(--cz-ink) !important; }
|
|
|
593
639
|
.iv-tr.drag { opacity: .45; }
|
|
594
640
|
.ig-key { font-family: var(--cz-mono); font-size: var(--fs-1); font-weight: 700; color: var(--cz-ink3); background: var(--cz-well); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
|
|
595
641
|
.ig-tk { text-align: left; }
|
|
596
|
-
|
|
642
|
+
/* a ticket's own key is grey mono; a task linked to a ticket keeps its key blue, as the List draws it (em.lk) */
|
|
643
|
+
.ig-tk .iv-tt em:not(.lk), .ivt-n .iv-tt em:not(.lk), .ivk-d .iv-tt em:not(.lk) { font-style: normal; font-family: var(--cz-mono); font-size: var(--fs-2); color: var(--cz-ink3); }
|
|
597
644
|
.ig-tkd { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); margin-top: 1px; }
|
|
598
645
|
.ig-sq { width: 12px; height: 12px; border-radius: 3px; flex: none; margin: 4px 3px 0; background: var(--cz-ink3); }
|
|
599
646
|
.ig-sq.doing { background: var(--cz-blue); }
|
|
@@ -774,10 +821,13 @@ button.lk-mt:hover { color: var(--cz-ink) !important; }
|
|
|
774
821
|
.iva-md.st { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px !important; }
|
|
775
822
|
.iva-md.dn { background: var(--cz-ink3) !important; border-color: var(--cz-ink3) !important; }
|
|
776
823
|
.iva-md.lt { border-color: var(--cz-late) !important; }
|
|
777
|
-
.iva-tb { position: absolute; top: 50%; height: 10px; margin-top: -5px !important; border-radius: 5px !important; background: var(--cz-
|
|
778
|
-
.iva-tb.pr { background: color-mix(in srgb, var(--cz-blue)
|
|
779
|
-
.iva-tb.
|
|
780
|
-
.iva-tb.
|
|
824
|
+
.iva-tb { position: absolute; top: 50%; height: 10px; margin-top: -5px !important; border-radius: 5px !important; background: var(--cz-card) !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)); z-index: 1; padding: 0 !important; min-width: 6px; }
|
|
825
|
+
.iva-tb.pr { background: color-mix(in srgb, var(--cz-blue) 82%, var(--cz-card)) !important; box-shadow: none; }
|
|
826
|
+
.iva-tb.dn { background: color-mix(in srgb, var(--cz-ink3) 30%, var(--cz-card)) !important; box-shadow: none; }
|
|
827
|
+
.iva-tb.wo { background: transparent !important; box-shadow: none; outline: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)); outline-offset: -1.5px; }
|
|
828
|
+
/* a late task on the stage card: its status fill, then a 3 px --cz-late line to Today with a dot (StsA2Stage) */
|
|
829
|
+
.iva-late { position: absolute; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--cz-late); z-index: 1; }
|
|
830
|
+
.iva-late::after { content: ""; position: absolute; right: -3.5px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--cz-late); }
|
|
781
831
|
.iva-tb.dr { background: transparent !important; outline: 1.5px dashed var(--cz-ink3); outline-offset: -1.5px; }
|
|
782
832
|
.iva-r.k .iv-bxw { align-self: center; }
|
|
783
833
|
.iva-r.k .iv-cb { margin-top: 0 !important; }
|
|
@@ -795,7 +845,7 @@ button.iva-tb:hover, button.iva-r.g:not(:disabled):hover { filter: brightness(.9
|
|
|
795
845
|
.iva-r.g.nm .iva-l, .iva-r.k .iva-l { position: absolute; top: 5px; width: auto; --at: max(0px, min((100% - var(--an) - 14px) * var(--tl-p, 0), 100% - var(--an) - 234px)); left: calc(var(--an) + var(--at)); max-width: calc(100% - var(--an) - var(--at) - 8px); padding: 0; z-index: 3; gap: 5px; }
|
|
796
846
|
.iva-r.g.nm .iva-l small, .iva-r.g.nm .iva-ch { display: none; }
|
|
797
847
|
.iva-r.g.nm .iva-l b { font-size: var(--fs-2); }
|
|
798
|
-
.iva-r.g.nm .iva-b, .iva-r.g.nm .iva-md, .iva-r.k .iva-tb, .iva-r.k .iva-md { top: 32px; }
|
|
848
|
+
.iva-r.g.nm .iva-b, .iva-r.g.nm .iva-md, .iva-r.k .iva-tb, .iva-r.k .iva-md, .iva-r.k .iva-late { top: 32px; }
|
|
799
849
|
.iva-r.k .iva-n, .iva-r.k .iva-l { padding-left: 0; }
|
|
800
850
|
.iva-r.k .iva-l { padding-left: 0; }
|
|
801
851
|
.iva-r.k .iva-mg { display: none; }
|
|
@@ -1008,3 +1058,89 @@ button.iv-mt.iv-wf { padding: 0 !important; margin: 0 !important; }
|
|
|
1008
1058
|
}
|
|
1009
1059
|
html.ad-still .mi-svg *, html.ad-still .iv-card.adl, html.ad-still .iv-card.adl .iv-ask .ad-svg { animation: none !important; }
|
|
1010
1060
|
html.ad-still .mi-svg .mi-vn { stroke-dashoffset: 0; }
|
|
1061
|
+
/* the date picker as a phone's bottom sheet (batch 18 item 16, StA3Dates, StA4Milestone): its title and ✕, the task's name under it */
|
|
1062
|
+
.tkc .tkc-dp .ivd-h { display: flex; align-items: center; gap: 8px; height: 40px; font-size: var(--fs-4); color: var(--cz-ink); }
|
|
1063
|
+
.tkc .tkc-dp .ivd-h .iv-ib { margin-left: auto; }
|
|
1064
|
+
.tkc .tkc-dp .ivd-s { margin: 0 0 10px; font-size: var(--fs-2); font-weight: 600; color: var(--cz-ink3); }
|
|
1065
|
+
.tkc.ivq.vs-pop.sheet .tkc-dp { width: 100%; }
|
|
1066
|
+
/* a milestone on the Tasks Timeline (batch 18 item 16, StA9Timeline): its ◇ on its date and the date beside it, no bar */
|
|
1067
|
+
.ivt-ms.lb { pointer-events: none; }
|
|
1068
|
+
.ivt-ms.lb b { margin-left: 11px; }
|
|
1069
|
+
.ivt-d.drag + .ivt-ms.lb { opacity: 0; }
|
|
1070
|
+
|
|
1071
|
+
/* ── a task changed where it sits in the List (batch 18 item 16, agreed A; canvas In development St*) ──
|
|
1072
|
+
* One line per task (StA1Rows): the box, the title, its days at the right (a phone: the due day only), the owner's face on a desktop. A title
|
|
1073
|
+
* press opens the row in place (StA2Edit): the name field, then one quiet line: status, Start – Due, ⋯ right after the dates (StA8Desk). */
|
|
1074
|
+
.iv-tr.q { align-items: center; position: relative; box-sizing: border-box; }
|
|
1075
|
+
.iv-tr.q .iv-bxw { align-self: center; }
|
|
1076
|
+
.iv-tr.q > .w { flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
|
|
1077
|
+
.iv-tr.q .iv-tn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
|
|
1078
|
+
.iv-tr.q .iv-tt { display: block !important; flex: 0 1 auto; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 600; }
|
|
1079
|
+
.iv-tr.q .iv-rm { flex: none; display: inline-flex; align-items: center; gap: 0; min-height: 0; max-width: 55%; white-space: nowrap; }
|
|
1080
|
+
.iv-tr.q .iv-dc { margin: 0 !important; white-space: nowrap; }
|
|
1081
|
+
.iv-dms { display: inline-flex; margin-right: 4px; color: var(--cz-ink2); }
|
|
1082
|
+
.iv-rav { width: 24px; height: 24px; margin-left: 10px; background: var(--cz-well); color: var(--cz-ink2); }
|
|
1083
|
+
/* the grip (a desktop, on hover): it sits in the row's left gutter */
|
|
1084
|
+
.iv-grip { position: absolute; left: -26px; top: 50%; width: 20px; height: 28px; margin-top: -14px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); cursor: grab; opacity: 0; border-radius: 6px; touch-action: none; }
|
|
1085
|
+
.iv-tr.q:hover .iv-grip { opacity: 1; }
|
|
1086
|
+
.iv-grip:hover { background: var(--cz-well); color: var(--cz-ink2); }
|
|
1087
|
+
@media (hover: none), (pointer: coarse) { .iv-grip { display: none; } }
|
|
1088
|
+
@media (max-width: 760px) {
|
|
1089
|
+
.iv-dst, .iv-rav, .iv-tr.q .iv-late, .iv-tr.q .vs-sl { display: none; }
|
|
1090
|
+
}
|
|
1091
|
+
/* the open row: a soft blue wash across the list's width */
|
|
1092
|
+
.iv-tr.iv-ed { box-sizing: border-box; flex-wrap: nowrap; align-items: flex-start; background: var(--cz-bluebg); margin: 0 -14px 0 -46px; padding: 10px 14px 12px 46px !important; width: calc(100% + 60px); border-top: 0 !important; }
|
|
1093
|
+
.iv-tr.iv-ed .iv-bxw { margin-top: 11px; }
|
|
1094
|
+
.iv-tr.iv-ed + .iv-tr { border-top: 0 !important; }
|
|
1095
|
+
.iv-tr.iv-ed > .w { gap: 8px; }
|
|
1096
|
+
.iv-edf { display: flex; }
|
|
1097
|
+
.iv-edn { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1.5px solid var(--cz-blue); background: var(--cz-card); color: var(--cz-ink); padding: 0 12px; font: inherit; font-size: var(--fs-3); }
|
|
1098
|
+
.iv-edn:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cz-blue) 22%, transparent); }
|
|
1099
|
+
.iv-ed.jr .iv-tt { white-space: normal; font-weight: 700; }
|
|
1100
|
+
.iv-edj { margin: 0; font-size: var(--fs-2); font-weight: 700; color: var(--cz-ink2); }
|
|
1101
|
+
.iv-edj span { color: var(--cz-ink3); font-weight: 600; }
|
|
1102
|
+
.iv-edl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
1103
|
+
.iv .iv-edc { height: 34px; padding: 0 12px !important; border-radius: 999px !important; background: var(--cz-card) !important; display: inline-flex !important; align-items: center; gap: 6px; color: var(--cz-ink) !important; font-size: var(--fs-2); box-shadow: 0 0 0 1px var(--cz-hair); white-space: nowrap; }
|
|
1104
|
+
.iv .iv-edc small { color: var(--cz-ink3); font-weight: 700; font-size: var(--fs-1); }
|
|
1105
|
+
.iv .iv-edc b { font-weight: 800; }
|
|
1106
|
+
.iv .iv-edc:hover, .iv .iv-edc[aria-expanded="true"] { box-shadow: 0 0 0 1.5px var(--cz-blue); }
|
|
1107
|
+
.iv .iv-edc.dash { background: transparent !important; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 55%, var(--cz-card)) !important; color: var(--cz-ink2) !important; font-weight: 700; }
|
|
1108
|
+
.iv .iv-edc.ms[aria-expanded="true"], .iv .iv-edc.ms:not(.dash) { box-shadow: 0 0 0 1.5px var(--cz-blue); }
|
|
1109
|
+
.iv .iv-edst { padding: 0 8px 0 10px !important; gap: 2px; color: var(--cz-ink2) !important; }
|
|
1110
|
+
.iv-eds { color: var(--cz-ink3); font-weight: 700; }
|
|
1111
|
+
/* a phone keeps the line on one row: the chips drop their Start / Due words (the order says it; the names stay in aria-label) */
|
|
1112
|
+
@media (max-width: 760px) {
|
|
1113
|
+
.iv-edl { gap: 4px; flex-wrap: nowrap; }
|
|
1114
|
+
.iv .iv-edc { padding: 0 9px !important; }
|
|
1115
|
+
.iv .iv-edd small { display: none; }
|
|
1116
|
+
.iv-edl .iv-edm { min-width: 44px; }
|
|
1117
|
+
}
|
|
1118
|
+
.iv-edm { color: var(--cz-ink2); }
|
|
1119
|
+
/* + on an open stage: between the count and the chevron (StA1Rows) */
|
|
1120
|
+
.iv-ws.pl > .n { margin-right: 40px; }
|
|
1121
|
+
.iv-wsw > .iv-plus { position: absolute; right: 34px; top: 50%; margin: -16px 0 0 !important; z-index: 2; }
|
|
1122
|
+
.iv-plus.on { background: var(--cz-bluebg); color: var(--cz-blueink); }
|
|
1123
|
+
/* the add field at the top of the stage (StA5Add) */
|
|
1124
|
+
.iv-addin { margin: 0 -14px 0 -46px; padding: 10px 14px 4px 46px; background: var(--cz-bluebg); gap: 10px; }
|
|
1125
|
+
.iv-addin .iv-cb { margin-top: 0 !important; border-style: solid; }
|
|
1126
|
+
.iv-addin input { border: 1.5px solid var(--cz-blue); }
|
|
1127
|
+
.iv-addd { margin: 0 -14px 0 -46px; padding: 4px 14px 12px 46px; background: var(--cz-bluebg); }
|
|
1128
|
+
/* the drag (StA10Drag): the row lifts and follows the pointer; its slot stays as a dashed ghost; the target stage lights up; a blue line marks the drop */
|
|
1129
|
+
.iv-tr.iv-ghost { outline: 1.5px dashed color-mix(in srgb, var(--cz-ink3) 50%, var(--cz-card)); outline-offset: -2px; opacity: .55; }
|
|
1130
|
+
.iv-fly { position: fixed; z-index: 1001; left: var(--fly-x, 0); top: var(--fly-y, 0); width: var(--fly-w, 320px); pointer-events: none; background: var(--cz-card); border-radius: 12px; padding: 7px 12px !important;
|
|
1131
|
+
box-shadow: 0 18px 40px -16px rgba(42,46,53,.45), 0 0 0 1px var(--cz-hair); display: flex; align-items: center; gap: 12px; font-family: var(--cz-sans); color: var(--cz-ink); }
|
|
1132
|
+
.iv-fly .iv-grip { position: static; opacity: 1; margin: 0; color: var(--cz-blueink); }
|
|
1133
|
+
.iv-fly .iv-tt { font-size: var(--fs-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1134
|
+
.iv-fly > .w { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
|
|
1135
|
+
.iv-fly .iv-rm { font-size: var(--fs-2); color: var(--cz-ink3); margin-left: auto; }
|
|
1136
|
+
.iv-wbs { position: relative; }
|
|
1137
|
+
.iv-dl { position: absolute; left: var(--dl-x, 14px); right: 12px; top: var(--dl-y, 0); height: 2px; margin-top: -1px; background: var(--cz-blue); pointer-events: none; z-index: 3; }
|
|
1138
|
+
.iv-dl::before { content: ""; position: absolute; left: -5px; top: -4px; width: 6px; height: 6px; border-radius: 50%; border: 2px solid var(--cz-blue); background: var(--cz-card); }
|
|
1139
|
+
.iv-ws.iv-tgt { background: var(--cz-bluebg) !important; }
|
|
1140
|
+
.iv-dtip { position: fixed; z-index: 1002; left: var(--fly-x, 0); top: var(--fly-y, 0); pointer-events: none; background: var(--cz-solid); color: var(--cz-onsolid); font-family: var(--cz-sans); font-size: var(--fs-2); font-weight: 700; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
|
|
1141
|
+
body.iv-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
|
|
1142
|
+
/* ⋯ of the open row (StA2bMore) */
|
|
1143
|
+
.tkc.ivq .ive-m .o.dl:hover { color: var(--cz-red); }
|
|
1144
|
+
.tkc.ivq .ive-m .ck { color: var(--cz-ink2); }
|
|
1145
|
+
/* the open row has its own status chip: the box's caret stays out */
|
|
1146
|
+
.iv-tr.iv-ed .iv-car { display: none !important; }
|
|
@@ -43,6 +43,7 @@ import { cardHtml as smCard, mergedHtml as smMerged } from './split-merge.js';
|
|
|
43
43
|
import * as MI from './mission.js'; // the initiative as a mission, the stage line's place (batch 18 item 1)
|
|
44
44
|
import * as AD from './cozy-adler.js'; // Adler on the card: his face for the ask, his full body for a real win
|
|
45
45
|
import * as MD from './metric-drafts.js'; // the success measure Claude drafts from the PRD (batch 15 item 1, canvas Iq9Initiative)
|
|
46
|
+
import * as ED from './ini-edit.js'; // a task changed where it sits in the List: open in place, ⋯, + per stage, drag (batch 18 item 16)
|
|
46
47
|
|
|
47
48
|
const CSS = new URL('./ini-view.css', import.meta.url).href;
|
|
48
49
|
if (typeof document !== 'undefined' && document.head && !document.querySelector(`link[href="${CSS}"]`)) {
|
|
@@ -170,21 +171,38 @@ function msCardHtml(v, o) { const h = msListHtml(v, o); return h ? `<section cla
|
|
|
170
171
|
const cardHasAdler = (v) => AD.prefs()['adler.amount'] !== 'off' && ((v.summary.tone === 'you' && !!v.summary.primary) || !!v.summary.claude);
|
|
171
172
|
|
|
172
173
|
/* ── the WBS ── */
|
|
174
|
+
const GRIP = 'M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01';
|
|
173
175
|
function taskHtml(x, o, arch) {
|
|
174
176
|
// the box marks done in one press; its caret opens the status picker right under it (an archived task has only the caret)
|
|
175
177
|
const car = o.quick && x.uid ? `<button type="button" class="iv-car" data-iv-stat="${esc(x.uid)}" data-st="${esc(x.status)}" data-ms="${x.ms ? 1 : 0}" aria-haspopup="dialog" aria-label="${esc('Change the status: ' + x.title)}" title="Status">${SVG(P.down, 10, 2.6)}</button>` : '';
|
|
176
178
|
const cls = ['iv-cb', x.done ? 'on' : '', x.prog ? 'pr' : '', x.wont ? 'wo' : ''].filter(Boolean).join(' ');
|
|
177
|
-
const chk = x.jkey && !x.dr ? `<span class="iv-bxw">${TV.jqMark(x)}${arch ? car :
|
|
179
|
+
const chk = x.jkey && !x.dr ? `<span class="iv-bxw">${TV.jqMark(x)}${arch ? car : TV.jcar(x.jkey, x.status, x.jst, x.title, o)}</span>` : x.dr ? `<span class="iv-bxw"><span class="iv-cb dr" aria-hidden="true"></span>${car}</span>` : x.canCheck && !arch ? `<span class="iv-bxw"><button type="button" class="${cls}" data-iv-check="${esc(x.uid)}" aria-pressed="${x.done}" aria-label="${esc((x.done ? 'Reopen: ' : 'Mark done: ') + x.title)}" title="${x.done ? 'Reopen' : 'Mark done'}">${x.done ? SVG(P.check, 12, 3) : ''}</button>${car}</span>`
|
|
178
180
|
: `<span class="iv-bxw"><span class="iv-cb off${x.done ? ' on' : ''}" aria-hidden="true">${x.done ? SVG(P.check, 12, 3) : ''}</span>${arch ? car : ''}</span>`;
|
|
179
181
|
// a task linked to the Jira ticket it names looks like the ticket rows beside it (batch 14 item 6): the Jira square, the key in blue.
|
|
180
182
|
// A key PMOS has not read is only text: a plain task with its box (0.442.0 hotfix)
|
|
181
183
|
const name = TV.keyName(x);
|
|
182
|
-
|
|
184
|
+
// batch 18 item 16 (StA2Edit): with quick changes on, a title press opens the row in place (one at a time); the task card moved to its ⋯
|
|
185
|
+
const edit = o.quick && x.uid && !arch && !!o.ivId;
|
|
186
|
+
if (edit && ED.openOf(o.ivId) === x.uid) return ED.rowHtml(x, o, chk, name);
|
|
187
|
+
// an open task drags inside its stage and to another stage (StA10Drag): a grip on hover on a desktop, a long press on the title on a phone
|
|
188
|
+
const lift = edit && o.stageMode && !x.closed;
|
|
189
|
+
const t = (edit ? `<button type="button" class="iv-tt" data-iv-edit="${esc(x.uid)}"${lift ? ' data-drag="1"' : ''}>${name}</button>` : o.openTask && x.uid && !x.dr ? `<button type="button" class="iv-tt" data-iv-task="${esc(x.uid)}">${name}</button>` : `<b class="iv-tt">${name}</b>`)
|
|
190
|
+
+ (edit && TV.msInDate(x) ? '' : TV.msGlyph(x)) + TV.addedMark(x);
|
|
191
|
+
if (edit) {
|
|
192
|
+
// one line (StA1Rows): the title, then at the right its days (a phone: the due day only; nothing without dates), the late days, the
|
|
193
|
+
// links' marks and the owner's face (a desktop)
|
|
194
|
+
const parts = [x.jkey ? TV.movingHtml(x.jmove) : '', x.days ? TV.dateBtn(x, o) + (x.lateText ? `<span class="iv-late">, ${esc(x.lateText)}</span>` : '') + TV.slipHtml(x) : TV.msNoDate(x) ? TV.dateBtn(x, o) : '', LK.metaHtml(x, o.lk, o.quick)].filter(Boolean);
|
|
195
|
+
const av = x.av && x.owner && x.owner !== 'You' ? `<span class="iv-av iv-rav" role="img" aria-label="${esc('Owner: ' + x.owner)}" title="${esc(x.owner)}">${esc(x.av)}</span>` : '';
|
|
196
|
+
const grip = lift ? `<span class="iv-grip" data-iv-grip="${esc(x.uid)}" title="Drag to move" aria-hidden="true">${SVG(GRIP, 16, 3)}</span>` : '';
|
|
197
|
+
// Your groups (batch 11 item 20): a task still drags to another of the PM's groups
|
|
198
|
+
const gd = o.gdrag && !x.dr ? ` draggable="true" data-ig-drag="${esc(x.uid)}"` : '';
|
|
199
|
+
return `<div class="iv-tr q${x.closed ? ' done' : ''}${x.wont ? ' wo' : ''}" data-iv-r="${esc(x.uid)}"${gd}>${grip}${chk}<span class="w"><span class="iv-tn">${t}</span>${parts.length || av ? `<span class="iv-rm">${parts.join('<span class="iv-sep" aria-hidden="true"> · </span>')}${av}</span>` : ''}</span></div>`;
|
|
200
|
+
}
|
|
183
201
|
// the meta: In progress, the dates (a press: the start and due picker opens under them), the late days, the owner
|
|
184
202
|
let meta = x.sub ? `<span class="${x.late ? 'w' : ''}">${esc(x.sub)}</span>` : '';
|
|
185
203
|
if (o.quick && x.uid) {
|
|
186
204
|
// no dates: the calendar icon sits last and shows on hover, so an undated row reads the same as before
|
|
187
|
-
const parts = [x.prog ? 'In progress' : '', x.days ? TV.dateBtn(x, o) + (x.lateText ? `<span class="iv-late">, ${esc(x.lateText)}</span>` : '') + TV.slipHtml(x) : '', LK.metaHtml(x, o.lk, o.quick), x.owner && x.owner !== 'You' ? esc(x.owner) : ''];
|
|
205
|
+
const parts = [x.jkey ? TV.movingHtml(x.jmove) : '', x.prog && !(x.jmove && x.jmove.state === 'moving') ? 'In progress' : '', x.days ? TV.dateBtn(x, o) + (x.lateText ? `<span class="iv-late">, ${esc(x.lateText)}</span>` : '') + TV.slipHtml(x) : '', LK.metaHtml(x, o.lk, o.quick), x.owner && x.owner !== 'You' ? esc(x.owner) : ''];
|
|
188
206
|
meta = `<span class="iv-rm">${parts.filter(Boolean).join('<span class="iv-sep" aria-hidden="true"> · </span>')}${x.days ? '' : TV.dateBtn(x, o)}</span>`;
|
|
189
207
|
} else if (TV.msNoDate(x)) {
|
|
190
208
|
meta = `<span class="iv-rm">${x.sub ? `<span>${esc(x.sub)}</span> ` : ''}<span class="iv-dc ms">Set the due date</span></span>`;
|
|
@@ -204,8 +222,10 @@ function bodyHtml(v, sec, o) {
|
|
|
204
222
|
const byEp = new Map(); for (const k of sec.jira.open) { const e = k.epic || ''; if (!byEp.has(e)) byEp.set(e, []); byEp.get(e).push(k); }
|
|
205
223
|
const all = isOpen(v, sec.key + ':tk', false), shown = all ? sec.jira.open : sec.jira.open.slice(0, 3);
|
|
206
224
|
// the title opens the ticket; with quick changes on, its dates are a press too: the start and due kept in PMOS (batch 11 item 23)
|
|
207
|
-
|
|
208
|
-
|
|
225
|
+
// batch 18 item 16 (StA6Jira): its title opens it in place: Jira's title and status read-only, the start and due kept in PMOS
|
|
226
|
+
h += shown.map((k) => o.quick && o.ivId && ED.openOf(o.ivId) === k.key ? ED.ticketHtml(k, o)
|
|
227
|
+
: o.quick
|
|
228
|
+
? `<div class="iv-tr iv-tkr"><span class="iv-bxw"><span class="iv-jq${k.move && k.move.state === 'moving' ? ' mv' : ''}" aria-hidden="true"></span>${TV.jcar(k.key, k.status, k.raw, k.key + ' ' + k.title, o)}</span><span class="w"><button type="button" class="iv-tt" ${o.ivId ? 'data-iv-edit' : 'data-iv-ticket'}="${esc(k.key)}"><em>${esc(k.key)}</em> ${esc(k.title)}</button><span class="iv-rm">${TV.movingHtml(k.move) || `<span class="${k.warn ? 'w' : ''}">${esc(k.sub)}</span>`}${k.days ? '<span class="iv-sep" aria-hidden="true"> · </span>' : ''}${TV.dateBtn(TV.jiraRow(k), o)}</span></span></div>`
|
|
209
229
|
: `<button type="button" class="iv-tr iv-tk" data-iv-ticket="${esc(k.key)}"><span class="iv-jq" aria-hidden="true"></span><span class="w"><b class="iv-tt"><em>${esc(k.key)}</em> ${esc(k.title)}</b><span class="${k.warn ? 'w' : ''}">${esc(k.sub)}</span></span></button>`).join('');
|
|
210
230
|
if (sec.jira.open.length > shown.length) h += `<button type="button" class="iv-more" data-iv-fold="${esc(sec.key + ':tk')}" aria-expanded="false">${esc((sec.jira.open.length - shown.length) + ' more open' + (byEp.size > 1 ? ' · by epic' : ''))}${SVG(P.right, 14, 2)}</button>`;
|
|
211
231
|
h += `<p class="iv-q">${esc(sec.jira.done + ' of ' + sec.jira.total + ' done in Jira' + (sec.jira.at ? ' · ' + sec.jira.at : ''))}</p>`;
|
|
@@ -245,30 +265,39 @@ function markOf(sec) {
|
|
|
245
265
|
}
|
|
246
266
|
function sectionHtml(v, sec, o, inner) {
|
|
247
267
|
const key = 'sec:' + (sec.key || 'none'), op = isOpen(v, key, sec.open);
|
|
268
|
+
// a stage of the List by stage (batch 18 item 16): the drag's target, and on an open stage the + that adds a task into it (StA5Add)
|
|
269
|
+
const st = o.stageMode && !sec.stages && (sec.kind === 'stage' || sec.kind === 'none'), sk = esc(sec.key || '');
|
|
248
270
|
const has = sec.top.length || sec.groups.length || sec.done.length || (sec.archived || []).length || sec.jira || (sec.stages && sec.stages.length) || (sec.tk && sec.tk.length) || sec.tkEmpty;
|
|
249
271
|
const name = sec.label || sec.name;
|
|
250
|
-
const
|
|
272
|
+
const plus = st && op && has ? ED.plusHtml(sec, v.id || v.key || '', o) : '';
|
|
273
|
+
const row = `<button type="button" class="iv-ws${sec.kind === 'past' || sec.kind === 'later' ? ' mut' : ''}${inner ? ' in' : ''}${plus ? ' pl' : ''}"${st ? ` data-iv-sec="${sk}"` : ''} ${has ? `data-iv-fold="${esc(key)}" aria-expanded="${op}"` : 'disabled'}>${markOf(sec)}`
|
|
251
274
|
+ `<span class="w"><b>${esc(name)}</b>${sec.sub ? `<small class="${sec.subWarn ? 'w' : ''}">${esc(sec.sub)}</small>` : ''}</span>${sec.epicKey ? `<span class="ig-key">${esc(sec.epicKey)}</span>` : ''}${sec.count ? `<span class="n${sec.warn ? ' w' : ''}">${esc(sec.count)}</span>` : ''}${has ? chev(op) : ''}</button>`;
|
|
252
275
|
// a group's own presses sit beside its fold: ⋯ on the PM's own group, the send icon on an epic (batch 11 item 20)
|
|
253
|
-
const tools = G.toolsHtml(sec), head = tools ? `<div class="iv-wsw">${row}${tools}</div>` : row;
|
|
276
|
+
const tools = G.toolsHtml(sec) + plus, head = tools ? `<div class="iv-wsw">${row}${tools}</div>` : row;
|
|
254
277
|
// the PM's own groups and Not in a group take a dragged task
|
|
255
278
|
const drop = (h) => (sec.mine != null && o.gdrag ? `<div class="ig-dz" data-ig-drop="${esc(sec.mine || '')}">${h}</div>` : h);
|
|
256
279
|
if (!op || !has) return drop(head);
|
|
257
280
|
// the folded lines (past stages, Later) open into their own stages, each a section of its own
|
|
258
|
-
const body = sec.stages ? sec.stages.map((s) => sectionHtml(v, s, o, true)).join('') : bodyHtml(v, sec, o);
|
|
259
|
-
return drop(head + `<div class="iv-wl">${body}</div>`);
|
|
281
|
+
const body = sec.stages ? sec.stages.map((s) => sectionHtml(v, s, o, true)).join('') : (st ? ED.addHtml(sec, v.id || v.key || '') : '') + bodyHtml(v, sec, o);
|
|
282
|
+
return drop(head + `<div class="iv-wl"${st ? ` data-iv-sec="${sk}"` : ''}>${body}</div>`);
|
|
260
283
|
}
|
|
261
284
|
function tasksHtml(v0, o) {
|
|
262
285
|
// the grouping the PM picked (batch 11 item 20): every view draws its groups as it draws the stages
|
|
263
286
|
const v = G.view(v0), T = v.tasks;
|
|
264
|
-
|
|
287
|
+
// + sits on each open stage (batch 18 item 16, say it once); the header keeps it while there is no stage list to add into (no task yet,
|
|
288
|
+
// or the tasks grouped another way)
|
|
289
|
+
const stageMode = !!o.quick && (!T.by || T.by === 'stage') && !T.only;
|
|
290
|
+
const add = o.add && (T.empty || !stageMode) ? `<button type="button" class="iv-ib" data-iv-add aria-label="Add a task to ${esc(v.title)}" title="Add a task">${SVG(P.plus, 16, 2.2)}</button>` : '';
|
|
265
291
|
// the view switch shows once there is a task to see another way (zero is silence)
|
|
266
292
|
const mode = T.empty ? 'list' : TV.viewMode();
|
|
267
293
|
// planned versus actual (batch 11 item 8): the version chip and the end slip after the count; Make live (seal) while a draft is shown
|
|
268
294
|
const cnt = VS.countText(v.vs, T.count, T.open + T.done);
|
|
269
295
|
// links (batch 11 item 15): the blue ✦ (proposals), the grey ✦ (quiet moves), the late count, between the count and the version chip
|
|
270
296
|
const lk = T.empty ? null : LK.of(v);
|
|
271
|
-
|
|
297
|
+
// the List by stage edits in place (batch 18 item 16): ivId names the open row's initiative, stageMode turns on the + and the drag
|
|
298
|
+
const ivId = o.quick ? v.id || v.key || '' : '';
|
|
299
|
+
if (ivId) ED.stagesSet(ivId, v0, v);
|
|
300
|
+
o = { ...o, lk, ivId, stageMode, addIn: !!(o.add && o.quick), jiraRead: v.jiraRead || v0.jiraRead || '' };
|
|
272
301
|
const head = `<div class="iv-th"><b>Tasks</b>${cnt ? `<span class="n">${esc(cnt)}</span>` : ''}${LK.headHtml(lk)}${VS.headHtml(v.vs)}<span class="iv-sp"></span>${T.empty ? '' : G.headHtml(v) + TV.viewBtnHtml(mode) + TV.fullBtnHtml(mode)}${VS.liveHtml(v.vs)}${add}</div>`
|
|
273
302
|
+ (o.adding ? `<form class="iv-addf" data-iv-addform><input id="ivAddTask" type="text" maxlength="160" autocomplete="off" placeholder="A task for ${esc(v.title)}${o.addHint ? esc(', ' + o.addHint) : ''}" aria-label="New task"><button type="submit" class="iv-go" aria-label="Add the task" title="Add (Enter). Esc cancels.">${SVG(P.check, 16, 2.2)}</button></form>` : '');
|
|
274
303
|
// while Claude looks for a new initiative elsewhere, Tasks waits for what it finds (PiA1)
|
|
@@ -342,7 +371,7 @@ export function viewHtml(v, o = {}) {
|
|
|
342
371
|
export function wireView(body, h) {
|
|
343
372
|
if (!body) return;
|
|
344
373
|
const idOf = () => { const n = body.querySelector('[data-iv]'); return n ? n.dataset.iv : null; };
|
|
345
|
-
body.__iv = LK.wrap(VS.wrap(h, body, (id) => SHOWN.get(id)), idOf);
|
|
374
|
+
body.__iv = LK.wrap(VS.wrap(ED.writes({ ...h, __id: idOf }), body, (id) => SHOWN.get(id)), idOf);
|
|
346
375
|
// the one blue ✦ after the title (pm/ini-props.js), drawn again with each draw of the initiative
|
|
347
376
|
const chip = () => { const id = idOf(); if (id && VIEWED.has(id)) PP.sync(VIEWED.get(id), body.__iv || {}); drafts(id); };
|
|
348
377
|
// the success measure Claude drafted: read once per page load, the view draws again when it arrives
|
|
@@ -392,6 +421,7 @@ export function wireView(body, h) {
|
|
|
392
421
|
if (d.md && MD.press(b, { redraw: H.redraw, toast: H.toast })) { e.preventDefault(); return; }
|
|
393
422
|
if (VS.press(b, d, root, H)) return;
|
|
394
423
|
if (G.press(b, d, root, H)) return;
|
|
424
|
+
if (ED.press(b, d, root, H, e)) return;
|
|
395
425
|
if (LK.press(b, d, root, { ...H, __dates: (x) => TV.press(x, { ivtBar: x.dataset.ivtBar }, root, H, e) })) return;
|
|
396
426
|
if (TV.press(b, d, root, { ...H, __v: SHOWN.get(id), __g: G.api(root, H) }, e)) return;
|
|
397
427
|
if (d.ivFold) { e.preventDefault(); const k = id + '|' + d.ivFold; FOLD.set(k, b.getAttribute('aria-expanded') !== 'true'); if (H.redraw) H.redraw(); return; }
|
|
@@ -422,6 +452,7 @@ export function wireView(body, h) {
|
|
|
422
452
|
if (t && H.addTask) H.addTask(t, inp);
|
|
423
453
|
});
|
|
424
454
|
G.wireDrag(body);
|
|
455
|
+
ED.wire(body);
|
|
425
456
|
TV.wireDrag(body, () => { LK.draw(body, true); const n = body.querySelector('[data-iv]'); if (n) LK.sweep(n.dataset.iv, body.__iv || {}); });
|
|
426
457
|
body.addEventListener('keydown', (e) => { if (e.key === 'Escape' && e.target.id === 'ivAddTask') { e.stopPropagation(); const H = body.__iv || {}; if (H.addCancel) H.addCancel(); } });
|
|
427
458
|
}
|
|
@@ -492,4 +523,4 @@ function showIn(b, id, H, key, uid) {
|
|
|
492
523
|
}
|
|
493
524
|
|
|
494
525
|
/** For the tests: forget every fold the PM opened or shut. */
|
|
495
|
-
export const resetFolds = () => { LINE.clear(); FOLD.clear(); TV.resetViews(); VS.resetVersions(); LK.resetLinks(); G.resetGroups(); };
|
|
526
|
+
export const resetFolds = () => { LINE.clear(); FOLD.clear(); TV.resetViews(); VS.resetVersions(); LK.resetLinks(); G.resetGroups(); ED.reset(); };
|
|
@@ -22,6 +22,15 @@ export function kindLine(row) {
|
|
|
22
22
|
/** A workflow's stages in order, a milestone marked ◆. */
|
|
23
23
|
export const chainText = (wf) => ((wf && wf.stages) || []).map((s) => (s.milestone ? '◆\u00a0' : '') + s.name).join(' → ');
|
|
24
24
|
|
|
25
|
+
/** Several libraries (GET /api/workflows of the initiative's workspace, then of the home workspace) as one list: the first list wins for an id
|
|
26
|
+
* both hold; Product feature first, then by name, archived last (as the server sorts one library). */
|
|
27
|
+
export function mergeLibraries(...lists) {
|
|
28
|
+
const byId = new Map();
|
|
29
|
+
for (const l of lists) for (const w of l || []) if (w && w.id && !byId.has(w.id)) byId.set(w.id, w);
|
|
30
|
+
const rank = (w) => (w.id === 'product-feature' ? 0 : w.archived ? 2 : 1);
|
|
31
|
+
return [...byId.values()].sort((a, b) => rank(a) - rank(b) || String(a.name || '').localeCompare(String(b.name || '')));
|
|
32
|
+
}
|
|
33
|
+
|
|
25
34
|
/** The Change picker: every workflow that is not archived (Product feature first, as GET /api/workflows answers), with its stage count. */
|
|
26
35
|
export function pickerItems(lib, row) {
|
|
27
36
|
const cur = wfOf(row).id;
|
|
@@ -19,15 +19,20 @@ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&':
|
|
|
19
19
|
const SVG = (d, w = 16, sw = 1.8) => `<svg aria-hidden="true" width="${w}" height="${w}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${sw}" stroke-linecap="round" stroke-linejoin="round"><path d="${d}"/></svg>`;
|
|
20
20
|
const NEXT = 'M5 12h14M13 6l6 6-6 6', PLUS = 'M12 5v14M5 12h14', CLOSE = 'M6 6l12 12M18 6L6 18';
|
|
21
21
|
|
|
22
|
-
/* ── the library (GET /api/workflows), read again on each picker ──
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
/* ── the library (GET /api/workflows), read again on each picker ──
|
|
23
|
+
* Settings › Workflows saves to the home workspace's library, and an initiative may sit in another workspace (a product). The picker lists both,
|
|
24
|
+
* the initiative's own workspace first for a workflow both have; a switch to one only the home library holds is written into the initiative's
|
|
25
|
+
* workspace by the server. */
|
|
26
|
+
const LIB = { list: null, at: 0, ws: '' };
|
|
27
|
+
export async function library(ui, force, ws = '') {
|
|
28
|
+
if (!force && LIB.list && LIB.ws === ws && Date.now() - LIB.at < 15000) return LIB.list;
|
|
29
|
+
const [home, own] = await Promise.all([ui.pmGet('/api/workflows'), ws ? ui.pmGet('/api/workflows?ws=' + encodeURIComponent(ws)) : null]);
|
|
30
|
+
const lists = [own, home].filter((r) => r && r.ok && Array.isArray(r.workflows)).map((r) => r.workflows);
|
|
31
|
+
if (lists.length) { LIB.list = WM.mergeLibraries(...lists); LIB.at = Date.now(); LIB.ws = ws; }
|
|
28
32
|
return LIB.list || [];
|
|
29
33
|
}
|
|
30
|
-
export const _lib = (list) => { LIB.list = list; LIB.at = list ? Date.now() : 0; }; // for a test
|
|
34
|
+
export const _lib = (list) => { LIB.list = list; LIB.at = list ? Date.now() : 0; LIB.ws = ''; }; // for a test
|
|
35
|
+
const wsOf = (ui, id) => { try { return (ui.bw(id) || {}).ws || ''; } catch { return ''; } };
|
|
31
36
|
|
|
32
37
|
async function after(ui, r, ok) {
|
|
33
38
|
if (!r || r.ok === false) { ui.toast((r && r.error) || 'Nothing was changed.'); return false; }
|
|
@@ -39,7 +44,7 @@ async function after(ui, r, ok) {
|
|
|
39
44
|
/* ── the Change picker (WfTriage) ── */
|
|
40
45
|
export async function openPicker(anchor, ui, id) {
|
|
41
46
|
const row = ui.row(id) || {};
|
|
42
|
-
const lib = await library(ui);
|
|
47
|
+
const lib = await library(ui, false, wsOf(ui, id));
|
|
43
48
|
const items = WM.pickerItems(lib, row);
|
|
44
49
|
const cur = lib.find((w) => w.id === ((row.wf || {}).id || 'product-feature'));
|
|
45
50
|
const by = WM.setByPmos(row);
|
|
@@ -68,7 +73,7 @@ function newWorkflow(ui, id) {
|
|
|
68
73
|
/* ── switch to another workflow (WfAChange) ── */
|
|
69
74
|
export async function openSwitch(anchor, ui, id, wfId) {
|
|
70
75
|
const row = ui.row(id) || {};
|
|
71
|
-
const lib = await library(ui);
|
|
76
|
+
const lib = await library(ui, false, wsOf(ui, id));
|
|
72
77
|
const to = lib.find((w) => w.id === wfId);
|
|
73
78
|
if (!to) { ui.toast('That workflow could not be read.'); return; }
|
|
74
79
|
const title = ui.title(id), fromWf = row.wf || { name: 'Product feature', icon: 'feature' };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* pm/ins-pane.js — Intelligence as the first panel (panels on Board and Intelligence, P-B; canvas In development BiI1Split to BiI4Wide, sticky
|
|
2
|
+
* "What to build" items 0, 3 and 5). What the panels engine (cozy-panels.js mountPanels) needs from the page, the narrow form, the Moved by
|
|
3
|
+
* column that steps aside, and the open row's mark.
|
|
4
|
+
* SOURCES the goal and budget rows and the goal cards: a drag on the row or ⌘/Ctrl-click opens it beside.
|
|
5
|
+
* fit() the px the key results table needs to be whole without Moved by: about 880. Under it the page shows its goal cards.
|
|
6
|
+
* mount({ page, table, selecting() }) once: the narrow form (pm/pn-narrow.js), Moved by, and the mark that follows the open Viewers. */
|
|
7
|
+
import { narrowForm } from './pn-narrow.js';
|
|
8
|
+
import { panels, onChange as vwChange } from './cozy-viewer.js';
|
|
9
|
+
|
|
10
|
+
export const SOURCES = '#goalTbl .ins-row[data-goal], #goalTbl .ins-row[data-budget], #goalCards .ins-card[data-goal]';
|
|
11
|
+
export const fit = () => 880;
|
|
12
|
+
const MV = 150; // the narrowest Moved by that still reads: its dots and an initiative's name
|
|
13
|
+
|
|
14
|
+
/** The ids an open Viewer shows: goal:<id> and budget:<id>, each Viewer's. */
|
|
15
|
+
export function openIds(list) {
|
|
16
|
+
const out = { goal: new Set(), budget: new Set() };
|
|
17
|
+
for (const p of list || []) {
|
|
18
|
+
const m = p.open && p.item && /^(goal|budget):(.+)$/.exec(p.item.id || '');
|
|
19
|
+
if (m) out[m[1]].add(m[2]);
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let S = null;
|
|
25
|
+
/** Mark the rows and cards an open Viewer shows (BiI1Split: blue, its left edge). While goals are picked for a dashboard the pick keeps .sel. */
|
|
26
|
+
export function markOpen() {
|
|
27
|
+
if (!S) return;
|
|
28
|
+
const ids = openIds(panels.list()), pick = S.selecting();
|
|
29
|
+
document.querySelectorAll('#goalTbl .ins-row[data-goal], #goalTbl .ins-row[data-budget], #goalCards .ins-card[data-goal]').forEach((r) => {
|
|
30
|
+
const on = r.dataset.goal != null ? ids.goal.has(r.dataset.goal) : ids.budget.has(r.dataset.budget);
|
|
31
|
+
r.classList.toggle('vwo', on);
|
|
32
|
+
if (!pick) r.classList.toggle('sel', on);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Moved by steps aside while the table is too narrow for it (BiI1Split); it comes back once the table is as wide as when it left. */
|
|
37
|
+
function movedBy() {
|
|
38
|
+
const T = S.table, page = S.page;
|
|
39
|
+
if (!T || T.hidden || page.classList.contains('cz-pn-narrow')) return;
|
|
40
|
+
const w = T.clientWidth; if (!w) return;
|
|
41
|
+
if (page.classList.contains('ins-nomv')) { if (S.back && w >= S.back) { page.classList.remove('ins-nomv'); S.back = 0; } return; }
|
|
42
|
+
const h = T.querySelector('.ins-th .ins-mvh'); if (!h) return;
|
|
43
|
+
const mw = h.getBoundingClientRect().width;
|
|
44
|
+
if (mw < MV) { S.back = w + (MV - mw); page.classList.add('ins-nomv'); }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function mount(o = {}) {
|
|
48
|
+
if (S) return;
|
|
49
|
+
S = { page: o.page, table: o.table, selecting: o.selecting || (() => false), back: 0 };
|
|
50
|
+
narrowForm({ page: o.page, sheets: /\/pm\/(cozy-insights|premium-report-intel)\.css(\?|$)/, onChange: () => { movedBy(); markOpen(); } });
|
|
51
|
+
if (typeof ResizeObserver === 'function' && o.table) new ResizeObserver(() => movedBy()).observe(o.table);
|
|
52
|
+
vwChange(() => markOpen());
|
|
53
|
+
}
|
|
54
|
+
/** After the table is drawn again: its Moved by and marks. */
|
|
55
|
+
export function drawn() { if (!S) return; movedBy(); markOpen(); }
|