-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Drawing board on theme dependent palette #9750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
|
Connected to Huly®: UBERF-13402 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the drawing board color management system to use theme-dependent palettes, replacing hardcoded color values with a flexible theme-aware color system. Key improvements include better type safety with the new ColorMetaNameOrHex type, comprehensive test coverage for the new color utilities, and enhanced Jest configuration for Svelte component testing.
- Implements theme-aware color system using
ThemeAwareColorclass andColorsListtype for dynamic color palette management - Refactors drawing commands and utilities to use typed color references instead of plain strings
- Removes unused
ColorTooltipinternationalization key and adds comprehensive test coverage for new color functionality
Reviewed Changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/text-editor-resources/src/components/DrawingBoardEditor.svelte | Updates to use new theme-aware color palette and proper typing |
| packages/ui/src/colors.ts | Adds new color utility functions with proper type overloads |
| packages/presentation/src/drawingColors.ts | New color management system with theme-aware functionality |
| packages/presentation/src/drawingUtils.ts | Adds color type definitions and utility types |
| packages/presentation/src/drawing.ts | Major refactor to use new color system throughout drawing operations |
| packages/presentation/src/components/*.svelte | Updates toolbar components to use new color system |
| packages/presentation/lang/*.json | Removes unused ColorTooltip translation key |
| packages/presentation/jest.config.js | Enhanced Jest configuration for Svelte testing |
Comments suppressed due to low confidence (2)
packages/presentation/src/drawingColors.ts:1
- Misspelled color name 'Fuschia' should be 'Fuchsia'.
//
packages/presentation/src/drawingColors.ts:1
- Misspelled color name 'Lavander' should be 'Lavender'.
//
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
This pull request introduces several improvements and refactors to the desktop app and the presentation package, focusing on better theme management, test configuration for Svelte components, and minor internationalization clean-up. The most significant changes are grouped below.
Theme Management and UI Consistency:
'dark'/'light') with theThemeVariantenum from@hcengineering/theme, ensuring consistent theme assignment and usage throughout the UI codebase (index.ts,titleBarMenu.ts, andindex.ejs). Also updated CSS selectors to usedata-theme="theme-dark"for clarity and future extensibility. [1] [2] [3] [4] [5] [6]Testing Infrastructure Improvements:
desktopandpresentationpackages to support Svelte component testing. This includes addingmoduleNameMapperfor Svelte mocks, specifying setup files, and allowing ES module transformation for Svelte-related dependencies. [1] [2] [3]Internationalization Clean-up:
"ColorTooltip"translation key from all language JSON files in the presentation package to reduce clutter and potential confusion. [1] [2] [3] [4] [5] [6] [7] [8]Development Environment Improvements:
start-dev.bat) and PowerShell (start-dev.ps1) scripts for streamlined development startup, including automatic version/tag retrieval and environment variable setup. [1] [2]Code Quality and Minor Refactors:
titleBarMenu.tsby standardizing formatting, removing unnecessaryasyncusage, and clarifying type annotations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]