create-pmos 0.646.0 → 0.648.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 +27 -27
- package/payload/KIT-VERSION +1 -1
- package/payload/design-system/ui/components/Suggestion/README.md +8 -0
- package/payload/design-system/ui/components/Timeline/README.md +8 -0
- package/payload/design-system/ui/components/bundle.css +38 -0
- 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/workspace/changelog.json +26 -0
- package/workspace/design-system/ui/components/Suggestion/README.md +8 -0
- package/workspace/design-system/ui/components/Timeline/README.md +8 -0
- package/workspace/design-system/ui/components/bundle.css +38 -0
- package/workspace/guide/layout.md +15 -0
- package/workspace/lib/routes-backlog.js +6 -2
- package/workspace/lib/sprint-now.js +79 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-backlog.js +36 -14
- package/workspace/public/pm/bd-ds.css +0 -7
- package/workspace/public/pm/bd-span.js +10 -5
- package/workspace/public/pm/bd-sprint-ds.js +115 -0
- package/workspace/public/pm/bd-sprint.js +71 -56
- package/workspace/public/pm/bd-stands.js +165 -0
- package/workspace/public/pm/bd-work-ds.css +144 -0
- package/workspace/public/pm/bd-work.css +8 -77
- package/workspace/public/pm/bd-work.js +79 -46
- package/workspace/public/pm/komorebi.css +39 -0
- package/workspace/public/pm/premium-board.js +57 -10
- package/workspace/public/pm/readonly.js +3 -0
- package/workspace/public/premium-board.html +4 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/* pm/bd-work-ds.css — Work built from PMOS Komorebi parts (initiative work-design-system-blocks; Exploring 3 page "work", board WorkDS). This sheet
|
|
2
|
+
* only places the parts (pm-block, pm-tabs, pm-table, pm-sug x, pm-gt, pm-dia, pm-dline, pm-fold, pm-group, pm-badge) and gives the Board's own
|
|
3
|
+
* bar (pm/bd-span.js rowBar, one design everywhere) the system's marks. It loads last on premium-board.html, so the system is what shows. */
|
|
4
|
+
|
|
5
|
+
/* ── the top line: the path (Work › product), one Tabs part for Initiatives / Backlog / This sprint, the icon buttons ── */
|
|
6
|
+
body.bd-page.wk-on .bd-hd, body.bd-page.bk-on .bd-hd { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-12); }
|
|
7
|
+
/* off Work the path steps aside: only the product chip shows, as before */
|
|
8
|
+
body.bd-page .wk-path { display: contents; }
|
|
9
|
+
body.bd-page .wk-path > span, body.bd-page .wk-path > .pm-ic { display: none; }
|
|
10
|
+
body.bd-page.wk-on .wk-path, body.bd-page.bk-on .wk-path { display: flex; min-width: 0; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--ink); }
|
|
11
|
+
body.bd-page.wk-on .wk-path > span, body.bd-page.wk-on .wk-path > .pm-ic, body.bd-page.bk-on .wk-path > span, body.bd-page.bk-on .wk-path > .pm-ic { display: inline-flex; }
|
|
12
|
+
.wk-path > .pm-ic { color: var(--muted); }
|
|
13
|
+
body.bd-page.wk-on .bd-hd > .bk-sw, body.bd-page.bk-on .bd-hd > .bk-sw { justify-self: center; }
|
|
14
|
+
body.bd-page.wk-on .bd-hd .bd-tools, body.bd-page.bk-on .bd-hd .bd-tools { justify-self: end; margin-left: 0; }
|
|
15
|
+
/* Choose columns lives in the Initiatives block now (WorkDS); the toolbar keeps Search, New and More */
|
|
16
|
+
body.bd-page.wk-on:not(.bk-on) [id="bdFilter"] { display: none; }
|
|
17
|
+
/* the product chip reads as the path's last crumb: no border, the chevron after the name */
|
|
18
|
+
body.bd-page .wk-path .pk-chip, body.bd-page .wk-path [id="bdPick"] { border: 0; box-shadow: none; background: none; padding-left: var(--space-4); font-weight: var(--fw-strong); }
|
|
19
|
+
|
|
20
|
+
/* ── the stack of blocks ── */
|
|
21
|
+
/* the head's spacer is the part's .sp, not the old sprint table's .sp box (cozy-board.css) */
|
|
22
|
+
.pm-block .head > .sp { border: 0; border-radius: 0; background: none; overflow: visible; }
|
|
23
|
+
body.bd-page.wk-on [id="ibBody"][data-view="work"] { display: flex; flex-direction: column; gap: var(--space-16); }
|
|
24
|
+
.wk-stands .wk-say { margin: 0; font-size: var(--fs-body); line-height: 24px; }
|
|
25
|
+
.wk-stands .wk-say a { color: var(--blue); }
|
|
26
|
+
|
|
27
|
+
/* ── the Initiatives table ── */
|
|
28
|
+
.wk-blk { gap: var(--space-8); }
|
|
29
|
+
.wk-blk .head { flex-wrap: wrap; row-gap: var(--space-8); }
|
|
30
|
+
.wk-blk .head .pm-btn { position: relative; }
|
|
31
|
+
.wk-blk .wk-fc { position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: var(--radius-pill); background: var(--blue); color: var(--on-blue); font-size: var(--fs-badge); line-height: 14px; font-style: normal; text-align: center; }
|
|
32
|
+
.wk-tw { overflow: hidden; }
|
|
33
|
+
table.pm-table.wk { table-layout: fixed; }
|
|
34
|
+
table.pm-table.wk col.c-title { width: 240px; }
|
|
35
|
+
table.pm-table.wk col.c-product { width: 112px; }
|
|
36
|
+
table.pm-table.wk col.c-stage { width: 112px; }
|
|
37
|
+
table.pm-table.wk col.c-ms { width: 150px; }
|
|
38
|
+
table.pm-table.wk col.c-date { width: 176px; }
|
|
39
|
+
table.pm-table.wk col.c-status, table.pm-table.wk col.c-wf { width: 120px; }
|
|
40
|
+
table.pm-table.wk col.c-program, table.pm-table.wk col.c-goal { width: 160px; }
|
|
41
|
+
table.pm-table.wk:not(.has-x) col.c-title { width: auto; }
|
|
42
|
+
@media (max-width: 1280px) { table.pm-table.wk col.c-title { width: 200px; } table.pm-table.wk col.c-ms { width: 130px; } table.pm-table.wk col.c-date { width: 150px; } table.pm-table.wk col.c-stage { width: 96px; } }
|
|
43
|
+
table.pm-table.wk th, table.pm-table.wk td { height: 40px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
44
|
+
table.pm-table.wk td.n { font-weight: var(--fw-strong); color: var(--ink); }
|
|
45
|
+
table.pm-table.wk tr.wk-i { cursor: pointer; }
|
|
46
|
+
table.pm-table.wk tr.wk-i:focus-visible { outline: none; box-shadow: inset var(--glow); }
|
|
47
|
+
table.pm-table.wk tr.wk-i.sel td { background: var(--blue-tint); }
|
|
48
|
+
table.pm-table.wk tr.wk-i.cl td { color: var(--muted); }
|
|
49
|
+
table.pm-table.wk tr.wk-g td { padding: 0; }
|
|
50
|
+
table.pm-table.wk tr.wk-g:hover td { background: none; }
|
|
51
|
+
table.pm-table.wk tr.wk-g .pm-group { padding: 0 8px; }
|
|
52
|
+
table.pm-table.wk tr.wk-g .pm-group small { font-size: var(--fs-row); font-weight: var(--fw-regular); }
|
|
53
|
+
.wk-hd { all: unset; cursor: pointer; border-radius: var(--radius-sm); }
|
|
54
|
+
.wk-hd:focus-visible { box-shadow: var(--glow); }
|
|
55
|
+
.wk-d .pm-badge { margin-left: var(--space-4); }
|
|
56
|
+
.wk-st { all: unset; cursor: pointer; border-radius: var(--radius-sm); padding: 2px 6px; margin-left: -6px; }
|
|
57
|
+
.wk-st:hover { background: var(--well); }
|
|
58
|
+
.wk-st:focus-visible { box-shadow: var(--glow); }
|
|
59
|
+
|
|
60
|
+
/* the timeline column: the ticks in the head, a row's bar in the Timeline part (pm-gt) with the today line through every row */
|
|
61
|
+
table.pm-table.wk th.wk-x, table.pm-table.wk td.wk-x { position: relative; padding: 0; overflow: visible; }
|
|
62
|
+
.wk-tl { position: absolute; inset: 0 8px; }
|
|
63
|
+
.wk-tk { position: absolute; top: 50%; transform: translateY(-50%); font-weight: var(--fw-strong); color: var(--muted); white-space: nowrap; }
|
|
64
|
+
td.wk-x > .wk-bw { position: absolute; inset: -1px 8px 0; height: auto; overflow: clip; overflow-clip-margin: 10px; }
|
|
65
|
+
td.wk-x > .wk-bw > .wk-gl { display: none; }
|
|
66
|
+
td.wk-x > .wk-bw > .pm-now { z-index: 4; }
|
|
67
|
+
body.wk-drag, body.wk-drag * { cursor: grabbing !important; user-select: none; }
|
|
68
|
+
td.wk-x, th.wk-x { touch-action: pan-y; }
|
|
69
|
+
|
|
70
|
+
/* the Board's own bar in the system's marks: done in leaf, now in blue, planned in well with a hairline; diamonds in ink, late in alert, close
|
|
71
|
+
* ones one numbered mark with the number in its centre */
|
|
72
|
+
.wk-blk .tg-bar { height: 10px; margin-top: -5px; border-radius: var(--radius-pill); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
|
|
73
|
+
.wk-blk .tg-bar > b { background: var(--leaf); border-radius: 0; }
|
|
74
|
+
.wk-blk .tg-bar > i.nw { background: var(--blue); }
|
|
75
|
+
.wk-blk :is(.tg-tm, .tg-end) { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--card); border: 2px solid var(--ink); border-radius: 2px; z-index: 5; }
|
|
76
|
+
.wk-blk :is(.tg-tm, .tg-end).late { border-color: var(--alert); }
|
|
77
|
+
.wk-blk :is(.tg-tm, .tg-end).dn { background: var(--leaf); border-color: var(--leaf); box-shadow: none; }
|
|
78
|
+
.wk-blk .tg-tmc { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: var(--ink); border: 2px solid var(--ink); border-radius: 3px; z-index: 5; display: flex; align-items: center; justify-content: center; }
|
|
79
|
+
.wk-blk .tg-tmc.late { background: var(--alert); border-color: var(--alert); }
|
|
80
|
+
.wk-blk .tg-tmc b, .wk-blk .tg-tmc.late b, .wk-blk .tg-tmc.dn b { transform: rotate(-45deg); color: var(--card); font-size: 11px; line-height: 1; font-weight: var(--fw-strong); }
|
|
81
|
+
.wk-blk :is(.tg-tm, .tg-end, .tg-tmc):focus-visible { outline: none; box-shadow: var(--glow); }
|
|
82
|
+
.wk-blk .tg-late { background: var(--alert); height: 2px; margin-top: -1px; }
|
|
83
|
+
|
|
84
|
+
/* the key under the table */
|
|
85
|
+
.wk-key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-16); }
|
|
86
|
+
.wk-key > span { display: inline-flex; align-items: center; gap: 6px; }
|
|
87
|
+
.wk-key .k { display: inline-block; width: 14px; height: 8px; border-radius: var(--radius-pill); }
|
|
88
|
+
.wk-key .k.dn { background: var(--leaf); }
|
|
89
|
+
.wk-key .k.nw { background: var(--blue); }
|
|
90
|
+
.wk-key .k.pl { background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
|
|
91
|
+
.wk-key .k.td { width: 2px; height: 14px; border-radius: 0; background: var(--alert); }
|
|
92
|
+
.wk-key .k.ms { width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); border: 1.5px solid var(--ink); background: var(--card); }
|
|
93
|
+
.wk-key .k.mn { width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); background: var(--ink); }
|
|
94
|
+
.wk-blk .pm-fold { border-top: 1px dashed var(--line); }
|
|
95
|
+
.wk-blk .pm-fold .pm-ic { transition: transform var(--duration-quick) var(--ease-out); }
|
|
96
|
+
.wk-blk .pm-fold[aria-expanded="true"] .pm-ic { transform: rotate(180deg); }
|
|
97
|
+
.wk-empty { margin: 0; }
|
|
98
|
+
.wk-sa { all: unset; cursor: pointer; color: var(--blue); }
|
|
99
|
+
|
|
100
|
+
/* ── Next milestones ── */
|
|
101
|
+
.wk-next .pm-dline { margin-top: var(--space-4); }
|
|
102
|
+
|
|
103
|
+
/* ── This sprint (WorkSprintDS): the Summary card and the Tasks Table ── */
|
|
104
|
+
body.bd-page.sp-on [id="bdFilter"] { display: none; }
|
|
105
|
+
body.bd-page.sp-on [id="bkBody"] { display: flex; flex-direction: column; gap: var(--space-16); max-width: none; }
|
|
106
|
+
.wk-sp .head { flex-wrap: wrap; row-gap: var(--space-4); }
|
|
107
|
+
.wk-sp .wk-spm { display: inline-flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
|
|
108
|
+
.wk-sp .wk-spm b { font-weight: var(--fw-strong); color: var(--ink); }
|
|
109
|
+
.wk-sp .wk-rd { position: relative; }
|
|
110
|
+
.wk-sp .wk-rd.old::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--alert); }
|
|
111
|
+
.wk-spd { gap: var(--space-12); }
|
|
112
|
+
.wk-spbar { flex: 1; height: 8px; border-radius: var(--radius-pill); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
|
|
113
|
+
.wk-spbar > span { display: block; height: 100%; background: var(--leaf); }
|
|
114
|
+
.wk-spcols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 20px; padding: var(--space-4) 0; }
|
|
115
|
+
.wk-spc1 { min-width: 0; }
|
|
116
|
+
.wk-sph { justify-content: space-between; height: 28px; gap: 6px; font-size: var(--fs-meta); }
|
|
117
|
+
.wk-sph .pm-meta { font-weight: var(--fw-regular); }
|
|
118
|
+
.wk-spc1 ul { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-row); line-height: 20px; }
|
|
119
|
+
.wk-spc1 li { margin: 0 0 var(--space-4); }
|
|
120
|
+
.wk-spc1 > .pm-meta { margin: 6px 0 0; }
|
|
121
|
+
.wk-spc1 .pm-sug { margin-top: var(--space-8); }
|
|
122
|
+
.wk-spc1 .wk-ta { height: auto; padding: var(--space-8) var(--space-12); margin-top: 6px; resize: vertical; line-height: 20px; }
|
|
123
|
+
.wk-spc1 .wk-ed { justify-content: flex-end; margin-top: var(--space-4); }
|
|
124
|
+
.wk-mw { position: relative; display: inline-flex; }
|
|
125
|
+
.wk-gb { display: inline-flex; align-items: center; gap: var(--space-4); }
|
|
126
|
+
.wk-gm { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; }
|
|
127
|
+
.wk-gm [aria-checked="true"] { font-weight: var(--fw-strong); }
|
|
128
|
+
.wk-spx td { white-space: nowrap; }
|
|
129
|
+
.wk-spx td:first-child { white-space: normal; }
|
|
130
|
+
.wk-spx td.wk-nest { padding-left: 28px; }
|
|
131
|
+
.wk-spx .wk-tt { all: unset; cursor: pointer; }
|
|
132
|
+
.wk-spx .wk-tt:hover { text-decoration: underline; }
|
|
133
|
+
.wk-spx .wk-tt:focus-visible { box-shadow: var(--glow); border-radius: var(--radius-sm); }
|
|
134
|
+
.wk-spx tr.wk-dn td { color: var(--muted); }
|
|
135
|
+
.wk-spx tr.wk-dn b { font-weight: var(--fw-regular); }
|
|
136
|
+
.wk-spx .wk-due { gap: var(--space-8); flex-wrap: nowrap; }
|
|
137
|
+
.wk-spx tr.wk-g td { padding: 0; }
|
|
138
|
+
|
|
139
|
+
@media (max-width: 760px) {
|
|
140
|
+
.wk-spcols { grid-template-columns: 1fr 1fr; }
|
|
141
|
+
body.bd-page.wk-on .bd-hd, body.bd-page.bk-on .bd-hd { display: flex; }
|
|
142
|
+
body.bd-page.wk-on .wk-path, body.bd-page.bk-on .wk-path { display: contents; }
|
|
143
|
+
body.bd-page.wk-on .wk-path > span, body.bd-page.wk-on .wk-path > .pm-ic, body.bd-page.bk-on .wk-path > span, body.bd-page.bk-on .wk-path > .pm-ic { display: none; }
|
|
144
|
+
}
|
|
@@ -3,44 +3,17 @@
|
|
|
3
3
|
* with wk-. On a desk only: body.wk-on hides the View chip and the count pill with its (i), which Work does not have. */
|
|
4
4
|
body.bd-page.wk-on [id="bdVieww"], body.bd-page.wk-on [id="bdChipset"] { display: none !important; }
|
|
5
5
|
body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
6
|
+
/* the plain bar's and the stage card's colours (the table itself is the system's Table part, pm/bd-work-ds.css) */
|
|
7
|
+
.wk-blk { --wk-plan: var(--bd-plan); --wk-pass: var(--bd-done); --wk-late: var(--cz-late); --wk-risk: var(--cz-risk); }
|
|
8
|
+
.wk-sar { display: inline-flex; }
|
|
9
|
+
.wk-sar svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; transform: rotate(180deg); }
|
|
10
|
+
.wk-sar.dn svg { transform: none; }
|
|
11
|
+
.wk-showing { display: flex; align-items: baseline; gap: 6px; margin: 0 4px 10px; font-size: var(--fs-label); color: var(--cz-ink2); }
|
|
12
|
+
.wk-showing .q { color: var(--cz-ink3); }
|
|
13
|
+
.wk-showing .wk-sa { font-size: var(--fs-label); }
|
|
6
14
|
|
|
7
|
-
.wk, .wk-key { --wk-plan: var(--bd-plan); --wk-pass: var(--bd-done); --wk-late: var(--cz-late); --wk-risk: var(--cz-risk);
|
|
8
15
|
}
|
|
9
|
-
.wk { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--cz-hair); background: var(--cz-card); overflow: visible; font-family: inherit; margin-top: 4px; }
|
|
10
|
-
.wk-r { display: grid; grid-template-columns: var(--wk-cols); column-gap: 16px; align-items: center; height: 44px; padding: 0 0 0 16px; font-size: var(--fs-row); line-height: 20px; color: var(--cz-ink2); position: relative; }
|
|
11
|
-
.wk:not(.has-x) .wk-r { padding-right: 16px; }
|
|
12
|
-
.wk-r + .wk-r { box-shadow: inset 0 1px 0 var(--cz-hair); }
|
|
13
|
-
.wk-r > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
14
|
-
.wk-h { height: 38px; background: var(--cz-well); border-radius: 16px 16px 0 0; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--cz-ink3); z-index: 4; }
|
|
15
|
-
.wk-hd { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; }
|
|
16
|
-
.wk-hd:hover, .wk-hd.on { color: var(--cz-ink); }
|
|
17
|
-
.wk-hd:focus-visible, .wk-i:focus-visible, .wk-st:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
18
|
-
.wk-g { height: 36px; background: var(--cz-well); font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--cz-ink2); }
|
|
19
|
-
.wk-g > span:first-child { grid-column: 1 / -2; }
|
|
20
|
-
.wk:not(.has-x) .wk-g > span:first-child { grid-column: 1 / -1; }
|
|
21
|
-
.wk-g small { font-size: var(--fs-label); font-weight: var(--fw-regular); color: var(--cz-ink3); margin-left: 8px; }
|
|
22
|
-
.wk-i { cursor: pointer; }
|
|
23
|
-
.wk-i:hover, .wk-i.hov { background: var(--cz-well); }
|
|
24
|
-
.wk-i.sel { background: var(--cz-bluebg); }
|
|
25
|
-
.wk-i:last-child { border-radius: 0 0 16px 16px; }
|
|
26
|
-
.wk-r .n { font-weight: var(--fw-strong); color: var(--cz-ink); }
|
|
27
|
-
.wk-r .q { color: var(--cz-ink3); }
|
|
28
|
-
.wk-d { font-variant-numeric: tabular-nums; }
|
|
29
|
-
.wk-d em { font-style: normal; }
|
|
30
|
-
.wk-d.late { color: var(--wk-late); }
|
|
31
|
-
.wk-d.risk { color: var(--wk-risk); }
|
|
32
|
-
.wk-st { all: unset; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; border-radius: 6px; padding: 2px 6px; margin-left: -6px; }
|
|
33
|
-
.wk-st:hover { background: var(--cz-well2); color: var(--cz-ink); }
|
|
34
16
|
|
|
35
|
-
/* the timeline column */
|
|
36
|
-
.wk-x { align-self: stretch; position: relative; overflow: visible !important; box-shadow: inset 1px 0 0 var(--cz-hair); }
|
|
37
|
-
.wk-bw { position: absolute; inset: 0 8px; overflow: clip; overflow-clip-margin: 8px; } /* a bar that starts or ends past the span stops at the timeline's edge (Quarter, 2026-11-19); the stage card sits outside it */
|
|
38
|
-
.wk-gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--cz-hair); }
|
|
39
|
-
.wk-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--cz-ink); opacity: .7; z-index: 3; }
|
|
40
|
-
.wk-xh { display: block; }
|
|
41
|
-
.wk-tl { position: absolute; inset: 0 8px; }
|
|
42
|
-
.wk-tk { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink3); white-space: nowrap; }
|
|
43
|
-
.wk-nowl { position: absolute; bottom: -9px; transform: translateX(-50%); z-index: 7; font-size: var(--fs-badge); font-weight: var(--fw-strong); font-style: normal; line-height: 18px; padding: 0 7px; border-radius: 999px; background: var(--cz-ink); color: var(--cz-card); white-space: nowrap; }
|
|
44
17
|
.wk-bar { position: absolute; top: 50%; height: 20px; margin-top: -10px; border-radius: 999px; background: var(--wk-plan); overflow: hidden; min-width: 4px; }
|
|
45
18
|
.wk-bar > em { display: block; height: 100%; background: var(--wk-pass); }
|
|
46
19
|
.wk-late { position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--wk-late); z-index: 1; }
|
|
@@ -53,7 +26,6 @@ body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
|
53
26
|
.wk-sd.cur { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--cz-blue); border: 3px solid var(--cz-card); box-shadow: 0 0 0 2px var(--cz-blue); z-index: 3; }
|
|
54
27
|
.wk-sd.cur.late { background: var(--wk-late); box-shadow: 0 0 0 2px var(--wk-late); }
|
|
55
28
|
.wk-sd.cur.risk { background: var(--wk-risk); box-shadow: 0 0 0 2px var(--wk-risk); }
|
|
56
|
-
.wk-i.hov { z-index: 5; }
|
|
57
29
|
|
|
58
30
|
/* the stages card under a pointed row */
|
|
59
31
|
.wk-card { position: absolute; left: auto; right: 8px; width: max(100%, calc(var(--n, 8) * 80px + 24px)); box-sizing: border-box; top: 36px; z-index: 20; padding: 10px 12px 12px; border-radius: 14px; background: var(--cz-card); box-shadow: 0 12px 32px -8px rgba(30, 34, 42, .3), 0 0 0 1px var(--cz-hair); white-space: normal; cursor: default; }
|
|
@@ -70,30 +42,7 @@ body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
|
70
42
|
.wk-cs.cur b { color: var(--cz-ink); }
|
|
71
43
|
.wk-cs small { display: block; font-size: var(--fs-meta); color: var(--cz-ink3); margin-top: 2px; }
|
|
72
44
|
|
|
73
|
-
/* the hide button and the span chooser at the top left of the timeline */
|
|
74
|
-
.wk-hide, .wk-show, .wk-span { all: unset; cursor: pointer; box-sizing: border-box; height: 20px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--cz-ink3); background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); z-index: 6; }
|
|
75
|
-
.wk-hide { position: absolute; left: 4px; top: 50%; margin-top: -10px; width: 20px; }
|
|
76
|
-
.wk-show { position: absolute; right: 12px; top: 50%; margin-top: -10px; width: 20px; }
|
|
77
|
-
.wk-spw { position: absolute; left: 28px; top: 50%; margin-top: -10px; z-index: 6; }
|
|
78
|
-
.wk-span { padding: 0 5px 0 7px; gap: 3px; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-ink2); }
|
|
79
|
-
.wk-hide:hover, .wk-show:hover, .wk-span:hover { color: var(--cz-ink); background: var(--cz-well); }
|
|
80
|
-
.wk-hide:focus-visible, .wk-show:focus-visible, .wk-span:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 1px; }
|
|
81
|
-
.wk-hide svg, .wk-show svg, .wk-span svg { fill: none; stroke: currentColor; stroke-width: 2.2; }
|
|
82
|
-
.wk-spm { position: absolute; left: 0; top: 26px; z-index: 30; display: grid; gap: 1px; padding: 6px; border-radius: 12px; background: var(--cz-card); box-shadow: 0 8px 28px rgba(42, 46, 53, .18), inset 0 0 0 1px var(--cz-hair); min-width: 112px; }
|
|
83
|
-
.wk-spm[hidden] { display: none; }
|
|
84
|
-
.wk-spm .h { font-size: var(--fs-badge); font-weight: var(--fw-strong); line-height: 1; color: var(--cz-ink3); padding: 5px 8px 6px; }
|
|
85
|
-
.wk-spm .o { all: unset; cursor: pointer; font-size: var(--fs-meta); font-weight: var(--fw-regular); line-height: 1; color: var(--cz-ink); padding: 7px 8px; border-radius: 7px; display: flex; justify-content: space-between; gap: 14px; }
|
|
86
|
-
.wk-spm .o:hover, .wk-spm .o:focus-visible { background: var(--cz-well); }
|
|
87
|
-
.wk-spm .o.on { background: var(--cz-well); font-weight: var(--fw-strong); }
|
|
88
|
-
.wk-spm .o.on::after { content: '✓'; font-weight: var(--fw-strong); color: var(--cz-ink2); }
|
|
89
45
|
|
|
90
|
-
/* the key under the list */
|
|
91
|
-
.wk-key { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 12px 4px 0; font-size: var(--fs-label); color: var(--cz-ink3); }
|
|
92
|
-
.wk-key span { display: inline-flex; align-items: center; gap: 7px; }
|
|
93
|
-
.wk-key i { display: inline-block; flex: none; }
|
|
94
|
-
.wk-key .k-bar { width: 26px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--wk-pass) 50%, var(--wk-plan) 50%); }
|
|
95
|
-
.wk-key .k-ms { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); border: 2px solid var(--bd-done); box-sizing: border-box; }
|
|
96
|
-
.wk-key .k-late { width: 22px; height: 4px; border-radius: 2px; background: var(--cz-late); }
|
|
97
46
|
|
|
98
47
|
/* the view menu (board 5): one narrow panel under the tune button */
|
|
99
48
|
.wk-menu { position: fixed; z-index: 80; width: 300px; max-height: calc(100vh - 80px); overflow: auto; padding: 14px 14px 10px; border-radius: 18px; background: var(--cz-card); box-shadow: 0 1px 2px rgba(30, 40, 60, .1), 0 16px 40px rgba(30, 40, 60, .18), inset 0 0 0 1px var(--cz-hair); font-size: var(--fs-row); color: var(--cz-ink); box-sizing: border-box; font-family: var(--cz-sans); }
|
|
@@ -131,17 +80,6 @@ body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
|
131
80
|
/* Work's rows in the shell's ⋯ menu (board 5 keeps them out of the view menu): a count or "on" sits at the right, small and grey */
|
|
132
81
|
.crmenu > .wk-xo .k { margin-left: auto; padding-left: 16px; font-size: var(--fs-meta); font-weight: var(--fw-regular); color: var(--cz-ink3); }
|
|
133
82
|
/* round 2 (Wawan, 2026-11-19): the Board's own bar sits in Work's track; the key says what it draws; the closed ones fold into one line */
|
|
134
|
-
.wk-x .tg-bar { cursor: pointer; }
|
|
135
|
-
.wk-key .k { width: 14px; height: 7px; border-radius: 3px; }
|
|
136
|
-
.wk-key .k.dn { background: var(--bd-done); }
|
|
137
|
-
.wk-key .k.nw { background: var(--cz-blue); }
|
|
138
|
-
.wk-key .k.pl { background: var(--bd-plan); }
|
|
139
|
-
.wk-key .k.dlv { width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; border: 2px solid var(--bd-done); background: var(--cz-card); }
|
|
140
|
-
.wk-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--cz-ink2); border-radius: 6px; }
|
|
141
|
-
.wk-fold svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(-90deg); transition: transform .15s; }
|
|
142
|
-
.wk-fold[aria-expanded="true"] svg { transform: none; }
|
|
143
|
-
.wk-fold:hover { color: var(--cz-ink); }
|
|
144
|
-
.wk-fold:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
145
83
|
/* round 3 (Wawan, 2026-11-19): Filter, Sort, View and Columns in one calm panel of about 360 px; pills with their counts; several at once */
|
|
146
84
|
.wk-menu { width: 352px; padding: 6px 16px 12px; }
|
|
147
85
|
.wk-menu section { padding: 12px 0 4px; box-shadow: inset 0 -1px 0 var(--cz-hair); }
|
|
@@ -164,9 +102,6 @@ body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
|
164
102
|
.wk-menu .wk-pl .wk-sk .x { height: 28px; width: 26px; padding: 0; justify-content: center; background: none; color: var(--cz-card); opacity: .7; }
|
|
165
103
|
.wk-menu .wk-pl .wk-sk .x:hover { opacity: 1; background: none; }
|
|
166
104
|
.wk-sk svg, .wk-cx svg, .wk-fold svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
167
|
-
.wk-sar { display: inline-flex; }
|
|
168
|
-
.wk-sar svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; transform: rotate(180deg); }
|
|
169
|
-
.wk-sar.dn svg { transform: none; }
|
|
170
105
|
.wk-hd .wk-sar svg { width: 12px; height: 12px; }
|
|
171
106
|
.wk-sk .x svg { width: 11px; height: 11px; }
|
|
172
107
|
.wk-menu .wk-tlr { margin: 0 0 10px; height: 36px; }
|
|
@@ -179,12 +114,8 @@ body.bd-page.wk-on .bd-hd .bd-tools { margin-left: auto; }
|
|
|
179
114
|
.wk-note { margin: 2px 0 10px; font-size: var(--fs-meta); color: var(--cz-ink3); line-height: var(--lh-meta); }
|
|
180
115
|
.wk-lk, .wk-sa { all: unset; cursor: pointer; font-size: var(--fs-meta); font-weight: var(--fw-strong); color: var(--cz-blue); border-radius: 4px; }
|
|
181
116
|
.wk-ft { min-height: 24px; }
|
|
182
|
-
.wk-showing { display: flex; align-items: baseline; gap: 6px; margin: 0 4px 10px; font-size: var(--fs-label); color: var(--cz-ink2); }
|
|
183
|
-
.wk-showing .q { color: var(--cz-ink3); }
|
|
184
|
-
.wk-showing .wk-sa { font-size: var(--fs-label); }
|
|
185
117
|
.wk-fc { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--cz-blue); color: var(--cz-card); font-size: var(--fs-badge); font-weight: var(--fw-strong); font-style: normal; line-height: 16px; text-align: center; pointer-events: none; }
|
|
186
118
|
body.bd-page.wk-on [id="bdFilter"] { position: relative; }
|
|
187
|
-
.wk-empty { margin: 0; padding: 18px 16px; font-size: var(--fs-row); color: var(--cz-ink3); background: var(--cz-card); }
|
|
188
119
|
.wk-menu { max-height: calc(100vh - 24px); overscroll-behavior: contain; }
|
|
189
120
|
.wk-menu section:first-child h6 { position: sticky; top: -12px; z-index: 2; margin: -12px -16px 10px; padding: 12px 16px 8px; background: var(--cz-card); }
|
|
190
121
|
.wk-menu .wk-pl button.q:not(.on) { color: var(--cz-ink3); background: none; box-shadow: inset 0 0 0 1px var(--cz-hair); }
|
|
@@ -37,11 +37,13 @@ export const COLS = [
|
|
|
37
37
|
];
|
|
38
38
|
const byK = Object.fromEntries(COLS.map((c) => [c.k, c]));
|
|
39
39
|
export const GROUPS = [['goal', 'Goal'], ['product', 'Product'], ['stage', 'Stage'], ['status', 'Status'], ['program', 'Program'], ['none', 'No groups']];
|
|
40
|
-
|
|
41
|
-
export const
|
|
40
|
+
// the scale tabs (WorkDS, 2026-11-20): Week, Month, Quarter, Year and Full; the number is the window's length in days (Full fits the rows)
|
|
41
|
+
export const SPANS = [['week', 'Week', 42], ['month', 'Month', 152], ['quarter', 'Quarter', 456], ['year', 'Year', 1096], ['full', 'Full', 0]];
|
|
42
|
+
const OLD_SPAN = { half: 'quarter', y2: 'year', y5: 'year' }; // a view kept before the scale tabs
|
|
43
|
+
export const KEY = 'pmos.work.view.3'; // .3 (WorkDS, 2026-11-20): every kept view starts again from the usual one, on Month
|
|
42
44
|
|
|
43
|
-
/** The usual view: grouped by goal, the timeline on, the default columns in their order,
|
|
44
|
-
export const usual = () => ({ group: 'goal', tl: true, span: '
|
|
45
|
+
/** The usual view: grouped by goal, the timeline on, the default columns in their order, Month (WorkDS). */
|
|
46
|
+
export const usual = () => ({ group: 'goal', tl: true, span: 'month', cols: COLS.map((c) => ({ k: c.k, on: c.on })), sorts: [] });
|
|
45
47
|
|
|
46
48
|
/** The view as kept, mended: an unknown key falls back to the usual one, a column missing from a kept list is added off at the end. */
|
|
47
49
|
export function mend(v) {
|
|
@@ -53,7 +55,7 @@ export function mend(v) {
|
|
|
53
55
|
return {
|
|
54
56
|
group: GROUPS.some(([k]) => k === v.group) ? v.group : u.group,
|
|
55
57
|
tl: v.tl !== false,
|
|
56
|
-
span: SPANS.some(([k]) => k === v.span) ? v.span : u.span,
|
|
58
|
+
span: SPANS.some(([k]) => k === v.span) ? v.span : OLD_SPAN[v.span] || u.span,
|
|
57
59
|
cols: cols.length ? cols : u.cols,
|
|
58
60
|
sorts: (Array.isArray(v.sorts) ? v.sorts : []).filter((x) => x && (x.k === 'title' || byK[x.k])).filter((x, i, a) => a.findIndex((y) => y.k === x.k) === i).slice(0, 3).map((x) => ({ k: x.k, up: x.up !== false })),
|
|
59
61
|
};
|
|
@@ -71,7 +73,7 @@ export function read() {
|
|
|
71
73
|
function write(v) { mem = mend(v); try { const s = box(); if (s) s.setItem(KEY, JSON.stringify(mem)); } catch { /* a private window keeps it for this page */ } return mem; }
|
|
72
74
|
export const setGroup = (g) => write({ ...read(), group: g });
|
|
73
75
|
export const setTimeline = (on) => write({ ...read(), tl: !!on });
|
|
74
|
-
export const setSpan = (s) => write({ ...read(), span: s });
|
|
76
|
+
export const setSpan = (s) => { OFF = 0; return write({ ...read(), span: s }); };
|
|
75
77
|
export const reset = () => write(usual());
|
|
76
78
|
/** A column's switch. The columns that show stay on top, in their order; one switched on goes under them, one switched off goes on top of the others. */
|
|
77
79
|
export function setCol(k, on) {
|
|
@@ -264,20 +266,35 @@ export function showingHtml(hidden) {
|
|
|
264
266
|
/* ── the timeline's window ───────────────────────────────────────────────────────────────────────────────────── */
|
|
265
267
|
/** The window of a span. Full: from the earliest start to the latest end of the rows (their milestones and today too), so no bar is cut.
|
|
266
268
|
* The other spans are a fixed length that starts a quarter of the way before today. → { from, to, span } (Dates) */
|
|
267
|
-
export function windowOf(span, rows, now = new Date()) {
|
|
268
|
-
const t = today(now), S = SPANS.find(([k]) => k === span) || SPANS[SPANS.length - 1];
|
|
269
|
-
if (S[2]) { const from = new Date(+t - Math.round(S[2] * 0.25) * DAY); return { from, to: new Date(+from + S[2] * DAY), span: S[0] }; }
|
|
269
|
+
export function windowOf(span, rows, now = new Date(), off = 0) {
|
|
270
|
+
const t = today(now), S = SPANS.find(([k]) => k === span) || SPANS[SPANS.length - 1], o = Math.round(off || 0) * DAY;
|
|
271
|
+
if (S[2]) { const from = new Date(+t - Math.round(S[2] * 0.25) * DAY + o); return { from, to: new Date(+from + S[2] * DAY), span: S[0] }; }
|
|
270
272
|
const ds = [t];
|
|
271
273
|
for (const r of rows || []) { for (const v of [r.start, r.end]) { const d = day(v); if (d) ds.push(d); } for (const m of r.milestones || []) { const d = day(m && m.date); if (d) ds.push(d); } }
|
|
272
274
|
const lo = Math.min(...ds), hi = Math.max(...ds), pad = Math.max(7 * DAY, (hi - lo) * 0.03);
|
|
273
|
-
return { from: new Date(lo - pad), to: new Date(Math.max(hi + pad, lo + 60 * DAY)), span: 'full' };
|
|
275
|
+
return { from: new Date(lo - pad + o), to: new Date(Math.max(hi + pad, lo + 60 * DAY) + o), span: 'full' };
|
|
274
276
|
}
|
|
277
|
+
/* ── scrolling sideways (WorkDS): a trackpad, a drag, or Earlier / Go to today / Later. The offset lives for this page, in days; Go to today
|
|
278
|
+
* and a new scale put it back to 0. No scrollbar is drawn. ── */
|
|
279
|
+
let OFF = 0;
|
|
280
|
+
export const offset = () => OFF;
|
|
281
|
+
/** Move the window by `d` days (a drag or a trackpad gives a fraction of the window). */
|
|
282
|
+
export const scrollBy = (d) => { OFF += d; return OFF; };
|
|
283
|
+
/** Earlier (-1) or Later (+1): half the window's length. */
|
|
284
|
+
export function step(dir, rows, now = new Date()) { const W = windowOf(read().span, rows, now, OFF); OFF += dir * Math.round((W.to - W.from) / DAY / 2); return OFF; }
|
|
285
|
+
export const toToday = () => { OFF = 0; return OFF; };
|
|
275
286
|
const X = (W, d) => ((d - W.from) / (W.to - W.from)) * 100;
|
|
276
287
|
const P = (x) => Math.max(0, Math.min(100, x)).toFixed(2) + '%';
|
|
277
288
|
const inW = (W, d) => d && d >= W.from && d <= W.to;
|
|
278
289
|
/** The ticks of a window: months up to about half a year, quarters up to about two years, then years. [{ at, mid, label }] */
|
|
279
290
|
export function ticksOf(W) {
|
|
280
291
|
const len = (W.to - W.from) / DAY, out = [];
|
|
292
|
+
if (len <= 70) { // Week: a tick each Monday, "16 Nov"
|
|
293
|
+
for (let d = new Date(W.from.getFullYear(), W.from.getMonth(), W.from.getDate() + ((8 - W.from.getDay()) % 7)); d < W.to; d = new Date(d.getFullYear(), d.getMonth(), d.getDate() + 7)) {
|
|
294
|
+
out.push({ at: d, mid: d, label: d.getDate() + ' ' + MON[d.getMonth()], show: true, edge: true });
|
|
295
|
+
}
|
|
296
|
+
return out;
|
|
297
|
+
}
|
|
281
298
|
const unit = len <= 200 ? 'm' : len <= 800 ? 'q' : 'y', step = unit === 'm' ? 1 : unit === 'q' ? 3 : 12;
|
|
282
299
|
let d = new Date(W.from.getFullYear(), unit === 'y' ? 0 : W.from.getMonth() - (unit === 'q' ? W.from.getMonth() % 3 : 0), 1);
|
|
283
300
|
let first = true;
|
|
@@ -292,18 +309,21 @@ export function ticksOf(W) {
|
|
|
292
309
|
}
|
|
293
310
|
|
|
294
311
|
/* ── markup ──────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
295
|
-
const I = { hide: 'M13 6l6 6-6 6M6 6l6 6-6 6', show: 'M11 6l-6 6 6 6M18 6l-6 6 6 6', chev: 'M7 10l5 5 5-5', sort: 'M12 5v14M6 13l6 6 6-6', x: 'M6 6l12 12M18 6L6 18'
|
|
312
|
+
const I = { hide: 'M13 6l6 6-6 6M6 6l6 6-6 6', show: 'M11 6l-6 6 6 6M18 6l-6 6 6 6', chev: 'M7 10l5 5 5-5', sort: 'M12 5v14M6 13l6 6 6-6', x: 'M6 6l12 12M18 6L6 18',
|
|
313
|
+
back: 'M15 6l-6 6 6 6', on: 'M10 8l4 4-4 4', today: 'M12 3v18M7 8l-4 4 4 4M17 8l4 4-4 4', tune: 'M4 7h10M18 7h2M4 17h4M12 17h8M14 5v4M8 15v4' };
|
|
296
314
|
|
|
297
315
|
function cellHtml(r, k, o) {
|
|
298
|
-
if (k === 'product') return `<
|
|
299
|
-
if (k === 'stage') { const s = stageText(r); return `<
|
|
300
|
-
|
|
301
|
-
if (k === '
|
|
302
|
-
|
|
303
|
-
if (k === '
|
|
304
|
-
if (k === '
|
|
305
|
-
if (k === '
|
|
306
|
-
|
|
316
|
+
if (k === 'product') return `<td>${esc(o.product(r))}</td>`;
|
|
317
|
+
if (k === 'stage') { const s = stageText(r); return `<td class="wk-stc">${o.canMove && o.canMove(r) ? `<button type="button" class="wk-st" data-wkstage="${esc(r.key)}" aria-haspopup="menu" aria-label="Stage: ${esc(s || 'none')}. Change the stage" title="Change the stage">${esc(s)}</button>` : esc(s)}</td>`; }
|
|
318
|
+
// no milestone: "none yet" in muted words (WorkDS), never a stage name or "Plan end"
|
|
319
|
+
if (k === 'ms') { const n = nextOf(r); return `<td>${n && n.name ? esc(n.name) : '<span class="pm-meta">none yet</span>'}</td>`; }
|
|
320
|
+
// a late date carries the late Badge; at risk a quiet one (WorkDS)
|
|
321
|
+
if (k === 'date') { const d = dateOf(r, o.now); return `<td class="wk-d${d.tone ? ' ' + d.tone : ''}">${esc(d.text)}${d.note ? ` <span class="pm-badge${d.tone === 'late' ? ' alert' : ''}">${esc(d.note)}</span>` : ''}</td>`; }
|
|
322
|
+
if (k === 'status') return `<td>${esc(statusText(r))}</td>`;
|
|
323
|
+
if (k === 'program') return `<td>${esc((o.programOf && o.programOf(r)) || '')}</td>`;
|
|
324
|
+
if (k === 'goal') return `<td>${esc((o.goalOf && o.goalOf(r)) || '')}</td>`;
|
|
325
|
+
if (k === 'wf') return `<td>${esc(wfOf(r).name)}</td>`;
|
|
326
|
+
return '<td></td>';
|
|
307
327
|
}
|
|
308
328
|
const words = (r, keys, o) => keys.map((k) => {
|
|
309
329
|
if (k === 'product') return o.product(r);
|
|
@@ -318,7 +338,7 @@ const words = (r, keys, o) => keys.map((k) => {
|
|
|
318
338
|
}).filter(Boolean).join(', ');
|
|
319
339
|
|
|
320
340
|
/** The grid lines and today's line of the timeline, the same on every row. */
|
|
321
|
-
const gridHtml = (W, T, now) => T.map((t) => (inW(W, t.at) ? `<i class="wk-gl" style="left:${P(X(W, t.at))}"></i>` : '')).join('') + (inW(W, today(now)) ? `<i class="
|
|
341
|
+
const gridHtml = (W, T, now) => T.map((t) => (inW(W, t.at) ? `<i class="wk-gl" style="left:${P(X(W, t.at))}"></i>` : '')).join('') + (inW(W, today(now)) ? `<i class="pm-now" style="left:${P(X(W, today(now)))}"></i>` : '');
|
|
322
342
|
/** One row's bar when the page gives none (the unit test): the plan, the part that has passed, the late line, the next milestone. The page
|
|
323
343
|
* draws the Board's own bar instead (o.bar: pm/bd-span.js rowBar). */
|
|
324
344
|
export function barHtml(r, W, o = {}) {
|
|
@@ -342,7 +362,7 @@ export function cardHtml(r, W, now = new Date()) {
|
|
|
342
362
|
}
|
|
343
363
|
/** A closed or completed initiative (its workflow's done, won't do or archived step): they fold into one line at the end of the list. */
|
|
344
364
|
export const isClosed = (r) => !!(r.closed || ['done', 'wontdo', 'archived'].includes(catOfRow(r)));
|
|
345
|
-
let CARD = null, SHUT = true, COLS_OPEN = false, LAST = null; // the row whose stage card is open; the closed ones folded; the menu's Columns open; the rows last drawn
|
|
365
|
+
let CARD = null, SHUT = true, COLS_OPEN = false, LAST = null, LASTW = null; // the row whose stage card is open; the closed ones folded; the menu's Columns open; the rows last drawn
|
|
346
366
|
|
|
347
367
|
/** The whole list. rows: the initiatives on screen. o: { now, many, sel, canMove(r), product(r), programOf(r), goalOf(r), goalGroups(rows),
|
|
348
368
|
* bar(r, W): the Board's own bar for a row (else the plain one) } → html. The closed ones fold into one line at the end. */
|
|
@@ -351,38 +371,45 @@ export function listHtml(rows, o = {}) {
|
|
|
351
371
|
const oo = { ...o, now, product: o.product || ((r) => r.product || '') };
|
|
352
372
|
LAST = { rows, o: oo };
|
|
353
373
|
const every = rows; rows = filterRows(rows, oo);
|
|
354
|
-
const W = windowOf(v.span, rows.length ? rows : every, now), T = ticksOf(W), grid = gridHtml(W, T, now);
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
+ `<div class="
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
374
|
+
const W = windowOf(v.span, rows.length ? rows : every, now, OFF), T = ticksOf(W), grid = gridHtml(W, T, now);
|
|
375
|
+
LASTW = W;
|
|
376
|
+
// the Table part (pm-table): a heading sorts by its column (aria-sort draws the arrow), the timeline column last
|
|
377
|
+
const sortHd = (k, n) => { const x = v.sorts.find((y) => y.k === k), first = !!x && v.sorts[0].k === k; return `<th scope="col" class="c-${k}" aria-sort="${first ? (x.up ? 'ascending' : 'descending') : 'none'}"><button type="button" class="wk-hd" data-wksort="${k}" title="Sort by ${esc(n.toLowerCase())}">${esc(n)}</button></th>`; };
|
|
378
|
+
// a tick's label keeps clear of the one before it: about 64 px of the track (o.tpx, the page measures it), else 8 %
|
|
379
|
+
const gap = o.tpx ? (64 / o.tpx) * 100 : 8; let lastX = -100;
|
|
380
|
+
const TT = T.filter((t) => t.show).filter((t) => { const x = X(W, t.at < W.from ? W.from : t.at); if (x - lastX < gap) return false; lastX = x; return true; });
|
|
381
|
+
const tlHead = !tl ? '' : `<th scope="col" class="wk-x"><div class="wk-tl">${TT.map((t) => `<span class="wk-tk" style="left:${P(X(W, t.at < W.from ? W.from : t.at))}">${esc(t.label)}</span>`).join('')}</div></th>`;
|
|
382
|
+
const scale = SPANS.map(([k, n]) => `<button type="button" class="pm-tab" role="tab" aria-selected="${k === v.span}" data-wkspick="${k}">${esc(n)}</button>`).join('');
|
|
383
|
+
const nav = (k, label, d) => `<button type="button" class="pm-btn" data-wknav="${k}" aria-label="${label}" title="${label}">${SV(d, 16)}</button>`;
|
|
384
|
+
const head = `<div class="head"><h2 class="pm-h">Initiatives</h2><span class="sp"></span>`
|
|
385
|
+
+ (tl ? `<div class="pm-tabs" role="tablist" aria-label="Scale of the timeline">${scale}</div>${nav('back', 'Earlier', I.back)}${nav('today', 'Go to today', I.today)}${nav('on', 'Later', I.on)}` : '')
|
|
386
|
+
+ `<button type="button" class="pm-btn" data-wkmenu aria-haspopup="dialog" aria-label="Choose columns, sort and filter" title="Choose columns, sort and filter">${SV(I.tune, 16)}${filterCount() ? `<i class="wk-fc" aria-hidden="true">${filterCount()}</i>` : ''}</button></div>`;
|
|
387
|
+
const ncol = 1 + keys.length + (tl ? 1 : 0);
|
|
388
|
+
let h = `<section class="pm-block wk-blk" aria-label="Initiatives">${head}${showingHtml(every.length - rows.length)}`
|
|
389
|
+
+ `<div class="wk-tw"><table class="pm-table wk${tl ? ' has-x' : ''}" aria-label="Initiatives"><colgroup><col class="c-title">${keys.map((k) => `<col class="c-${k}">`).join('')}${tl ? '<col class="c-x">' : ''}</colgroup>`
|
|
390
|
+
+ `<thead><tr>${sortHd('title', 'Initiative')}${keys.map((k) => sortHd(k, byK[k].n)).join('')}${tlHead}</tr></thead><tbody>`;
|
|
391
|
+
const row = (r) => `<tr class="wk-i${o.sel === r.key ? ' sel' : ''}${CARD === r.key ? ' hov' : ''}${isClosed(r) ? ' cl' : ''}" tabindex="0" data-key="${esc(r.key)}" aria-label="${esc(r.title + (keys.length ? ', ' + words(r, keys, oo) : ''))}">`
|
|
392
|
+
+ `<td class="n">${esc(r.title)}</td>${keys.map((k) => cellHtml(r, k, oo)).join('')}`
|
|
393
|
+
+ (tl ? `<td class="wk-x" data-wkbar="${esc(r.key)}"><div class="wk-bw pm-gt">${grid}${o.bar ? o.bar(r, W) : barHtml(r, W, { now })}</div>${CARD === r.key ? cardHtml(r, W, now) : ''}</td>` : '') + '</tr>';
|
|
370
394
|
const all = o.order ? o.order(rows) : rows, base = all.filter((r) => !isClosed(r)), shut = all.filter(isClosed), G = groupsOf(base, v.group, oo);
|
|
371
|
-
const gline = (inner) => `<
|
|
395
|
+
const gline = (inner) => `<tr class="wk-g"><td colspan="${ncol}"><div class="pm-group">${inner}</div></td></tr>`;
|
|
372
396
|
if (!G) h += sortRows(base, oo).map(row).join('');
|
|
373
397
|
else for (const g of G) {
|
|
374
|
-
h += gline(`<span
|
|
398
|
+
h += gline(`<span>${esc(g.name)}</span><small>${g.rows.length}</small>`);
|
|
375
399
|
h += sortRows(g.rows, oo).map(row).join('');
|
|
376
400
|
}
|
|
377
|
-
|
|
401
|
+
h += '</tbody></table></div>';
|
|
402
|
+
if (!rows.length && every.length) h += `<p class="wk-empty pm-meta">No initiative matches these filters. <button type="button" class="wk-sa" data-wkclear>Show all</button></p>`;
|
|
403
|
+
// the closed and completed ones: one last fold line that opens them, as stages with no task fold in the Work breakdown
|
|
378
404
|
if (shut.length) {
|
|
379
|
-
h +=
|
|
380
|
-
if (!SHUT) h += sortRows(shut, oo).map(row).join('')
|
|
405
|
+
h += `<button type="button" class="pm-fold" data-wkclosed aria-expanded="${!SHUT}">${SV(I.chev, 14)}${shut.length} closed</button>`;
|
|
406
|
+
if (!SHUT) h += `<div class="wk-tw"><table class="pm-table wk${tl ? ' has-x' : ''}" aria-label="Closed initiatives"><colgroup><col class="c-title">${keys.map((k) => `<col class="c-${k}">`).join('')}${tl ? '<col class="c-x">' : ''}</colgroup><tbody>${sortRows(shut, oo).map(row).join('')}</tbody></table></div>`;
|
|
381
407
|
}
|
|
382
|
-
h +=
|
|
383
|
-
|
|
384
|
-
return h;
|
|
408
|
+
if (tl) h += `<div class="wk-key pm-meta"><span><i class="k dn"></i>Done</span><span><i class="k nw"></i>Now</span><span><i class="k pl"></i>Planned</span><span><i class="k td"></i>Today</span><span><i class="k ms"></i>Milestone</span><span><i class="k mn"></i>${RO ? 'Close milestones; press a row to open it. Nothing here can be changed.' : 'Close milestones, hover to see them'}</span></div>`;
|
|
409
|
+
return h + '</section>';
|
|
385
410
|
}
|
|
411
|
+
/** The window the list was last drawn with: the Next milestones line follows it. */
|
|
412
|
+
export const lastWindow = () => LASTW;
|
|
386
413
|
|
|
387
414
|
/* ── the view menu (round 3; the design thread's order, 2026-11-19): Filter, Sort, View, then Columns folded; "PMOS remembers this" at the foot,
|
|
388
415
|
* with Reset only when something differs from the usual. About 360 px wide, small quiet titles, pills (no nested menu). ── */
|
|
@@ -427,6 +454,8 @@ export function menuHtml(o = {}) {
|
|
|
427
454
|
if (RO || o.ro) return `<div class="wk-menu" role="dialog" aria-label="Filter and sort">`
|
|
428
455
|
+ `<section><h6>Filter${filterOn() ? ` <button type="button" class="wk-lk" data-wkclear>Clear</button>` : ''}</h6>${F.length ? F.map(facet).join('') : '<p class="wk-note">Nothing to filter.</p>'}</section>`
|
|
429
456
|
+ `<section><h6>Sort${S.length ? ` <small>· ${esc(S.map((x) => word(x.k)).join(', then '))}</small>` : ''}</h6><div class="wk-pl wk-sorts">${sortPills}</div></section>`
|
|
457
|
+
// the timeline's switch (it was a button on the timeline's head before WorkDS): a reader can still hide it
|
|
458
|
+
+ `<section><h6>View</h6><div class="wk-mr wk-tlr"><span>Timeline</span>${sw(v.tl, 'Timeline', 'data-wktlsw')}</div></section>`
|
|
430
459
|
+ `<div class="wk-ft"><span>For this visit only</span>${differs ? '<button type="button" class="wk-rs" data-wkreset>Reset</button>' : ''}</div></div>`;
|
|
431
460
|
return `<div class="wk-menu" role="dialog" aria-label="Filter, sort and view">`
|
|
432
461
|
+ `<section><h6>Filter${filterOn() ? ` <button type="button" class="wk-lk" data-wkclear>Clear</button>` : ''}</h6>${filt}</section>`
|
|
@@ -451,6 +480,8 @@ export function pressOf(t) {
|
|
|
451
480
|
if (q('[data-wkcols]')) return { kind: 'cols' };
|
|
452
481
|
if ((b = q('[data-wkspick]'))) return { kind: 'span', span: b.dataset.wkspick };
|
|
453
482
|
if (q('[data-wkspan]')) return { kind: 'spanmenu' };
|
|
483
|
+
if ((b = q('[data-wknav]'))) return { kind: 'nav', dir: b.dataset.wknav };
|
|
484
|
+
if (q('[data-wkmenu]')) return { kind: 'menu', el: q('[data-wkmenu]') };
|
|
454
485
|
if ((b = q('[data-wktl]'))) return { kind: 'timeline', on: b.dataset.wktl === 'on' };
|
|
455
486
|
if ((b = q('[data-wkstage]'))) return { kind: 'stage', key: b.dataset.wkstage, el: b };
|
|
456
487
|
if (q('[data-wkclosed]')) return { kind: 'closed' };
|
|
@@ -479,6 +510,8 @@ export function apply(p) {
|
|
|
479
510
|
else if (p.kind === 'cols') COLS_OPEN = !COLS_OPEN;
|
|
480
511
|
else if (p.kind === 'closed') SHUT = !SHUT;
|
|
481
512
|
else if (p.kind === 'card') CARD = CARD === p.key ? null : p.key;
|
|
513
|
+
else if (p.kind === 'nav') { if (p.dir === 'today') toToday(); else step(p.dir === 'back' ? -1 : 1, LAST ? LAST.rows : []); }
|
|
514
|
+
else if (p.kind === 'menu') return false;
|
|
482
515
|
else if (p.kind === 'inside') return false;
|
|
483
516
|
else return false;
|
|
484
517
|
return true;
|
|
@@ -61,12 +61,51 @@
|
|
|
61
61
|
.pm-ds .pm-sug{display:flex;align-items:center;gap:10px;background:var(--blue-tint);border-radius:var(--radius-md);padding:4px 4px 4px 12px;font-size:13px}
|
|
62
62
|
.pm-ds .pm-sug .say{flex:1}
|
|
63
63
|
.pm-ds .pm-star{color:var(--blue)}
|
|
64
|
+
.pm-ds .pm-sug.x{flex-direction:column;align-items:stretch;gap:10px;padding:14px 16px}
|
|
65
|
+
.pm-ds .pm-sug.x .ttl{display:flex;align-items:center;gap:8px;font-weight:600}
|
|
66
|
+
.pm-ds .pm-sug.x .ttl .pm-ic{color:var(--blue)}
|
|
67
|
+
.pm-ds .pm-sug.x dl{display:grid;grid-template-columns:110px 1fr;gap:6px 12px;margin:0;font-size:14px;line-height:20px}
|
|
68
|
+
.pm-ds .pm-sug.x dt{color:var(--muted)}
|
|
69
|
+
.pm-ds .pm-sug.x dd{margin:0;min-width:0}
|
|
70
|
+
.pm-ds .pm-sug.x dd ul{margin:0;padding-left:18px}
|
|
71
|
+
.pm-ds .pm-sug.x dd li{margin:0 0 2px}
|
|
72
|
+
.pm-ds .pm-sug.x dd.src{color:var(--muted)}
|
|
73
|
+
.pm-ds .pm-sug.x .ans{display:flex;gap:8px;justify-content:flex-end}
|
|
64
74
|
.pm-ds .pm-ev{border:1px solid var(--line);border-radius:var(--radius-md);background:var(--card);box-shadow:var(--raise);padding:6px 10px;display:flex;flex-direction:column;line-height:1.35;font-size:13px}
|
|
65
75
|
.pm-ds .pm-ev b{font-weight:600}
|
|
66
76
|
.pm-ds .pm-ev.over{background:none;box-shadow:none;border-style:dashed;color:var(--muted)}
|
|
67
77
|
.pm-ds .pm-fold{height:44px;display:flex;align-items:center;gap:8px;padding:0 14px;border:0;border-top:1px dashed var(--line);background:none;width:100%;font:inherit;font-size:13px;font-weight:600;color:var(--muted);text-align:left;cursor:pointer}
|
|
68
78
|
.pm-ds .pm-group{height:32px;display:flex;align-items:center;gap:8px;padding:0 14px;font-size:13px;font-weight:600;background:var(--well);color:var(--muted)}
|
|
69
79
|
.pm-ds .pm-group.now{background:var(--leaf-tint);color:var(--ink)}
|
|
80
|
+
.pm-ds .pm-dia{position:absolute;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;padding:0;transform:rotate(45deg);background:var(--card);border:2px solid var(--ink);border-radius:2px;box-sizing:border-box;cursor:pointer;z-index:2}
|
|
81
|
+
.pm-ds .pm-dia.late{border-color:var(--alert)}
|
|
82
|
+
.pm-ds .pm-dia.dn{background:var(--leaf);border-color:var(--leaf)}
|
|
83
|
+
.pm-ds .pm-dia.n{width:18px;height:18px;margin:-9px 0 0 -9px;background:var(--ink);border-color:var(--ink);display:flex;align-items:center;justify-content:center}
|
|
84
|
+
.pm-ds .pm-dia.n>b{transform:rotate(-45deg);color:var(--card);font-size:11px;line-height:1;font-weight:600}
|
|
85
|
+
.pm-ds .pm-dia:focus-visible{outline:none;box-shadow:var(--glow)}
|
|
86
|
+
.pm-ds .pm-now{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:var(--alert);z-index:1}
|
|
87
|
+
.pm-ds .pm-now>span{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:13px;font-style:normal;font-weight:600;color:var(--alert);white-space:nowrap}
|
|
88
|
+
.pm-ds .pm-gt{position:relative;height:24px}
|
|
89
|
+
.pm-ds .pm-gt>.b{position:absolute;top:7px;height:10px;border-radius:var(--radius-pill);background:var(--well);box-shadow:inset 0 0 0 1px var(--line)}
|
|
90
|
+
.pm-ds .pm-gt>.b.dn{background:var(--leaf);box-shadow:none}
|
|
91
|
+
.pm-ds .pm-gt>.b.nw{background:var(--blue);box-shadow:none}
|
|
92
|
+
.pm-ds .pm-dline{position:relative;padding:0 40px 0 8px}
|
|
93
|
+
.pm-ds .pm-dline .axis{position:relative;height:20px;font-size:13px;color:var(--muted)}
|
|
94
|
+
.pm-ds .pm-dline .axis .tk{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
|
|
95
|
+
.pm-ds .pm-dline .line{position:relative;height:calc(24px + var(--rows,1) * 86px);background:linear-gradient(var(--line),var(--line)) 0 12px/100% 1px no-repeat}
|
|
96
|
+
.pm-ds .pm-dline .line>.pm-now{bottom:auto;height:34px;top:-8px}
|
|
97
|
+
.pm-ds .pm-dline .ms{position:absolute;top:0;width:0}
|
|
98
|
+
.pm-ds .pm-dline .ms>.pm-dia{top:12px}
|
|
99
|
+
.pm-ds .pm-dline .ms .lb{position:absolute;top:calc(28px + var(--row) * 86px);left:-6px;display:flex;flex-direction:column;align-items:flex-start;gap:0;width:max-content;max-width:220px;font-size:13px;line-height:20px}
|
|
100
|
+
.pm-ds .pm-dline .ms .lb b{font-size:15px;line-height:24px;font-weight:600}
|
|
101
|
+
.pm-ds .pm-dline .ms .lb .code{font-family:var(--font-mono);color:var(--muted)}
|
|
102
|
+
.pm-ds .pm-dline .ms.low::before{content:"";position:absolute;left:0;top:20px;height:calc(var(--row) * 86px + 6px);border-left:1px dashed var(--line)}
|
|
103
|
+
.pm-ds .pm-dline .ms.late .lb .code{color:var(--alert)}
|
|
104
|
+
.pm-ds .pm-more{position:absolute;top:20px;display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:none;padding:0;font:inherit;font-size:13px;color:var(--muted);cursor:pointer}
|
|
105
|
+
.pm-ds .pm-more.r{right:0}
|
|
106
|
+
.pm-ds .pm-more.l{left:-8px}
|
|
107
|
+
.pm-ds .pm-more b{min-width:24px;height:20px;padding:0 6px;border-radius:var(--radius-pill);background:var(--ink);color:var(--card);font-size:11px;line-height:20px;font-weight:600}
|
|
108
|
+
.pm-ds .pm-more:focus-visible{outline:none;box-shadow:var(--glow);border-radius:var(--radius-sm)}
|
|
70
109
|
.pm-ds .pm-block{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-card);box-shadow:var(--raise);padding:16px 18px;display:flex;flex-direction:column;gap:12px;min-width:0}
|
|
71
110
|
.pm-ds .pm-block.flat{background:var(--well);box-shadow:none;border-color:transparent}
|
|
72
111
|
.pm-ds .pm-block .head{display:flex;align-items:center;gap:10px}
|