Skip to content

Conversation

@GeneralGDA
Copy link
Contributor

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:

  • Refactored theme handling across the desktop UI by replacing string-based theme variants ('dark'/'light') with the ThemeVariant enum from @hcengineering/theme, ensuring consistent theme assignment and usage throughout the UI codebase (index.ts, titleBarMenu.ts, and index.ejs). Also updated CSS selectors to use data-theme="theme-dark" for clarity and future extensibility. [1] [2] [3] [4] [5] [6]

Testing Infrastructure Improvements:

  • Enhanced Jest configurations in both desktop and presentation packages to support Svelte component testing. This includes adding moduleNameMapper for Svelte mocks, specifying setup files, and allowing ES module transformation for Svelte-related dependencies. [1] [2] [3]

Internationalization Clean-up:

  • Removed the unused "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:

  • Added new Windows batch (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:

  • Improved code consistency and readability in titleBarMenu.ts by standardizing formatting, removing unnecessary async usage, and clarifying type annotations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

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>
@huly-github-staging
Copy link

Connected to Huly®: UBERF-13402

@GeneralGDA GeneralGDA requested a review from Copilot September 1, 2025 12:00
Copy link
Contributor

Copilot AI left a 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 ThemeAwareColor class and ColorsList type for dynamic color palette management
  • Refactors drawing commands and utilities to use typed color references instead of plain strings
  • Removes unused ColorTooltip internationalization 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>
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
@GeneralGDA GeneralGDA merged commit 1b1bbe7 into develop Sep 2, 2025
25 of 26 checks passed
@GeneralGDA GeneralGDA deleted the drawing-board-on-theme-dependent-palette branch September 2, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants