Implement Modern Theme System from solid-chat
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- css, typescript
研究方向
首先,將 src/style.js 和 src/styleConstants.js 中目前的樣式進入點與 solid-chat 主題及主題化文件進行比較。在選擇移轉選項之前,檢視 src/chat/、src/widgets/、src/acl/、src/login/ 和 src/header/ 下受影響的區域。完成標準包括:已達成共識的主題策略、已移轉的元件、執行階段切換、相容性預期,以及更新後的 Storybook 範例。
由索引模型根據 Issue 內容生成。
描述
Implement Modern Theme System from solid-chat
Summary
Modernize solid-ui's styling architecture by adopting the theme system from solid-chat. This would replace the current inline JavaScript style approach with CSS variables and runtime theme switching.
Current State
solid-ui (Current)
- Method: Inline JavaScript style strings (
src/style.js) - Theming: None - hard-coded colors
- Colors: Legacy palette (
#3B5998,#eef,#888) - Pattern:
style.textInputStyle = 'background-color: #eef; padding: 0.5em; ...'
solid-chat (Target)
- Method: External CSS files with CSS variables
- Theming: 4 themes (Solid, Wave, Telegram, Signal) with runtime switching
- Colors: Modern palette with gradients and shadows
- Pattern: CSS custom properties (
--gradient-start,--text,--border)
Proposed Changes
Phase 1: Foundation
- Create
src/themes/directory - Add base
default.csswith CSS variables - Create theme loader utility
- Add CSS injection capability
Phase 2: Migration
- Convert
style.jsto reference CSS variables instead of hard-coded values - Update chat components (
chat/infinite.js,chat/message.js) - Update form components and widgets
- Maintain backward compatibility
Phase 3: Theme System
- Port solid-chat themes (Wave, Telegram, Signal)
- Add theme switcher widget
- Save preference to localStorage
- Update Storybook examples
Benefits
✅ Modern appearance - Gradients, shadows, better spacing
✅ User customization - Runtime theme switching
✅ Maintainability - CSS variables easier to manage than JS strings
✅ Performance - CSS over inline styles
✅ Consistency - Align with solid-chat visual design
Design Decisions Needed
-
Breaking changes?
- Option A: v4.0.0 (full migration, breaking)
- Option B: v3.1.0 (hybrid approach, backward compatible)
-
Default theme?
- Solid purple gradient or keep current colors initially?
-
Migration strategy?
- All at once or gradual component-by-component?
Implementation Options
Option 1: Full CSS Variable Migration (Recommended)
- Effort: 2-3 weeks
- Benefits: Best long-term solution, full theming support
- Risk: Medium - requires testing all components
Option 2: Hybrid Approach
- Effort: 1-2 weeks
- Benefits: Backward compatible, gradual migration
- Risk: Low - existing code continues to work
Option 3: Extract Key Improvements Only
- Effort: 3-5 days
- Benefits: Quick visual wins on specific components
- Risk: Very low - minimal changes
Example Theme Structure
/* src/themes/default.css */
:root {
/* Primary colors */
--theme-primary: #805ad5;
--theme-accent: #9f7aea;
--theme-gradient-start: #667eea;
--theme-gradient-end: #9f7aea;
/* Backgrounds */
--bg: #f7f8fc;
--bg-panel: #ffffff;
/* Text */
--text: #2d3748;
--text-secondary: #4a5568;
--text-muted: #a0aec0;
/* Borders */
--border: #e2e8f0;
/* Effects */
--shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
--border-radius: 0.5em;
}
References
- solid-chat themes: https://github.com/bourgeoa/solid-chat/tree/gh-pages/themes
- solid-chat theming docs: https://github.com/bourgeoa/solid-chat/blob/gh-pages/themes/README.md
- Current solid-ui styles:
src/style.js,src/styleConstants.js
Related Components
The following components would benefit most from this update:
src/chat/- Chat messages and UIsrc/widgets/- Buttons, inputs, formssrc/acl/- Access control UIsrc/login/- Login formssrc/header/- Header and navigation
Questions
- Should we maintain 100% backward compatibility or accept breaking changes for v4.0?
- Which theme should be the default - current colors or new solid-chat style?
- Should theme switching be opt-in or enabled by default?
- How should this integrate with existing apps (Mashlib, etc.)?
Next Steps
- Get community feedback on approach
- Choose implementation option
- Create detailed implementation plan
- Begin with Phase 1 (foundation)
Labels: enhancement, design, breaking-change (maybe), help-wanted
Milestone: v4.0.0 or v3.1.0
- 主要語言
- TypeScript
- 星號
- 153
- 分支
- 46
- 平均合併
- 1 天 5 小時
- 30 天內合併 PR
- 13
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
SolidOS/solid-ui 的其他 Issue
-
Sharing Dialog: UX for adding new authorizations可能已有人在做 @timea-solid 於 1 天前認領。 未關閉question
SolidOS/solid-ui#892 · 1 則留言 · 已指派 2 人 ·
維護者通常 1 天內回覆
-
Sharing pane: Add error handling可能已有人在做 @SharonStrats 今天認領。 未關閉enhancement
SolidOS/solid-ui#894 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Sharing Dialog: Name on sharing with area for contacts可能已有人在做 @SharonStrats 於 6 天前認領。 未關閉question
SolidOS/solid-ui#885 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Vite warning未關閉enhancement
難度 3/5 1-2 天 新手友好度 64/100
維護者通常 1 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 35/100
維護者通常 1 天內回覆
相似的 Issue
-
afk-ok area:data-quality importer size:S
難度 2/5 1-3 小時 新手友好度 74/100
enorm-labs/event-junkie#3301 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
one-zero-eight/apply-bot#39 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
bigbluebutton/bbb-ui-components-react#108 ·
維護者通常 2 天內回覆
-
area: app type: bug
難度 2/5 1-3 小時 新手友好度 70/100
ExpidetGames/code-reviewer#308 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