Skip to content

fix error when duplicate color #1720

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

Merged
merged 1 commit into from
Apr 4, 2025
Merged

Conversation

spartan-vutrannguyen
Copy link
Contributor

@spartan-vutrannguyen spartan-vutrannguyen commented Apr 3, 2025

Description

  • Fix error when duplicate a color with more than 2 words (example: Test color)

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Release
  • Refactor
  • Other (please describe):

Testing

Before

Screen.Recording.2025-04-03.at.22.13.08.mov

After
https://github.com/user-attachments/assets/d72ef0a1-413b-47ae-83aa-e3a9e2a245f8

Screenshots (if applicable)

Additional Notes


Important

Fixes error in ThemeManager.duplicate() when duplicating colors with multi-word names by correcting update() parameters.

  • Bug Fix:
    • Fixes error in duplicate() method in index.ts when duplicating colors with names containing more than two words.
    • Changes update() call to use groupName instead of groupName.toLowerCase() for the parentName parameter.

This description was created by Ellipsis for 515a87f. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 515a87f in 1 minute and 9 seconds

More details
  • Looked at 21 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. apps/studio/src/lib/editor/engine/theme/index.ts:467
  • Draft comment:
    Ensure that passing the original groupName (without toLowerCase) is intended. Change may affect normalization consistency since update() previously received a lowercased parentName.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
2. apps/studio/src/lib/editor/engine/theme/index.ts:464
  • Draft comment:
    Use groupName instead of groupName.toLowerCase() to ensure key consistency. Removing toLowerCase() fixes duplication errors for multi-word color names. Ensure that the internal camelCase conversion in update aligns with how keys are stored.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_3sJs3ROalGnmy0yD


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@Kitenite Kitenite merged commit f326643 into main Apr 4, 2025
@Kitenite Kitenite deleted the fix/error-when-duplicate-color branch April 4, 2025 00:25
ml-delaurier pushed a commit to ml-delaurier/nolook that referenced this pull request Apr 23, 2025
t1c1 pushed a commit to t1c1/onlookbotcodes that referenced this pull request Jun 5, 2025
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.

2 participants