Repository navigation
feat: BadgeCount 增加 warning 与 brand 色调 - #41
Open
LittleSound wants to merge 1 commit into
Open
LittleSound wants to merge 1 commit into
LittleSound wants to merge 1 commit into
Conversation
A count now carries what it means, loudest first: destructive for a failure, warning for something waiting on the user, brand for new items that should be spotted without reading as an alert. Docs and skills note that a count over mixed items takes its most urgent item's tone.
2 of 6 tasks
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.
Summary
给
BadgeCount现有的variant增加两个可选色调,让计数能表达“有多急”,而不是只能在“红色警报”和“中性”之间二选一:destructive(已有)warning(新增)--warning底 +--warning-solid-foreground深色数字brand(新增)--brand底 +--brand-foregrounddefault(已有)default/destructive,现有调用方的渲染不变。brand跟着配色方案走。DESIGN.md、skills/web/SKILL.md、skills/web/reference.md都补上同一条规则:一个计数汇总了多条不同的东西时,取其中最急的颜色(红 > 黄 > 主题色),并说明红色要省着用。起因:Memoh 的会话未读功能(MEMOH-146)原来把每一条未读回复都标成红色,满屏红点,真正运行失败时反而不显眼。现在按轻重分级:失败用红,等待用户确认用黄,普通回复用主题色。
影响面
只增加 variant,现有组件和调用方都不受影响。配套的 Memoh PR felinics/Memoh#1645 会在「需要你」卡片的计数和 bot 切换器的计数里用上这两个色调,组件墙也加了示例。
Related
packages/ui指针指向本分支的提交f24af2b;本 PR 合并后,需要把指针改到合并后的提交。felinics/ui的写权限,本 PR 从 forkLittleSound/ui提交。合并顺序
packages/ui指针改到本 PR 合并后在 main 上的提交,推送后等 CI 通过。CI 说明:本 PR 的
check失败在 type-check,报的是callout-banner、FieldError、FormMessage、FieldStack这 4 个文件缺少@memohai/icon/ui的ErrorIcon导出。本 PR 没有改动这些文件,main 从4b4d5ed起最近 3 次 CI 都是同样的失败。需要先修好 main,本 PR 的 CI 才能变绿。Validation
vue-tsc --build通过。scripts/check-ui-contract.mjs通过;web typecheck 通过;sidebar 相关的 83 条 vitest 全部通过。brand,有等待确认的是warning,有失败的是destructive。Screenshots
截图是在 Memoh PR #1645 上通过
gh --attach上传的(fork 提交的 PR 在本仓库没有附件权限),这里直接引用。