8000 feat: 新增 BarList、SegmentedBar、StatusList、Steps 通用数据对比与步骤原语 by qqqqqf-q · Pull Request #49 · felinics/ui · GitHub
[go: up one dir, main page]

Skip to content

feat: 新增 BarList、SegmentedBar、StatusList、Steps 通用数据对比与步骤原语 - #49

Merged
qqqqqf-q merged 4 commits into
mainfrom
feat/memoh-345-data-comparison-primitives
Dec 3, 2026
Merged

qqqqqf-q merged 4 commits into
mainfrom
feat/memoh-345-data-comparison-primitives

Conversation

@qqqqqf-q
@qqqqqf-q qqqqqf-q commented Dec 1, 2026 •
Copy link
Copy Markdown
Member

关联 Issue

改动内容

  1. 新增 4 个通用数据对比与流程原语组件(src/components/):
    • BarList:单序列排行与多序列分组横向比例对比条(顶部圆点图例、无全宽灰底轨道、全组件共享统一的右侧等宽数值列宽度以保证比例尺严格一致、自动统一小数位)。
    • SegmentedBar:部分占整体的多段构成占比条(分段色条与下方圆点明细行共享悬停弱化联动,悬停过渡与 [data-dimmed] 样式统一收敛至 src/style.css @layer components、自动百分比计算与零分母保护)。
    • StatusList:带语义状态图标(ok / warn / error / info / neutral)与无障碍状态读音(sr-only)的紧凑检查与键值对齐行,支持 divided 细线分隔与右侧辅助说明 meta。
    • Steps:纵向编号与状态步骤流(done / current / warn / upcoming)。
  2. Showcase 独立演示页、基础色板工具与原语字典更新:
    • showcase/specs/:补齐 bar-list.ts、segmented-bar.ts、status-list.ts、steps.ts 四个独立演示规范页并注册至 showcase/specs/index.ts。
    • src/lib/data-tone.ts:统一映射 src/style.css 强调色 Token(--accent-*、--border-hairline)与数值单位格式化,零手写裸颜色或任意圆角;未修改任何存量组件视觉行为。
    • 更新 src/index.ts(经 gen-entry.ts 生成)及 skills/ui-owners/SKILL.md 原语选型字典。

验证结果

  • 自动检查:pnpm type-check(vue-tsc --build)与宿主仓库 node scripts/check-ui-contract.mjs 均零报错通过。

