docs(web): state why notification copy is height-bounded
This commit is contained in:
1 parent
4002caa7ea
commit
e9bdd54bc2
6 files changed
+10
-10
No files matched your search
@@ -15,8 +15,8 @@
|
||||
en: af856ba79fe31b8e
|
||||
zh: c9b0188689359236
|
||||
/deepseek-ai-dsh-client-ui-account-notifications/use-this-package:
|
||||
en: 8f7ef06952a4670a
|
||||
zh: 8602c70d9d01f027
|
||||
en: b138ea2fb39d73af
|
||||
zh: 71382a554aeae5ea
|
||||
/deepseek-ai-dsh-client-ui-account-notifications/model-experience:
|
||||
en: 5fed5504300020e6
|
||||
zh: efd8e7c32b699e7e
|
||||
|
||||
@@ -26,7 +26,7 @@ Startup with a stored account, sign-in, and each Settings entry start a new poll
|
||||
|
||||
Account settings owns the sole account stream and exposes its current state and lifecycle events through `accountUi` and `account-ui/change`. Login-progress updates retain cards and polling. Credential replacement, disconnection, access revocation, sign-out, and plugin disposal clear cards, stop polling, and discard late replies. Notification requests do not wait for profile or avatar data. Notification state is not stored in the browser.
|
||||
|
||||
Cards float over the sidebar list, anchored 4px above the account launcher row at the sidebar's full width, below menus and dialogs, without taking focus or space from the list. Status indicators beside the launcher do not narrow them. Title and body text taller than 40% of the viewport scrolls inside the card, so the account row stays visible. Their width follows the expanded sidebar up to 280px, leaving 10px on the left and at least 10px on the right. Collapsing the sidebar hides the cards; expanding it restores them without another display report. Closing a card promotes the next with a 250ms position and scale transition, disabled by reduced-motion preferences.
|
||||
Cards float over the sidebar list, anchored 4px above the account launcher row, below menus and dialogs, without taking focus or space from the list. Status indicators beside the launcher do not narrow them. Title and body text taller than 40% of the viewport scrolls inside the card, so a long notice does not cover the whole sidebar. Their width follows the expanded sidebar up to 280px, leaving 10px on the left and at least 10px on the right. Collapsing the sidebar hides the cards; expanding it restores them without another display report. Closing a card promotes the next with a 250ms position and scale transition, disabled by reduced-motion preferences.
|
||||
|
||||
Notifications wait for Desktop and model-credential onboarding to finish. Only the foreground card is interactive and reports `displayed`, once per mount after a painted frame while it intersects the viewport and the sidebar and document are visible. The Settings overlay does not exclude that frame. A displayed foreground card remains until close or expiry even when a later list omits it; waiting cards follow server order.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Web 组合将本插件与[账号设置](../ui-settings-account/README.zh.md)一
|
||||
|
||||
账号设置拥有唯一的账号流,通过 `accountUi` 和 `account-ui/change` 提供当前状态及生命周期事件。登录进度更新沿用卡片和轮询。凭据替换、断连、权限撤销、退出登录和插件卸载会清空卡片、停止轮询并丢弃迟到响应。通知请求不等待资料或头像。通知状态不写入浏览器存储。
|
||||
|
||||
卡片浮在侧栏会话列表之上,以侧栏满宽锚定在账号入口行上方 4px,位于菜单和对话框之下,不抢占焦点,也不占用列表空间。入口旁的状态指示器不会挤压卡片。标题和正文高度超过视口 40% 时在卡片内滚动,账号行保持可见。宽度跟随展开的侧栏,最大为 280px,左侧留 10px、右侧至少留 10px。收起侧栏会隐藏卡片;展开后恢复卡片,不重复上报展示。关闭卡片后,下一张通过 250ms 的位置和缩放过渡补位;偏好减少动态效果时禁用过渡。
|
||||
卡片浮在侧栏列表之上,锚定在账号入口行上方 4px,位于菜单和对话框之下,不抢占焦点,也不占用列表空间。入口旁的状态指示器不会挤压卡片。标题和正文高度超过视口 40% 时在卡片内滚动,避免长通知遮住整个侧栏。宽度跟随展开的侧栏,最大为 280px,左侧留 10px、右侧至少留 10px。收起侧栏会隐藏卡片;展开后恢复卡片,不重复上报展示。关闭卡片后,下一张通过 250ms 的位置和缩放过渡补位;偏好减少动态效果时禁用过渡。
|
||||
|
||||
通知等待 Desktop 和模型凭据引导完成。只有前排卡片可交互并上报 `displayed`:卡片与视口相交、侧栏和文档可见并完成一帧绘制后,同一次挂载只上报一次。设置蒙层不排除该帧。已展示的前排卡片保留至关闭或过期,即使后续列表不再返回它;待展示卡片遵循服务端顺序。
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
.card { position: relative; box-sizing: border-box; width: 100%; padding: 20px; border: 0; border-radius: 16px; background: var(--dsw-specific-input-major); box-shadow: var(--dsw-elevation-panel); --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2); --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2); color: var(--dsw-alias-label-secondary); font-size: 14px; line-height: 22px; z-index: calc(0 - var(--notice-depth)); transform: translateY(calc(-4px * var(--notice-depth))) scaleX(var(--notice-scale)); transform-origin: center top; transition: transform 250ms ease-out; }
|
||||
.card[data-front="false"] { position: absolute; inset: 0; height: 100%; overflow: hidden; pointer-events: none; }
|
||||
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
|
||||
/* Long server copy scrolls inside the card so the account row below stays in the viewport;
|
||||
/* Long server copy scrolls inside the card so a tall notice does not cover the whole sidebar;
|
||||
the card rebinds the l2 scrollbar colors for its elevated surface (ui-theme styles/scrollbar.css). */
|
||||
.copy { display: flex; flex-direction: column; gap: 2px; max-height: 40vh; overflow-y: auto; overflow-wrap: anywhere; }
|
||||
.copy p { margin: 0; white-space: pre-wrap; }
|
||||
|
||||
@@ -31,9 +31,9 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
||||
/** Optional sidebar account launcher; opens the shell-owned settings panel. */
|
||||
'settings.launcher': { kind: 'single'; scope: 'root'; owner: SettingsLauncherOwnerProps }
|
||||
/**
|
||||
* Optional content anchored above the launcher row at its full width. The
|
||||
* row takes no height, so the content floats over the sidebar list; the
|
||||
* shell hides it in the rail without unmounting it.
|
||||
* Optional content anchored above the launcher row at the launcher row's
|
||||
* full width. The row takes no height, so the content floats over the
|
||||
* sidebar list; the shell hides it in the rail without unmounting it.
|
||||
*/
|
||||
'settings.notice': { kind: 'single'; scope: 'root'; owner: SettingsNoticeOwnerProps }
|
||||
|
||||
|
||||
@@ -4283,8 +4283,8 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
|
||||
key: 'settings.notice',
|
||||
kind: 'single',
|
||||
scope: 'root',
|
||||
summary: 'Optional content anchored above the launcher row at its full width.',
|
||||
doc: 'Optional content anchored above the launcher row at its full width. The\nrow takes no height, so the content floats over the sidebar list; the\nshell hides it in the rail without unmounting it.',
|
||||
summary: 'Optional content anchored above the launcher row at the launcher row\'s full width.',
|
||||
doc: 'Optional content anchored above the launcher row at the launcher row\'s\nfull width. The row takes no height, so the content floats over the\nsidebar list; the shell hides it in the rail without unmounting it.',
|
||||
registerOptions: [],
|
||||
ownerProps: [
|
||||
'/** Settings navigation for the row above the launcher row. */\nexport interface SettingsNoticeOwnerProps {\n /** @param sectionId - section to open; absent uses the shell\'s default section. */\n openSettings: (sectionId?: string) => void\n}',
|
||||
|
||||
Reference in new issue
Block a user