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

feat(frontend): allow workspace admin to set workspace color #5032

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

alpetric
Copy link
Contributor

@alpetric alpetric commented Jan 8, 2025

Screenshot 2025-01-08 at 5 00 18 PM Screenshot 2025-01-08 at 4 59 59 PM Screenshot 2025-01-08 at 4 59 53 PM Screenshot 2025-01-08 at 5 01 07 PM

Important

Add feature for workspace admins to set and display workspace color, including backend API and frontend UI changes.

  • Backend:
    • Add color column to workspace_settings table via migration scripts.
    • Update openapi.yaml to include change_workspace_color endpoint.
    • Modify workspaces.rs to handle color in Workspace, WorkspaceSettings, and UserWorkspace structs, and implement change_workspace_color() function.
  • Frontend:
    • Add ChangeWorkspaceColor.svelte component for color selection in workspace settings.
    • Update MenuButton.svelte and WorkspaceMenu.svelte to display workspace color.
    • Modify create_workspace/+page.svelte and workspaces/+page.svelte to include color selection during workspace creation and display.
    • Update stores.ts to include color in userWorkspaces store.

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

Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2025

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0b8c71a
Status: ✅  Deploy successful!
Preview URL: https://c1174f1d.windmill.pages.dev
Branch Preview URL: https://alp-color-coding-workspace.windmill.pages.dev

View logs

@alpetric alpetric marked this pull request as ready for review January 8, 2025 22:04
@alpetric alpetric requested a review from rubenfiszel as a code owner January 8, 2025 22:04
@alpetric alpetric requested a review from Guilhem-lm January 8, 2025 22:05
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 60a233f in 1 minute and 33 seconds

More details
  • Looked at 868 lines of code in 18 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. frontend/src/lib/components/settings/ChangeWorkspaceColor.svelte:17
  • Draft comment:
    Consider moving the generateRandomColor function to a shared utility file to avoid code duplication, as it is also used in create_workspace.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function generateRandomColor is called twice in the code: once in the create_workspace page and once in the ChangeWorkspaceColor component. This is a code duplication that can be avoided by moving the function to a shared utility file.
2. frontend/src/lib/components/sidebar/MenuButton.svelte:34
  • Draft comment:
    Ensure that the color property is consistently used across components to maintain uniform styling based on workspace color.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The color property is used in multiple components to style elements based on the workspace color. This is a good practice for maintaining consistent styling across the application.
3. frontend/src/lib/components/sidebar/WorkspaceMenu.svelte:63
  • Draft comment:
    Ensure that the color property is consistently used across components to maintain uniform styling based on workspace color.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The color property is used in multiple components to style elements based on the workspace color. This is a good practice for maintaining consistent styling across the application.
4. frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte:198
  • Draft comment:
    Ensure that the color property is consistently used across components to maintain uniform styling based on workspace color.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The color property is used in multiple components to style elements based on the workspace color. This is a good practice for maintaining consistent styling across the application.
5. frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte:822
  • Draft comment:
    Ensure that the color property is consistently used across components to maintain uniform styling based on workspace color.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The color property is used in multiple components to style elements based on the workspace color. This is a good practice for maintaining consistent styling across the application.

Workflow ID: wflow_NCfzMOb4p18GDZWp


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

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! Incremental review on 0b8c71a in 26 seconds

More details
  • Looked at 31 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/lib/components/sidebar/MenuButton.svelte:34
  • Draft comment:
    Consider using a CSS class for setting the border color instead of inline styles for better maintainability and consistency. This applies to other inline styles as well.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The comment should be placed on a line that is part of the diff.

Workflow ID: wflow_YuDhpL3Hm5ExUNWN


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

@rubenfiszel rubenfiszel merged commit 0c39137 into main Jan 9, 2025
4 checks passed
@rubenfiszel rubenfiszel deleted the alp/color_coding_workspace branch January 9, 2025 05:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 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.

2 participants