refactor(container): update styles and variables for container component#210
refactor(container): update styles and variables for container component#210hexqi merged 3 commits intoopentiny:developfrom
Conversation
- Translated footer text in demo to Chinese for localization. - Moved CSS variable definitions for the container component to a new LESS file for better organization and maintainability. - Updated icon button hover background to use the new container background variable. - Cleaned up unused styles in the container component to streamline the codebase.
WalkthroughReworks container theming to emit global CSS tokens via a new Less mixin and maps those tokens to scoped CSS custom properties in the component; switches icon-button hover to a theme variable; adds container styles to component style imports; updates a docs demo's footer text and removes demo background styles. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
docs/demos/container/basic.vue (1)
13-13: Avoid hard-coded locale strings; use i18n token.
Use a translatable key so the demo works across locales.Example (if vue-i18n is available):
- <div class="footer">这是 footer</div> + <div class="footer">{{ $t('container.demo.footer') }}</div>packages/components/src/styles/components/container.less (1)
11-16: Consider rem units for scalability.
Pixels are fine, butremimproves zoom/accessibility without retuning tokens.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
packages/svgs/src/assets/new-session.svgis excluded by!**/*.svg
📒 Files selected for processing (5)
docs/demos/container/basic.vue(1 hunks)packages/components/src/container/index.vue(0 hunks)packages/components/src/icon-button/index.vue(1 hunks)packages/components/src/styles/components/container.less(1 hunks)packages/components/src/styles/components/index.css(1 hunks)
💤 Files with no reviewable changes (1)
- packages/components/src/container/index.vue
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-18T09:29:47.974Z
Learnt from: SonyLeo
PR: opentiny/tiny-robot#119
File: packages/components/src/attachments/index.less:213-213
Timestamp: 2025-06-18T09:29:47.974Z
Learning: 在 packages/components/src/attachments/index.less 中,.tr-file-card__close 的背景色使用了硬编码的 rgb(194, 194, 194),但这个UI元素(关闭按钮)将会被直接替换为图标,所以不需要抽取为CSS变量。
Applied to files:
packages/components/src/icon-button/index.vue
🪛 GitHub Actions: E2E Tests
packages/components/src/styles/components/index.css
[error] 1-1: Build failed during 'pnpm -F @opentiny/tiny-robot-* build' (vue-tsc && vite build). ENOENT: no such file or directory, open './bubble.less'. Unable to resolve @import './bubble.less' in packages/components/src/styles/components/index.css.
🔇 Additional comments (2)
packages/components/src/styles/components/container.less (1)
19-23: Confirm fullscreen typography.
title-font-sizeincreases to 16px buttitle-line-heightremains 22px. Verify intended rhythm; 24px is common for 16px.packages/components/src/styles/components/index.css (1)
1-2: Check cascade/order impacts.
New imports load before prompt styles; verify no unintended precedence shifts for overlapping selectors.
Summary by CodeRabbit