rvlib-shipkit 2.8.0 → 2.10.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/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/src/checks/SK005-rvlib-versions.check.ts +17 -11
- package/src/cli/cmd_Fleet.ts +8 -5
- package/src/cli/cmd_Review.ts +2 -1
- package/src/core/update-policy.ts +6 -0
- package/src/fleet/commit-bump.ts +123 -0
- package/src/fleet/push-fleet.ts +9 -3
- package/src/fleet/update-fleet.ts +38 -9
- package/src/review/cells.ts +548 -0
- package/src/review/format.ts +1 -1
- package/src/review/model.ts +29 -4
- package/src/review/previews.ts +124 -0
- package/src/review/routes.ts +82 -45
- package/src/review/store.ts +6 -5
- package/src/serve/hub-app/auto-text.tsx +52 -0
- package/src/serve/hub-app/hub.css +2 -0
- package/src/serve/hub-app/media-view.tsx +3 -11
- package/src/serve/hub-app/review/kind-view.tsx +21 -22
- package/src/serve/hub-app/review/kit.tsx +11 -12
- package/src/serve/hub-app/review/review-board.tsx +15 -13
- package/src/serve/hub-app/review/review-cells.tsx +241 -0
- package/src/serve/hub-app/review/review-kit.ts +79 -0
- package/src/serve/hub-app/review/review-list.tsx +87 -122
- package/src/serve/hub-app/review/review-page.tsx +25 -66
- package/src/serve/hub-app/review/review-st.ts +269 -668
- package/src/serve/hub-app/review/review-thread.tsx +301 -0
- package/src/serve/hub-app/review/review-views.tsx +372 -234
- package/src/serve/hub-app/review/thread-st.ts +770 -0
- package/src/serve/hub-app/review/trailer-page.tsx +5 -4
- package/src/serve/hub-app/review.css +252 -90
- package/src/serve/hub-app/review/review-answer.tsx +0 -248
|
@@ -1,98 +1,57 @@
|
|
|
1
1
|
// a repo's review page (`#page:review`, wiki build/shipkit/review.md, The review page): the cards on the left, the open
|
|
2
|
-
// one
|
|
3
|
-
//
|
|
4
|
-
// shows
|
|
2
|
+
// one as a chat on the right (review-thread.tsx). On a phone one pane at a time: the cards, or the card with its answer
|
|
3
|
+
// box and the verdicts under the thumb. Everything is read while the page shows
|
|
5
4
|
import { observer } from 'mobx-react-lite'
|
|
6
|
-
import { useEffect
|
|
5
|
+
import { useEffect } from 'react'
|
|
7
6
|
import { Group, Panel, Separator } from 'react-resizable-panels'
|
|
8
7
|
import type { RepoSt } from '../repo-st.ts'
|
|
9
|
-
import { ReviewForm, VerdictBar } from './review-answer.tsx'
|
|
10
8
|
import { ReviewList } from './review-list.tsx'
|
|
11
|
-
import type {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
const PANE_LABEL: Record<PhonePane, string> = { list: 'cards', card: 'card', answer: 'answer' }
|
|
9
|
+
import type { ReviewSt } from './review-st.ts'
|
|
10
|
+
import { ThreadColumn } from './review-thread.tsx'
|
|
15
11
|
|
|
16
12
|
export const ReviewPage = observer(({ app }: { app: RepoSt }) => {
|
|
17
13
|
const rv = app.review
|
|
18
|
-
const el = useRef<HTMLDivElement | null>(null)
|
|
19
14
|
useEffect(() => {
|
|
20
15
|
rv.start()
|
|
21
16
|
return () => rv.stop()
|
|
22
17
|
}, [rv])
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
const node = el.current
|
|
25
|
-
if (node == null || typeof ResizeObserver === 'undefined') return
|
|
26
|
-
// the pick lands on the next frame: a relayout inside the callback is the observer's loop error
|
|
27
|
-
let raf = 0
|
|
28
|
-
const ro = new ResizeObserver(([e]) => {
|
|
29
|
-
const w = e!.contentRect.width
|
|
30
|
-
cancelAnimationFrame(raf)
|
|
31
|
-
raf = requestAnimationFrame(() => rv.fit(w))
|
|
32
|
-
})
|
|
33
|
-
ro.observe(node)
|
|
34
|
-
return () => {
|
|
35
|
-
cancelAnimationFrame(raf)
|
|
36
|
-
ro.disconnect()
|
|
37
|
-
}
|
|
38
|
-
}, [rv, rv.phone.on])
|
|
39
18
|
if (rv.phone.on)
|
|
40
19
|
return (
|
|
41
20
|
<div className="rv-phone">
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<div className="rv-phonepane">
|
|
51
|
-
{rv.phone.pane === 'list' ? <ReviewList rv={rv} /> : rv.phone.pane === 'card' ? <ReviewImage rv={rv} /> : <ReviewForm rv={rv} />}
|
|
52
|
-
</div>
|
|
53
|
-
{rv.phone.pane === 'list' ? null : <VerdictBar rv={rv} />}
|
|
21
|
+
{rv.phone.pane === 'list' ? (
|
|
22
|
+
<>
|
|
23
|
+
<PhoneTop app={app} />
|
|
24
|
+
<div className="rv-phonepane"><ReviewList rv={rv} /></div>
|
|
25
|
+
</>
|
|
26
|
+
) : (
|
|
27
|
+
<ThreadColumn rv={rv} />
|
|
28
|
+
)}
|
|
54
29
|
<Toast rv={rv} />
|
|
55
30
|
</div>
|
|
56
31
|
)
|
|
57
32
|
return (
|
|
58
33
|
<>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<Panel id="review-stack" defaultSize="68%" minSize={300} className="rv-pane" style={PANEL}>
|
|
68
|
-
<div className="rv-scroll">
|
|
69
|
-
<ReviewImage rv={rv} />
|
|
70
|
-
<ReviewForm rv={rv} />
|
|
71
|
-
</div>
|
|
34
|
+
<Toast rv={rv} />
|
|
35
|
+
<Group className="rv-cols" orientation="horizontal">
|
|
36
|
+
<Panel id="review-list" defaultSize="24%" minSize={180} className="rv-pane" style={PANEL}>
|
|
37
|
+
<ReviewList rv={rv} />
|
|
38
|
+
</Panel>
|
|
39
|
+
<Separator className="rsep" />
|
|
40
|
+
<Panel id="review-thread" defaultSize="76%" minSize={360} className="rv-pane" style={PANEL}>
|
|
41
|
+
<ThreadColumn rv={rv} />
|
|
72
42
|
</Panel>
|
|
73
|
-
|
|
74
|
-
<>
|
|
75
|
-
<Panel id="review-image" defaultSize="54%" minSize={300} className="rv-pane" style={PANEL}>
|
|
76
|
-
<div className="rv-scroll"><ReviewImage rv={rv} /></div>
|
|
77
|
-
</Panel>
|
|
78
|
-
<Separator className="rsep" />
|
|
79
|
-
<Panel id="review-form" defaultSize="26%" minSize={260} className="rv-pane" style={PANEL}>
|
|
80
|
-
<div className="rv-scroll"><ReviewForm rv={rv} /></div>
|
|
81
|
-
</Panel>
|
|
82
|
-
</>
|
|
83
|
-
)}
|
|
84
|
-
</Group>
|
|
43
|
+
</Group>
|
|
85
44
|
</>
|
|
86
45
|
)
|
|
87
46
|
})
|
|
88
47
|
|
|
89
|
-
/** the phone's top line: the way back to the hub (none in another tool's frame),
|
|
90
|
-
* panes, which leave it no room */
|
|
48
|
+
/** the phone's top line over the cards: the way back to the hub (none in another tool's frame), the repo, the count
|
|
49
|
+
* that waits on him. On a phone the page covers the hub's panes, which leave it no room */
|
|
91
50
|
export const PhoneTop = observer(({ app }: { app: RepoSt }) => (
|
|
92
51
|
<div className="rv-phonetop">
|
|
93
52
|
{app.home.embedded ? null : <button className="ghost" onClick={() => app.showReadme()}>◂ hub</button>}
|
|
94
53
|
<b>{app.name}</b>
|
|
95
|
-
<span className="rv-dim">{app.sel?.t === 'trailer' ? 'trailer' :
|
|
54
|
+
<span className="rv-dim">{app.sel?.t === 'trailer' ? 'trailer' : `review${app.review.pendingCount > 0 ? ` · ${app.review.pendingCount} waiting` : ''}`}</span>
|
|
96
55
|
</div>
|
|
97
56
|
))
|
|
98
57
|
|