Skip to content
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

fix workspace color picker issue #5043

Merged
merged 1 commit into from
Jan 10, 2025
Merged

fix workspace color picker issue #5043

merged 1 commit into from
Jan 10, 2025

Conversation

alpetric
Copy link
Contributor

@alpetric alpetric commented Jan 10, 2025

Important

Fixes workspace color picker initialization and logic in ChangeWorkspaceColor.svelte.

  • Behavior:
    • Fixes initialization of workspaceColor in ChangeWorkspaceColor.svelte to correctly fetch from $usersWorkspaceStore.
    • Adjusts logic to ensure generateRandomColor() is called only when colorEnabled is true and workspaceColor is not set.
  • State Management:
    • Ensures workspaceColor is updated after saving changes in changeWorkspaceColor() function.

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

@alpetric alpetric requested a review from rubenfiszel as a code owner January 10, 2025 15:26
@alpetric alpetric requested a review from hcourdent January 10, 2025 15:26
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 8d6fd37 in 1 minute and 36 seconds

More details
  • Looked at 28 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/src/lib/components/settings/ChangeWorkspaceColor.svelte:15
  • Draft comment:
    The reactive statement $: workspaceColor is unnecessary and can be removed as it doesn't perform any operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The reactive statement for workspaceColor is unnecessary since it doesn't perform any operations. It can be removed to clean up the code.
2. frontend/src/lib/components/settings/ChangeWorkspaceColor.svelte:16
  • Draft comment:
    Ensure workspaceColor is reactive when modified by generateRandomColor to avoid unexpected behavior.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The generateRandomColor function is called in a reactive statement, but it doesn't update any reactive variables directly. This could lead to unexpected behavior if workspaceColor is not properly tracked. Consider ensuring workspaceColor is reactive or refactor the logic.
3. frontend/src/lib/components/settings/ChangeWorkspaceColor.svelte:38
  • Draft comment:
    Ensure workspaceColor is not set to undefined to prevent potential issues. Consider handling the case where colorToSave is undefined.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The changeWorkspaceColor function sets workspaceColor to colorToSave, which can be undefined. This might lead to issues if workspaceColor is expected to always be a valid color string elsewhere in the code.

Workflow ID: wflow_M60gBvCgZTNrblrh


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

Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8d6fd37
Status: ✅  Deploy successful!
Preview URL: https://20f9334d.windmill.pages.dev
Branch Preview URL: https://alp-ws-color-fix.windmill.pages.dev

View logs

Copy link
Contributor

@hcourdent hcourdent left a comment

Choose a reason for hiding this comment

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

Works on my chrome

@rubenfiszel rubenfiszel merged commit 6d934dd into main Jan 10, 2025
3 checks passed
@rubenfiszel rubenfiszel deleted the alp/ws_color_fix branch January 10, 2025 15:36
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants