diff --git a/src/client/clues/sources/feishu/docs-preview.tsx b/src/client/clues/sources/feishu/docs-preview.tsx index 838d54ca..6c1932f7 100644 --- a/src/client/clues/sources/feishu/docs-preview.tsx +++ b/src/client/clues/sources/feishu/docs-preview.tsx @@ -28,7 +28,7 @@ import { import { TextDocumentContent } from '../../../windows/format-content.tsx' import { MdToc } from '../../../md-toc.tsx' import { t } from '../../../locales.ts' -import { ActionButton, ActionFooter, Field, TextArea, TextInput } from '../../../ui/index.ts' +import { ActionButton, ActionFooter, Disclosure, Field, TextArea, TextInput } from '../../../ui/index.ts' import css from './feishu.module.css' import type { FeishuClientLabels } from './labels.ts' import { appDateTime } from './time.ts' @@ -311,12 +311,11 @@ function ReadPreview(props: { )} {content !== '' && ( -
- {t('clueResourceDetails')} +
             {content}
           
-
+ )} {collapsible && (

diff --git a/src/client/clues/sources/feishu/feishu.module.css b/src/client/clues/sources/feishu/feishu.module.css index 680ff49d..005c35a6 100644 --- a/src/client/clues/sources/feishu/feishu.module.css +++ b/src/client/clues/sources/feishu/feishu.module.css @@ -12,8 +12,7 @@ min-width: 0; padding: var(--ds-sidebar-gutter); color: var(--dsw-alias-label-primary); - background: var(--dsw-alias-bg-layer-1); - + background: transparent; } .meta { @@ -196,21 +195,11 @@ } .rawDetails { - margin-top: 2px; + margin-top: 4px; color: var(--dsw-alias-label-tertiary); font-size: 11px; } -.rawDetails > summary { - min-height: var(--ds-sidebar-control-height); - padding: 2px 0; - cursor: pointer; -} - -.rawDetails[open] > summary { - margin-bottom: 4px; -} - /* Embedded task body: the shared header already carries title/people/times. */ .bodyRow { display: flex; @@ -225,7 +214,7 @@ /* Keep the source heading hierarchy visible as well as semantic for MdToc. */ .docHeading { margin-block-start: 8px; } -h1.docHeading { font-size: 20px; } -h2.docHeading { font-size: 18px; } -h3.docHeading { font-size: 16px; } +h1.docHeading { font-size: 16px; line-height: 24px; } +h2.docHeading { font-size: 15px; line-height: 22px; } +h3.docHeading { font-size: 14px; line-height: 20px; } h5.docHeading, h6.docHeading, .docHeading[aria-level] { font-size: 13px; } diff --git a/src/client/clues/windows/collect.module.css b/src/client/clues/windows/collect.module.css index 974949fb..e5168aff 100644 --- a/src/client/clues/windows/collect.module.css +++ b/src/client/clues/windows/collect.module.css @@ -13,16 +13,15 @@ color: var(--dsw-alias-label-primary); } .selection { flex: none; min-width: 0; } -.selection > summary { cursor: pointer; min-height: var(--ds-sidebar-control-height); align-content: center; } -.selection > summary:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; } .selectionTitle { margin-inline-start: 8px; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; } -.selectionList { max-height: 96px; overflow: auto; margin: 4px 0 0; padding-inline-start: 20px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; } +.selectionList { max-height: 88px; overflow: auto; margin: 2px 0 0; padding-inline-start: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; } .count { flex: none; margin: 0; color: var(--dsw-alias-label-tertiary); font-size: 12px; line-height: 18px; + font-variant-numeric: tabular-nums; } .form { display: flex; @@ -36,38 +35,25 @@ display: flex; flex: 1; flex-direction: column; - gap: var(--ds-sidebar-space-3); + gap: var(--ds-sidebar-space-2); min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; } -.searchBox { - display: flex; - align-items: center; - flex: 1; - gap: var(--ds-sidebar-space-2); - min-width: 0; - color: var(--dsw-alias-label-tertiary); -} -.searchBox > svg { - flex: none; -} .searchInput { - flex: 1; + flex: none; width: 100%; min-width: 0; } - - .destinationList { display: flex; - flex: 1 1 112px; + flex: 1 1 96px; flex-direction: column; - gap: var(--ds-sidebar-space-1); + gap: 0; min-width: 0; - min-height: 36px; + min-height: 32px; margin: 0; padding: 0; border: 0; @@ -79,12 +65,13 @@ opacity: 0.4; } .destinationRow { + position: relative; display: flex; align-items: center; flex: none; gap: var(--ds-sidebar-space-2); min-width: 0; - min-height: 36px; + min-height: 32px; padding: 4px 8px; box-sizing: border-box; border-radius: var(--ds-sidebar-radius); @@ -97,20 +84,27 @@ .destinationRow:has(input:checked) { background: var(--dsw-alias-interactive-bg-active); } -.destinationRow input { - flex: none; - accent-color: var(--dsw-alias-state-business-primary, var(--dsw-alias-label-secondary)); +.destinationInput { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + margin: 0; + opacity: 0; + cursor: inherit; } .destinationRow:has(input:focus-visible) { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; } -.destinationRow > span:not([data-clue-artwork]) { +.destinationName { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; - flex: 1; + flex: 1 1 auto; min-width: 0; + font-size: 13px; + line-height: 18px; overflow: hidden; overflow-wrap: anywhere; } @@ -120,7 +114,19 @@ font-size: 11px; font-variant-numeric: tabular-nums; } +.destinationCheck { + display: inline-flex; + align-items: center; + flex: none; + width: 14px; + color: var(--dsw-alias-state-business-primary, var(--dsw-alias-label-primary)); + visibility: hidden; +} +.destinationRow:has(input:checked) .destinationCheck { + visibility: visible; +} .hint { + padding: 4px 8px; color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; diff --git a/src/client/clues/windows/collect.tsx b/src/client/clues/windows/collect.tsx index 57fb0617..f0cbc1c7 100644 --- a/src/client/clues/windows/collect.tsx +++ b/src/client/clues/windows/collect.tsx @@ -31,8 +31,8 @@ import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react' import type { ReactNode } from 'react' import { + IconCheckOutlineRegular, IconPlusOutlineRegular, - IconSearchOutlineRegular, } from '@deepseek-ai/dsh-client-ui-primitives' import type { ClueCandidate, CluePack, CluesPacksResult } from '../../../clues/types.ts' import type { BetterSidebarCluesClientFace } from '../registry.ts' @@ -43,7 +43,7 @@ import { cluesApi, peekClueRequest } from '../api.ts' import { clueErrorMessage } from '../copy.ts' import { CluePackArtwork } from '../artwork.tsx' import { LoadingIndicator } from '../../ui/LoadingIndicator.tsx' -import { ActionButton, ActionFooter, ErrorBlock, Field, TextInput } from '../../ui/index.ts' +import { ActionButton, ActionFooter, Disclosure, ErrorBlock, Field, SearchField, TextInput } from '../../ui/index.ts' import { t } from '../../locales.ts' import css from './collect.module.css' @@ -156,7 +156,7 @@ export function openClueCollectionWindow( const guard: ClueCollectGuard = { busy: false } const handle = options.windows.open({ id: collectWindowId(options.workspaceId, options.targets), - surface: 'sidebar', + surface: 'floating', title: t('clueBrowserAddToPack'), size: 'compact', bodyLayout: 'fill', @@ -389,15 +389,20 @@ export function ClueCollectPage( return (

-
- - {t('clueBrowserSelected', { n: pending.length })} - {pending.length === 1 && {pending[0]!.title}} - + + {t('clueBrowserSelected', { n: pending.length })} + {pending.length === 1 && {pending[0]!.title}} + + )} + >
    {pending.map(target =>
  • {target.title}
  • )}
-
+
{ event.preventDefault(); void submit() }} >
- + { setQuery(event.target.value) }} + />
{packsPhase === 'loading' && } {packsPhase === 'error' && ( @@ -431,6 +433,7 @@ export function ClueCollectPage( {matchingPacks.map(pack => ( ))} {packsPhase === 'ready' && matchingPacks.length === 0 && ( @@ -449,6 +455,7 @@ export function ClueCollectPage( )}
{destination === '__new' && ( @@ -476,8 +486,8 @@ export function ClueCollectPage( bleed start={{destinationName ?? t('clueSharePacks')}} end={<> - {t('cancel')} - + {t('cancel')} + {submitLabel} } diff --git a/src/client/clues/windows/comments.module.css b/src/client/clues/windows/comments.module.css index 16ea2dc0..d4baf0e9 100644 --- a/src/client/clues/windows/comments.module.css +++ b/src/client/clues/windows/comments.module.css @@ -1,14 +1,16 @@ -.discussion { flex: none; min-width: 0; padding: var(--ds-sidebar-gutter); border-top: 1px solid var(--dsw-alias-border-l1); color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1); font-size: 13px; line-height: 1.6; } -.heading { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 12px; } -.heading h2 { margin: 0; font-size: 14px; font-weight: 600; } -.hint, .meta { color: var(--dsw-alias-label-tertiary); font-size: 11px; overflow-wrap: anywhere; } -.comment { padding: 12px 0; border-top: 1px solid var(--dsw-alias-border-l1); } -.comment[data-clue-reply-to] { margin-inline-start: 16px; padding-inline-start: 12px; border-inline-start: 1px solid var(--dsw-alias-border-l1); } -.meta, .actions, .replyContext { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } -.meta strong { color: var(--dsw-alias-label-secondary); } -.meta a { color: inherit; } -.state { border: 1px solid var(--dsw-alias-border-l1); border-radius: var(--ds-sidebar-radius); padding: 0 6px; color: var(--dsw-alias-label-secondary); } -.body { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; } -.composer { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; } -.composer textarea { width: 100%; min-height: 72px; } +.discussion { flex: none; min-width: 0; padding: var(--ds-sidebar-gutter); border-top: 1px solid var(--dsw-alias-border-l1); color: var(--dsw-alias-label-primary); background: transparent; font-size: 13px; line-height: 1.55; } +.heading { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 8px; } +.heading h2 { margin: 0; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; } +.hint, .meta { color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; } +.comment { padding: 10px 0; border-top: 1px solid var(--dsw-alias-border-l1); } +.comment[data-clue-reply-to] { margin-inline-start: 12px; padding-inline-start: 10px; border-inline-start: 1px solid var(--dsw-alias-border-l2); } +.meta, .actions, .replyContext { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } +.meta strong { color: var(--dsw-alias-label-primary); font-weight: 500; } +.meta a { color: var(--dsw-alias-label-tertiary); text-decoration: none; } +.meta a:hover { color: var(--dsw-alias-label-primary); text-decoration: underline; } +.state { border: 1px solid var(--dsw-alias-border-l1); border-radius: var(--ds-sidebar-radius); padding: 0 5px; color: var(--dsw-alias-label-tertiary); font-size: 11px; } +.body { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; } +.composer { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--dsw-alias-border-l1); } +.composerLabel { font-size: 12px; font-weight: 500; color: var(--dsw-alias-label-secondary); } +.composer textarea { width: 100%; min-height: 68px; } .composer .actions { justify-content: flex-end; } diff --git a/src/client/clues/windows/comments.tsx b/src/client/clues/windows/comments.tsx index 42c351c8..fc826dd3 100644 --- a/src/client/clues/windows/comments.tsx +++ b/src/client/clues/windows/comments.tsx @@ -119,8 +119,8 @@ export function ResourceDiscussion(props: ResourceDiscussionProps): ReactNode { {comment.replyToId !== undefined &&
{copy('clueCommentReplyTo')} {personLabel(authors.get(comment.replyToId)) ?? comment.replyToId}
} {props.selectionTarget === undefined ? body : {body}}
- {canReply && { setReply(comment); document.getElementById(inputId)?.focus() }} data-clue-comment-reply={comment.id}>{copy('clueCommentReply')}} - {comment.nextRepliesCursor !== undefined && { props.onLoad(comment.nextRepliesCursor, comment.id) }}>{copy('clueCommentMoreReplies')}} + {canReply && { setReply(comment); document.getElementById(inputId)?.focus() }} data-clue-comment-reply={comment.id}>{copy('clueCommentReply')}} + {comment.nextRepliesCursor !== undefined && { props.onLoad(comment.nextRepliesCursor, comment.id) }}>{copy('clueCommentMoreReplies')}}
})} @@ -134,13 +134,13 @@ export function ResourceDiscussion(props: ResourceDiscussionProps): ReactNode { onRetry={() => { props.onLoad() }} /> )} - {page?.nextCursor !== undefined && { props.onLoad(page.nextCursor) }}>{copy('clueDiscussionMore')}} + {page?.nextCursor !== undefined && { props.onLoad(page.nextCursor) }}>{copy('clueDiscussionMore')}} {canCreate && { event.preventDefault(); void submit() }}> - - {reply !== undefined &&
{copy('clueCommentReplyTo')} {personLabel(reply.author) ?? reply.id}{capabilities?.reply === 'quote' ? ` · ${copy('clueCommentQuoteReply')}` : ''} { setReply(undefined) }}>{t('cancel')}
} + + {reply !== undefined &&
{copy('clueCommentReplyTo')} {personLabel(reply.author) ?? reply.id}{capabilities?.reply === 'quote' ? ` · ${copy('clueCommentQuoteReply')}` : ''} { setReply(undefined) }}>{t('cancel')}
}