fix(web): optimize channel tag aggregate card layout (QuantumNous#5640)#5771
fix(web): optimize channel tag aggregate card layout (QuantumNous#5640)#5771zhangzhichaolove wants to merge 3 commits into
Conversation
- let tag aggregate cards use the full left content width so the channel count badge can sit beside long tag names - hide the meaningless ID cell for tag aggregate rows and keep aggregate badges from being clipped in card view - localize tag channel count and aggregate status labels across supported frontend locales
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughTag aggregate channel cards and table rows now use translated count/status labels, hide the aggregate ID cell, and apply tag-row-specific card wrapper sizing. Matching locale keys were added across supported languages. ChangesChannel tag aggregate labels
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/default/src/features/channels/components/channels-columns.tsx (1)
565-568: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePlural selection edge case for zero count.
childrenCount === 1 ? '{{count}} channel' : '{{count}} channels'routescount === 0to the plural form. While correct for English, this is fragile for locales with different zero/plural rules (e.g. French treats 0 as singular). Consider relying on i18next's built-in plural resolution (t('{{count}} channel', { count })with_plural/CLDR plural keys) instead of manual selection. Minor, since a tag row realistically always has ≥1 child.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/default/src/features/channels/components/channels-columns.tsx` around lines 565 - 568, The channel count label in the channels columns rendering uses manual singular/plural चयन with childrenCount === 1, which is fragile for zero and non-English locale rules. Update the label generation in the channel row logic to rely on i18next plural resolution in the existing t call instead of choosing the string manually, so the translation layer handles 0/1/many correctly across locales.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/default/src/features/channels/components/channels-columns.tsx`:
- Around line 818-822: The status label in the channels aggregate row uses
t('Inactive'), but that key is not registered or translated anywhere, so
localized UIs will fall back to English. Update the channels-columns.tsx logic
around statusLabel/aggregateStatusLabel and add the missing "Inactive" entry to
the i18n registration and all relevant locale files, matching how "Active" is
handled so both states localize consistently.
In `@web/default/src/i18n/locales/ru.json`:
- Around line 29-35: The channel-count label in channels-columns.tsx still uses
a hardcoded singular/other split for "{{count}} channel(s)", so Russian plural
rules are not applied correctly. Update the label in the channels-columns
component to use locale-aware plural handling instead of a two-form fallback,
and add the matching Russian plural forms in the ru.json translations for the
channel-count messages so counts like 2, 3, 4, and 22 resolve correctly.
---
Nitpick comments:
In `@web/default/src/features/channels/components/channels-columns.tsx`:
- Around line 565-568: The channel count label in the channels columns rendering
uses manual singular/plural चयन with childrenCount === 1, which is fragile for
zero and non-English locale rules. Update the label generation in the channel
row logic to rely on i18next plural resolution in the existing t call instead of
choosing the string manually, so the translation layer handles 0/1/many
correctly across locales.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f864a741-118d-4563-84cb-714df53506ea
📒 Files selected for processing (9)
web/default/src/features/channels/components/channel-card.tsxweb/default/src/features/channels/components/channels-columns.tsxweb/default/src/i18n/locales/en.jsonweb/default/src/i18n/locales/fr.jsonweb/default/src/i18n/locales/ja.jsonweb/default/src/i18n/locales/ru.jsonweb/default/src/i18n/locales/vi.jsonweb/default/src/i18n/locales/zh.jsonweb/default/src/i18n/static-keys.ts
- use i18next plural resolution for tag aggregate channel counts - add plural forms for channel count labels across supported locales - add missing Inactive translation key for aggregate status badges Refs QuantumNous#5640
…dex/fix-5640-channel-tag-badge
Important
📝 变更描述 / Description
优化渠道列表中“标签聚合”行的展示布局。标签聚合卡片现在会让标签名称区域占满左侧可用宽度,避免长标签名把“1 个渠道”等计数徽标挤到过早换行的位置;同时标签聚合行不再展示无意义的 ID 单元格。
这次也把标签聚合行的渠道数量和状态计数文案改为 i18n 文案,并补充 en、zh、fr、ja、ru、vi 的翻译键,确保表格视图和卡片视图在多语言环境下保持一致。
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
bun run build无错误Summary by CodeRabbit
New Features
Bug Fixes