@deepseek-ai/dsh-experimental-client-ui-forge 0.2.3-alpha.3 → 0.2.3-alpha.4
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/README.i18n.yaml +10 -10
- package/README.md +16 -15
- package/README.zh.md +16 -15
- package/lib/client.js +18 -18
- package/lib/client.js.map +1 -1
- package/lib/index.js +67 -18
- package/lib/typert.host.js +89 -45
- package/lib/typert.remote-client.d.ts +7 -7
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +48 -36
- package/lib/types/client/BranchPicker.d.ts.map +1 -1
- package/lib/types/client/BranchPicker.js.map +1 -1
- package/lib/types/client/ChangeRequestCard.d.ts +10 -1
- package/lib/types/client/ChangeRequestCard.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestCard.js.map +1 -1
- package/lib/types/client/ChangeRequestOverview.d.ts +16 -0
- package/lib/types/client/ChangeRequestOverview.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestOverview.js.map +1 -1
- package/lib/types/client/ChangeRequestsSection.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestsSection.js.map +1 -1
- package/lib/types/client/ChangeStatus.d.ts +41 -0
- package/lib/types/client/ChangeStatus.d.ts.map +1 -0
- package/lib/types/client/ChangeStatus.js.map +1 -0
- package/lib/types/client/ChangedFiles.d.ts.map +1 -1
- package/lib/types/client/ChangedFiles.js.map +1 -1
- package/lib/types/client/ChangesTab.d.ts +23 -8
- package/lib/types/client/ChangesTab.d.ts.map +1 -1
- package/lib/types/client/ChangesTab.js.map +1 -1
- package/lib/types/client/CommitMenu.d.ts +8 -5
- package/lib/types/client/CommitMenu.d.ts.map +1 -1
- package/lib/types/client/CommitMenu.js.map +1 -1
- package/lib/types/client/CopyCommandButton.d.ts +19 -0
- package/lib/types/client/CopyCommandButton.d.ts.map +1 -0
- package/lib/types/client/CopyCommandButton.js.map +1 -0
- package/lib/types/client/DiffFile.d.ts +20 -3
- package/lib/types/client/DiffFile.d.ts.map +1 -1
- package/lib/types/client/DiffFile.js.map +1 -1
- package/lib/types/client/EnvironmentRows.d.ts.map +1 -1
- package/lib/types/client/EnvironmentRows.js.map +1 -1
- package/lib/types/client/FileLabel.d.ts +5 -5
- package/lib/types/client/FileLabel.d.ts.map +1 -1
- package/lib/types/client/FileLabel.js.map +1 -1
- package/lib/types/client/HostSettings.d.ts.map +1 -1
- package/lib/types/client/HostSettings.js.map +1 -1
- package/lib/types/client/LensFilter.d.ts.map +1 -1
- package/lib/types/client/LensFilter.js.map +1 -1
- package/lib/types/client/ReviewComposer.d.ts.map +1 -1
- package/lib/types/client/ReviewComposer.js.map +1 -1
- package/lib/types/client/ReviewControls.d.ts.map +1 -1
- package/lib/types/client/ReviewControls.js.map +1 -1
- package/lib/types/client/ReviewThread.d.ts.map +1 -1
- package/lib/types/client/ReviewThread.js.map +1 -1
- package/lib/types/client/ReviewThreads.d.ts +17 -2
- package/lib/types/client/ReviewThreads.d.ts.map +1 -1
- package/lib/types/client/ReviewThreads.js.map +1 -1
- package/lib/types/client/SubmitReview.d.ts.map +1 -1
- package/lib/types/client/SubmitReview.js.map +1 -1
- package/lib/types/client/ThreadList.d.ts.map +1 -1
- package/lib/types/client/ThreadList.js.map +1 -1
- package/lib/types/client/ViewOptionsMenu.d.ts.map +1 -1
- package/lib/types/client/ViewOptionsMenu.js.map +1 -1
- package/lib/types/client/WorktreeNameDialog.d.ts.map +1 -1
- package/lib/types/client/WorktreeNameDialog.js.map +1 -1
- package/lib/types/client/WorktreeProgress.d.ts.map +1 -1
- package/lib/types/client/WorktreeProgress.js.map +1 -1
- package/lib/types/client/WorktreeSettings.d.ts.map +1 -1
- package/lib/types/client/WorktreeSettings.js.map +1 -1
- package/lib/types/client/WorktreeToggle.d.ts.map +1 -1
- package/lib/types/client/WorktreeToggle.js.map +1 -1
- package/lib/types/client/changes-store.d.ts +7 -4
- package/lib/types/client/changes-store.d.ts.map +1 -1
- package/lib/types/client/changes-store.js.map +1 -1
- package/lib/types/client/glyphs.d.ts +14 -1
- package/lib/types/client/glyphs.d.ts.map +1 -1
- package/lib/types/client/glyphs.js.map +1 -1
- package/lib/types/client/index.d.ts +1 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/locales.d.ts +5 -4
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js.map +1 -1
- package/lib/types/client/minute-clock.d.ts +7 -0
- package/lib/types/client/minute-clock.d.ts.map +1 -0
- package/lib/types/client/minute-clock.js.map +1 -0
- package/lib/types/client/mount.d.ts.map +1 -1
- package/lib/types/client/mount.js.map +1 -1
- package/lib/types/client/review-page/ReviewActivity.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewActivity.js.map +1 -1
- package/lib/types/client/review-page/ReviewChat.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewChat.js.map +1 -1
- package/lib/types/client/review-page/ReviewDetail.d.ts +4 -1
- package/lib/types/client/review-page/ReviewDetail.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewDetail.js.map +1 -1
- package/lib/types/client/review-page/ReviewList.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewList.js.map +1 -1
- package/lib/types/client/review-page/ReviewPage.d.ts +2 -2
- package/lib/types/client/review-page/ReviewPage.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewPage.js.map +1 -1
- package/lib/types/client/review-page/ReviewStatus.d.ts +17 -13
- package/lib/types/client/review-page/ReviewStatus.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewStatus.js.map +1 -1
- package/lib/types/client/review-page/review-store.d.ts +1 -1
- package/lib/types/client/review-threads.d.ts +14 -7
- package/lib/types/client/review-threads.d.ts.map +1 -1
- package/lib/types/client/review-threads.js.map +1 -1
- package/lib/types/client/status.d.ts +0 -6
- package/lib/types/client/status.d.ts.map +1 -1
- package/lib/types/client/status.js.map +1 -1
- package/lib/types/client/thread-state.d.ts +2 -2
- package/lib/types/client/thread-state.d.ts.map +1 -1
- package/lib/types/client/thread-state.js.map +1 -1
- package/lib/types/client/toolbar-fold.d.ts +16 -6
- package/lib/types/client/toolbar-fold.d.ts.map +1 -1
- package/lib/types/client/toolbar-fold.js.map +1 -1
- package/lib/types/index.d.ts +25 -12
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/panel.js.map +1 -1
- package/lib/types/types.d.ts +22 -5
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/worktree.js.map +1 -1
- package/package.json +60 -58
- package/src/client/BaseMenu.module.css +6 -3
- package/src/client/BranchPicker.tsx +28 -19
- package/src/client/ChangeRequestCard.tsx +71 -41
- package/src/client/ChangeRequestOverview.tsx +174 -74
- package/src/client/ChangeRequestsSection.tsx +33 -8
- package/src/client/ChangeStatus.module.css +70 -0
- package/src/client/ChangeStatus.tsx +104 -0
- package/src/client/ChangedFiles.tsx +20 -7
- package/src/client/ChangesTab.module.css +89 -20
- package/src/client/ChangesTab.tsx +332 -134
- package/src/client/CommitMenu.tsx +77 -38
- package/src/client/CopyCommandButton.tsx +25 -0
- package/src/client/DiffFile.tsx +83 -21
- package/src/client/EnvironmentRows.tsx +13 -11
- package/src/client/FileLabel.module.css +16 -18
- package/src/client/FileLabel.tsx +15 -31
- package/src/client/Forge.module.css +3 -10
- package/src/client/HostSettings.tsx +10 -8
- package/src/client/LensFilter.tsx +11 -9
- package/src/client/ReviewComposer.tsx +29 -17
- package/src/client/ReviewControls.tsx +8 -6
- package/src/client/ReviewThread.tsx +63 -21
- package/src/client/ReviewThreads.tsx +126 -34
- package/src/client/SubmitReview.tsx +5 -3
- package/src/client/ThreadList.module.css +4 -3
- package/src/client/ThreadList.tsx +5 -5
- package/src/client/ViewOptionsMenu.tsx +10 -8
- package/src/client/WorktreeNameDialog.tsx +15 -11
- package/src/client/WorktreeProgress.tsx +11 -9
- package/src/client/WorktreeSettings.tsx +4 -3
- package/src/client/WorktreeToggle.tsx +65 -35
- package/src/client/changes-store.ts +8 -5
- package/src/client/glyphs.tsx +23 -1
- package/src/client/index.ts +1 -2
- package/src/client/locales.ts +40 -32
- package/src/client/minute-clock.ts +19 -0
- package/src/client/mount.ts +66 -51
- package/src/client/review-page/ReviewActivity.tsx +5 -4
- package/src/client/review-page/ReviewChat.tsx +46 -17
- package/src/client/review-page/ReviewDetail.tsx +62 -31
- package/src/client/review-page/ReviewList.tsx +23 -18
- package/src/client/review-page/ReviewPage.module.css +81 -10
- package/src/client/review-page/ReviewPage.tsx +43 -35
- package/src/client/review-page/ReviewStatus.tsx +64 -39
- package/src/client/review-threads.ts +23 -11
- package/src/client/status.ts +0 -9
- package/src/client/thread-state.ts +8 -7
- package/src/client/toolbar-fold.ts +59 -14
- package/src/index.ts +78 -20
- package/src/panel.ts +1 -1
- package/src/types.ts +24 -5
- package/src/worktree.ts +1 -1
- package/lib/types/client/AttentionIndicator.d.ts +0 -22
- package/lib/types/client/AttentionIndicator.d.ts.map +0 -1
- package/lib/types/client/AttentionIndicator.js.map +0 -1
- package/src/client/AttentionIndicator.tsx +0 -37
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The status control in the header of a change request's changes view: a button with the checks outcome that opens
|
|
3
|
+
* the change request's status blocks in a panel over the view, where the Session panel's card is out of sight.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { useEffect, useId, useRef, useState, type KeyboardEvent, type ReactNode } from 'react'
|
|
7
|
+
import { Tooltip } from '@deepseek-ai/dsh-client-ui-primitives/client'
|
|
8
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots/client'
|
|
9
|
+
import type { ChangeRequestSnapshot } from '@deepseek-ai/dsh-experimental-forge/types'
|
|
10
|
+
import { ChecksMark } from './ChangeRequestCard.tsx'
|
|
11
|
+
import type { NS } from './locales.ts'
|
|
12
|
+
import { useMinuteClock } from './minute-clock.ts'
|
|
13
|
+
import { ReviewStatus, type StatusActions } from './review-page/ReviewStatus.tsx'
|
|
14
|
+
import type { ChangeRequestEntry } from './status.ts'
|
|
15
|
+
import css from './ChangeStatus.module.css'
|
|
16
|
+
|
|
17
|
+
/** What the status blocks need beyond the change request: the language of numbers, the pointer, and the actions they run. */
|
|
18
|
+
export interface ChangeStatusFacts {
|
|
19
|
+
/** Active UI language for numeric formatting. */
|
|
20
|
+
readonly locale: string
|
|
21
|
+
/** Whether the primary pointer is coarse, so the blocks' explanations open on a press. */
|
|
22
|
+
readonly coarsePointer: boolean
|
|
23
|
+
/** The actions the blocks run on the change request. */
|
|
24
|
+
readonly actions: StatusActions
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** The actions a surface with a Session binding always offers the status blocks, beyond opening a link. */
|
|
28
|
+
export type BoundStatusActions = {
|
|
29
|
+
readonly [K in Exclude<keyof StatusActions, 'openLink' | 'viewChanges'>]-?: NonNullable<StatusActions[K]>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Props of the status control. */
|
|
33
|
+
export interface ChangeStatusProps extends ChangeStatusFacts, PropsLocale<typeof NS> {
|
|
34
|
+
/** The change request. */
|
|
35
|
+
readonly entry: ChangeRequestEntry
|
|
36
|
+
/** Its latest snapshot. */
|
|
37
|
+
readonly snapshot: ChangeRequestSnapshot
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The status blocks of the open panel, whose relative times follow the minute while it shows. */
|
|
41
|
+
function StatusBlocks({ entry, snapshot, locale, coarsePointer, actions, t }: ChangeStatusProps): ReactNode {
|
|
42
|
+
const now = useMinuteClock()
|
|
43
|
+
// Only the row of the changed lines names the change request, and this panel leaves that row out.
|
|
44
|
+
return <ReviewStatus frame={entry} snapshot={snapshot} name={snapshot.title} now={now} actions={actions} locale={locale}
|
|
45
|
+
coarsePointer={coarsePointer} lines={false} t={t} />
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Render the button and, while open, the panel. A press outside the panel, or Escape, closes it; a press or a key in
|
|
50
|
+
* a menu that a block opens belongs to that menu. Opening hands the keyboard to the panel, and Escape hands it back to
|
|
51
|
+
* the button. A folded header draws a button that has an outcome mark as the mark alone. The owner renders the control
|
|
52
|
+
* only while it has the change request's entry, which a hidden tab does not, so the panel and the menus of its blocks
|
|
53
|
+
* leave with a tab that hides.
|
|
54
|
+
* @param props - the change request, its snapshot, the number locale, the pointer, the actions, and copy.
|
|
55
|
+
* @returns the button with its panel.
|
|
56
|
+
*/
|
|
57
|
+
export function ChangeStatus({ entry, snapshot, locale, coarsePointer, actions, t }: ChangeStatusProps): ReactNode {
|
|
58
|
+
const [open, setOpen] = useState(false)
|
|
59
|
+
const button = useRef<HTMLButtonElement>(null)
|
|
60
|
+
const panel = useRef<HTMLDivElement>(null)
|
|
61
|
+
// Set by a press that React routes through this control, which includes the menus its blocks portal elsewhere.
|
|
62
|
+
const pressedInside = useRef(false)
|
|
63
|
+
const id = useId()
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (!open) return
|
|
66
|
+
// The press that opened the panel went through this control before the listener below existed to clear its mark.
|
|
67
|
+
pressedInside.current = false
|
|
68
|
+
panel.current?.focus({ preventScroll: true })
|
|
69
|
+
// React hears a press at its root, before the document does.
|
|
70
|
+
const onPointerDown = (): void => {
|
|
71
|
+
if (pressedInside.current) pressedInside.current = false
|
|
72
|
+
else setOpen(false)
|
|
73
|
+
}
|
|
74
|
+
document.addEventListener('pointerdown', onPointerDown)
|
|
75
|
+
return () => { document.removeEventListener('pointerdown', onPointerDown) }
|
|
76
|
+
}, [open])
|
|
77
|
+
const onKeyDown = (event: KeyboardEvent): void => {
|
|
78
|
+
if (event.key !== 'Escape' || !open) return
|
|
79
|
+
// A menu that a block opened closes itself first.
|
|
80
|
+
if (event.target instanceof Element && event.target.closest('[role="menu"], [data-menu-popup]') !== null) return
|
|
81
|
+
event.stopPropagation()
|
|
82
|
+
setOpen(false)
|
|
83
|
+
button.current?.focus()
|
|
84
|
+
}
|
|
85
|
+
const label = t('change.status')
|
|
86
|
+
return (
|
|
87
|
+
<span className={css.control} onPointerDownCapture={() => { pressedInside.current = true }} onKeyDown={onKeyDown}>
|
|
88
|
+
{/* The tooltip names the button only where the header folded it to its mark. */}
|
|
89
|
+
<Tooltip label={label} side="bottom" portal delayMs={500} disabled={open} onlyWhenClipped>
|
|
90
|
+
<button ref={button} type="button" className={css.toggle} aria-expanded={open} aria-controls={open ? id : undefined}
|
|
91
|
+
data-forge-change-status="" onClick={() => { setOpen(!open) }}>
|
|
92
|
+
<ChecksMark snapshot={snapshot} />
|
|
93
|
+
<span className={css.label}>{label}</span>
|
|
94
|
+
</button>
|
|
95
|
+
</Tooltip>
|
|
96
|
+
{open && (
|
|
97
|
+
<div ref={panel} id={id} className={css.panel} role="group" aria-label={label} tabIndex={-1}
|
|
98
|
+
data-forge-change-status-menu="">
|
|
99
|
+
<StatusBlocks entry={entry} snapshot={snapshot} locale={locale} coarsePointer={coarsePointer} actions={actions} t={t} />
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
</span>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** Changed-file navigation shared by the toolbar menu and wide diff pane, with a disclosure column on every row. */
|
|
2
|
-
import { useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react'
|
|
2
|
+
import { useCallback, useLayoutEffect, useMemo, useRef, useState, type ChangeEvent, type KeyboardEvent, type ReactNode } from 'react'
|
|
3
3
|
import clsx from 'clsx'
|
|
4
4
|
import {
|
|
5
5
|
FileTypeIcon, IconChevronDownOutlineRegular, IconFolderCloseRegular, Input, MarqueeText, Menu, Tooltip, useHoverMarquee,
|
|
6
6
|
} from '@deepseek-ai/dsh-client-ui-primitives/client'
|
|
7
7
|
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots/client'
|
|
8
8
|
import type { ForgeDiffFile } from '../types.ts'
|
|
9
|
-
import { Counts } from './DiffFile.tsx'
|
|
9
|
+
import { Counts, countsColumn } from './DiffFile.tsx'
|
|
10
10
|
import { changedFileTree, filesInTreeOrder, filterFileTree, viewedNodes, type ChangedFileNode } from './file-tree.ts'
|
|
11
11
|
import type { NS } from './locales.ts'
|
|
12
12
|
import css from './ChangedFiles.module.css'
|
|
@@ -124,6 +124,8 @@ export function ChangedFiles(props: ChangedFilesProps): ReactNode {
|
|
|
124
124
|
const nodes = useMemo(() => filterFileTree(tree, props.state.query), [tree, props.state.query])
|
|
125
125
|
const order = useMemo(() => filesInTreeOrder(tree), [tree])
|
|
126
126
|
const done = useMemo(() => viewedNodes(tree, props.viewed ?? NONE_VIEWED), [tree, props.viewed])
|
|
127
|
+
// Sized by every file, not by the filtered rows, so the counts stay where they are while the reader types a filter.
|
|
128
|
+
const column = useMemo(() => countsColumn(props.files), [props.files])
|
|
127
129
|
const selectedIndex = order.findIndex(file => file.path === props.state.selected)
|
|
128
130
|
const rows = useRef<HTMLDivElement>(null)
|
|
129
131
|
const query = useRef(props.state.query)
|
|
@@ -148,11 +150,16 @@ export function ChangedFiles(props: ChangedFilesProps): ReactNode {
|
|
|
148
150
|
if (container == null || row == null) return
|
|
149
151
|
revealRow(container, row, align)
|
|
150
152
|
}, [props.state.selected, selectedIndex])
|
|
153
|
+
const { filter } = props
|
|
154
|
+
const changeQuery = useCallback((event: ChangeEvent<HTMLInputElement>): void => { filter(event.target.value) }, [filter])
|
|
155
|
+
const holdArrows = useCallback((event: KeyboardEvent<HTMLInputElement>): void => {
|
|
156
|
+
if (['Home', 'End', 'ArrowLeft', 'ArrowRight'].includes(event.key)) event.stopPropagation()
|
|
157
|
+
}, [])
|
|
151
158
|
return <div className={css.root} data-forge-file-tree="">
|
|
152
159
|
<div className={css.search}><Input className={clsx(css.searchInput)} aria-label={props.t('diff.filterFiles')} placeholder={props.t('diff.filterFiles')}
|
|
153
|
-
value={props.state.query} onChange={
|
|
154
|
-
onKeyDown={
|
|
155
|
-
<div ref={rows} className={css.rows}>
|
|
160
|
+
value={props.state.query} onChange={changeQuery}
|
|
161
|
+
onKeyDown={holdArrows} /></div>
|
|
162
|
+
<div ref={rows} className={css.rows} style={column}>
|
|
156
163
|
{nodes.length === 0 ? <div className={css.empty}>{props.t('diff.noMatchingFiles')}</div> : <Rows nodes={nodes} depth={0} done={done} props={props} />}
|
|
157
164
|
</div>
|
|
158
165
|
</div>
|
|
@@ -168,13 +175,19 @@ export function ChangedFilesMenu({ visible, loading = false, ...props }: Changed
|
|
|
168
175
|
readonly visible: boolean
|
|
169
176
|
readonly loading?: boolean
|
|
170
177
|
}): ReactNode {
|
|
178
|
+
const { jump } = props
|
|
171
179
|
const [open, setOpen] = useState(false)
|
|
172
|
-
|
|
180
|
+
const close = useCallback((): void => { setOpen(false) }, [])
|
|
181
|
+
const jumpTo = useCallback((path: string): void => {
|
|
182
|
+
setOpen(false)
|
|
183
|
+
jump(path)
|
|
184
|
+
}, [jump])
|
|
185
|
+
return <Menu open={visible && open} portal dense align="start" className={css.anchor} listClassName={css.menu} onClose={close}
|
|
173
186
|
anchor={<button type="button" className={css.trigger} aria-haspopup="menu" aria-expanded={visible && open} disabled={props.files.length === 0}
|
|
174
187
|
onClick={() => { setOpen(value => !value) }}>
|
|
175
188
|
<span className={css.triggerLabel}>{loading ? props.t('diff.allFilesLoading') : props.t('diff.allFiles', { count: props.files.length })}</span>
|
|
176
189
|
<IconChevronDownOutlineRegular size={12} className={css.triggerChevron} />
|
|
177
190
|
</button>}>
|
|
178
|
-
<ChangedFiles {...props} menu jump={
|
|
191
|
+
<ChangedFiles {...props} menu jump={jumpTo} />
|
|
179
192
|
</Menu>
|
|
180
193
|
}
|
|
@@ -16,12 +16,17 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
/* One line at every width. A name in it shortens at its end, down to a floor; then `observeHeaderFold` sets
|
|
20
|
+
`data-header-fold` to the shallowest level that fits: level 1 draws a labelled button as its icon, level 2 hides the arrow
|
|
21
|
+
between the branches, and level 3 hides the commit picker while it shows every commit. */
|
|
19
22
|
.header {
|
|
20
23
|
display: flex;
|
|
21
24
|
flex: none;
|
|
22
25
|
align-items: center;
|
|
23
26
|
gap: 8px;
|
|
24
27
|
box-sizing: border-box;
|
|
28
|
+
/* Positions the status panel of a change request's view. */
|
|
29
|
+
position: relative;
|
|
25
30
|
min-height: 44px;
|
|
26
31
|
padding: 0 8px 0 14px;
|
|
27
32
|
border-bottom: 0.5px solid var(--dsw-alias-border-l3);
|
|
@@ -33,6 +38,15 @@
|
|
|
33
38
|
color: var(--dsw-alias-label-secondary);
|
|
34
39
|
}
|
|
35
40
|
|
|
41
|
+
/* A change request's title with its number: it takes the space the other parts leave, and the title shortens. */
|
|
42
|
+
.headerName {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex: 0 1 auto;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: 8px;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
.headerTitle {
|
|
37
51
|
min-width: 0;
|
|
38
52
|
overflow: hidden;
|
|
@@ -49,7 +63,9 @@
|
|
|
49
63
|
font-family: var(--ds-font-family-code);
|
|
50
64
|
}
|
|
51
65
|
|
|
66
|
+
/* What a scope compares takes only the space the branch name beside it leaves. */
|
|
52
67
|
.headerNote {
|
|
68
|
+
flex: 1 1 0;
|
|
53
69
|
min-width: 0;
|
|
54
70
|
overflow: hidden;
|
|
55
71
|
color: var(--dsw-alias-label-secondary);
|
|
@@ -62,34 +78,49 @@
|
|
|
62
78
|
color: var(--dsw-alias-label-tertiary);
|
|
63
79
|
}
|
|
64
80
|
|
|
65
|
-
.
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@container forge-changes (max-width: 520px) {
|
|
70
|
-
.headerSuffix {
|
|
71
|
-
display: none;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@container forge-changes (max-width: 380px) {
|
|
76
|
-
.headerArrow {
|
|
77
|
-
display: none;
|
|
78
|
-
}
|
|
81
|
+
.header:is([data-header-fold='2'], [data-header-fold='3']) .headerArrow {
|
|
82
|
+
display: none;
|
|
79
83
|
}
|
|
80
84
|
|
|
85
|
+
/* The controls keep their width: the names before them give way, and each fold level takes a control's text away
|
|
86
|
+
whole instead of cutting it. */
|
|
81
87
|
.headerEnd {
|
|
82
88
|
display: inline-flex;
|
|
83
|
-
flex:
|
|
89
|
+
flex: none;
|
|
84
90
|
align-items: center;
|
|
85
91
|
gap: 4px;
|
|
86
|
-
min-width: 0;
|
|
87
92
|
margin-left: auto;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
flex
|
|
95
|
+
.commitSlot {
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
flex: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.header[data-header-fold='3'] .foldCommits {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* A button that folds to its icon. The label keeps its place in the accessibility tree at no width, which also tells
|
|
105
|
+
the button's tooltip that the text is cut off. */
|
|
106
|
+
.compactIcon {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.header:is([data-header-fold='1'], [data-header-fold='2'], [data-header-fold='3']) .compactable {
|
|
111
|
+
justify-content: center;
|
|
112
|
+
gap: 0;
|
|
113
|
+
width: 28px;
|
|
114
|
+
padding: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.header:is([data-header-fold='1'], [data-header-fold='2'], [data-header-fold='3']) .compactIcon {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.header:is([data-header-fold='1'], [data-header-fold='2'], [data-header-fold='3']) .compactText {
|
|
122
|
+
width: 0;
|
|
123
|
+
overflow: hidden;
|
|
93
124
|
}
|
|
94
125
|
|
|
95
126
|
/* A long path wraps inside the confirmation instead of widening it. */
|
|
@@ -214,6 +245,12 @@
|
|
|
214
245
|
font-family: var(--ds-font-family-code);
|
|
215
246
|
}
|
|
216
247
|
|
|
248
|
+
/* A list sets the width to its widest deleted count, so every row ends its added count on one edge too. */
|
|
249
|
+
.counts > .deleted {
|
|
250
|
+
min-width: var(--forge-deleted-width, 0);
|
|
251
|
+
text-align: end;
|
|
252
|
+
}
|
|
253
|
+
|
|
217
254
|
.totals {
|
|
218
255
|
padding: 0 4px;
|
|
219
256
|
}
|
|
@@ -649,8 +686,9 @@
|
|
|
649
686
|
}
|
|
650
687
|
}
|
|
651
688
|
|
|
689
|
+
/* Keeps its words while the path before it shortens; only a badge longer than half the title is cut. */
|
|
652
690
|
.badge {
|
|
653
|
-
flex:
|
|
691
|
+
flex: none;
|
|
654
692
|
min-width: 0;
|
|
655
693
|
max-width: 50%;
|
|
656
694
|
overflow: hidden;
|
|
@@ -664,6 +702,37 @@
|
|
|
664
702
|
white-space: nowrap;
|
|
665
703
|
}
|
|
666
704
|
|
|
705
|
+
.badgeLetter {
|
|
706
|
+
display: none;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/*
|
|
710
|
+
* Where the viewed mark loses its label, the badge draws one letter and leaves its room to the file name. Its words
|
|
711
|
+
* stay in the document for assistive technology, cut to a point; being cut is also what makes the tooltip, which
|
|
712
|
+
* shows only for cut text, repeat them.
|
|
713
|
+
*/
|
|
714
|
+
@container forge-changes (max-width: 520px) {
|
|
715
|
+
.badge {
|
|
716
|
+
position: relative;
|
|
717
|
+
max-width: none;
|
|
718
|
+
padding: 0 5px;
|
|
719
|
+
font-family: var(--ds-font-family-code);
|
|
720
|
+
cursor: default;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.badgeText {
|
|
724
|
+
position: absolute;
|
|
725
|
+
width: 1px;
|
|
726
|
+
height: 1px;
|
|
727
|
+
overflow: hidden;
|
|
728
|
+
clip-path: inset(50%);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.badgeLetter {
|
|
732
|
+
display: inline;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
667
736
|
/* Lines of one file: one column of grid rows, or two cells per row side by side. */
|
|
668
737
|
.code {
|
|
669
738
|
overflow-x: auto;
|