Repository navigation
Conversation
完成态 GenUI 右下角的导出入口原本是回答区里唯一的文字加描边控件,与宿主自己的 无边框图标按钮(复制、点赞、分享等)不一致;一条回答里有多个围栏时还会重复出现 多个同样的文字按钮。现改为 14px 描边图标(托盘 + 下箭头)表达“导出为文件”, 可访问名与悬停提示仍是「导出」/「Export」。 形状与反馈复用项目既有规则,没有新造样式: - 形状照 chrome 图标按钮 .panelClose:26px 命中区、6px 圆角、透明底、无边框 - 悬浮与键盘聚焦用区块内那条配方(--dsl-g-hover 的 4% 文字色淡洗 + 文字色升到 label-primary),不再依赖只对深色主题成立的 rgba(255,255,255,…) - 聚焦轮廓与 .panelClose 一致 菜单里的「HTML」与「GenUI JSON」两项文案与行为不变。菜单项原本直接吃 --dsw-alias-fill-hover,宿主或第三方主题没有定义该 token 时悬浮没有任何反馈, 现在回退到同一条 4% 文字色淡洗。 tests/genui-export-ui.spec.tsx 增加图标契约用例:入口含 svg、没有文字节点、 aria-label 与 title 仍为「导出」;单围栏、工具卡、面板与模板预览的既有用例不变。 Closes omdsh-dev#274
Collaborator
|
需要解决一下冲突 <3 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#274:完成态 GenUI 区块右下角的导出入口是回答区里唯一的文字加描边控件,与宿主自己的无边框图标按钮(复制、点赞、分享、用量…)不一致;一条回答里有多个围栏时,还会重复出现多个文字按钮。
改动
aria-label+title的组合与项目里panelTpl/panelToggle一致,旧实现靠按钮文字提供可访问名)。.panelClose:26px 命中区、6px 圆角、透明底、无边框;--dsl-g-hover的写法:主题文字色 4% 淡洗 + 文字色升到label-primary),不再用只对深色主题成立的rgba(255,255,255,…);.panelClose一致(1px 主色 +outline-offset: 1px)。.item:hover原本直接吃--dsw-alias-fill-hover,宿主或第三方主题(如浅色 dream-skin)没有定义该 token 时悬浮没有任何反馈;现在写成var(--dsw-alias-fill-hover, <同款 4% 淡洗>)——有定义时行为与当前完全一致,只在缺失时兜底。你提过这项建议单独跟踪;如果更希望拆成独立 PR,我可以把它从这次改动里去掉。验证
vitest run tests/genui-export-ui.spec.tsx→ 6/6 通过,其中新增一条图标契约用例:入口含svg、没有文字节点、aria-label与title仍为「导出」;单围栏 / 工具卡 / 面板 / 模板预览的既有用例不变。tsc -p tsconfig.json --noEmit通过。vitest run:1009 passed / 17 failed。17 条失败全部是本机 Windows 环境的既有失败,与本次改动无关——tests/install-script.spec.ts11 条需要 POSIXsh;tests/skill-md.spec.ts、tests/genui-skill-examples.spec.ts、tests/plugin-genui.spec.ts共 6 条要求 SKILL.md 为 LF,而本机core.autocrlf=true。改动只碰客户端导出 UI 的 3 个文件 + 1 个测试,不涉及这些路径,Linux CI 上会完整跑pnpm run check。影响
纯客户端渲染层改动(
src/client/artifact/ArtifactExport.module.css、src/client/artifact/ExportableGenuiBlock.tsx):导出产物格式、embed公开 API、宿主兼容性与打包产物均不变。Closes #274