增量组件 ui-diff(main @ fb2fd8e → PR #49 @ 9ea7d46)

5 条路由 × 明暗双主题共 20 次确定性抓拍,含像素级 BEFORE | AFTER | DIFF、悬停动效录制、src/style.css 785 项设计 Token 审计与 axe 无障碍差异对比:

  • Overview 组件总墙(/#/overview):在 Card 与 Tabs 之间新增 BarList、SegmentedBar、StatusList、Steps 四张实时预览卡片及侧栏入口(像素变化占比 Light 1.17% / Dark 1.24%);顺延下移的存量组件卡片内部像素零变化。
  • 设计 Token 审计:4 个新组件内部零未命中颜色、圆角、字号或边框变量(脚本检出的 9 项新间距均为 Showcase 外框 CanvasStage 的弹性居中计算值)。
  • 无障碍与对比度说明:StatusList 已补齐非中性状态 sr-only 读音;浅色画布下右侧 ok(--accent-green,约 4.40:1)与 info(--accent-blue,约 3.96:1)与左侧状态图标同色,略低于 WCAG AA 小字号正文 4.5:1(若需更高对比度可切换为 --accent-*-deep)。

1. Overview 总墙聚焦对比(Light & Dark)

Overview 总墙聚焦 BEFORE | AFTER | DIFF (Light)

Overview 总墙聚焦 BEFORE | AFTER | DIFF (Dark)

2. 4 个增量组件路由三联像素对比与悬停动效

BarList BEFORE | AFTER | DIFF (Light)

SegmentedBar BEFORE | AFTER | DIFF (Light)

SegmentedBar 悬停弱化联动动效

StatusList BEFORE | AFTER | DIFF (Light)

Steps BEFORE | AFTER | DIFF (Light)

展开暗色主题(Dark)4 个增量组件三联像素对比

BarList BEFORE | AFTER | DIFF (Dark)

SegmentedBar BEFORE | AFTER | DIFF (Dark)

StatusList BEFORE | AFTER | DIFF (Dark)

Steps BEFORE | AFTER | DIFF (Dark)

单组件明暗分屏与宿主集成实检(Agent 浏览器自检,非人工 QA)

展开 Showcase 明暗分屏单图与宿主实时联动截图

BarList 独立 Showcase 明暗对比

SegmentedBar 独立 Showcase 明暗对比

StatusList 独立 Showcase 明暗对比

Steps 独立 Showcase 明暗对比

SegmentedBar 与 StatusList 实时联动

BarList 双序列横向对比

⚠️ No human QA — this PR has not been verified by a human yet. Remove this line once a human confirms the happy path.

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Dec 1, 2026 •
Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T07:12:54.401547Z 9e550e3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e550e34f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +96 to +97
class="h-full min-w-1 transition-opacity duration-150"
:class="activeHover !== null && activeHover !== item.idx ? 'opacity-40' : ''"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move hover appearance into the shared component style layer

The segment and detail-row hover states implement opacity and transition styling directly in the Vue template. This violates the ownership rule in AGENTS.md, which reserves hover appearance for src/style.css under @layer components, mounted through data attributes. Keeping these as utility classes also places them above that shared layer, preventing centralized interaction rules from overriding them normally. Expose the dimmed state through a data attribute and move both selectors and their transitions into the shared stylesheet.

AGENTS.md reference: AGENTS.md:L28-L32

Useful? React with 👍 / 👎.

Comment thread src/components/bar-list/BarList.vue Outdated
:class="cn('w-full space-y-3', props.class)"
>
<div v-if="title || subtitle" class="space-y-0.5">
<h4 v-if="title" class="text-control font-medium leading-snug text-foreground">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Apply the required section-title font weight

When title is supplied, this section heading uses font-medium, although AGENTS.md explicitly requires section and surface titles to use font-semibold. The same heading pattern is introduced in SegmentedBar, StatusList, and Steps, so all four primitives depart from the documented role-based typography contract. Use font-semibold for these component headings while retaining medium weight for labels and emphasized values.

AGENTS.md reference: AGENTS.md:L161-L161

Useful? React with 👍 / 👎.

Comment thread src/components/bar-list/BarList.vue Outdated
Comment on lines +164 to +166
class="flex items-center justify-between gap-4"
>
<div class="flex min-w-0 flex-1 items-center">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Give every bar the same available plotting width

When readouts have different lengths, each independent flex row reserves a different width for its value, so the percentage bar widths are calculated against different-sized plotting areas. Consequently, a value of 99 can render a longer bar than 100 because its two-digit readout leaves more room; custom valueLabel strings can amplify the distortion. tabular-nums only equalizes individual digit widths, not the readout columns. Reserve a shared readout-column width across all rows so the common resolvedMax actually produces a common visual scale.

Useful? React with 👍 / 👎.

Comment on lines +81 to +84
<component
:is="row.visual.icon"
v-if="row.visual.icon"
aria-hidden="true"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose the status independently of its hidden icon

For items whose status is not repeated in label or value—for example, { label: 'Database', status: 'error' }—the icon is the only non-color indication of the result, but it is explicitly hidden from assistive technology. The row's data-status does not provide accessible semantics, so screen-reader users hear only “Database” and the placeholder rather than the failure. Add an accessible status label or visually hidden status text so ok, warn, and error remain distinguishable without seeing the icon.

Useful? React with 👍 / 👎.

@qqqqqf-q
qqqqqf-q merged commit a0d59d2 into main Dec 3, 2026
1 check passed
@qqqqqf-q
qqqqqf-q deleted the feat/memoh-345-data-comparison-primitives branch December 3, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0