Merged
Conversation
ravicious
reviewed
Jan 24, 2025
ravicious
approved these changes
Jan 27, 2025
avatus
approved these changes
Jan 27, 2025
gzdunek
added a commit
that referenced
this pull request
Jan 30, 2025
* Adjust workspace tests to accept persisted workspace type * Store profile color in workspace * Replace manual workspace creation in stories/tests with `addRootClusterWithDoc` * Fix checking if all colors are taken * Add DELETE IN comment * `ProfileColor` -> `WorkspaceColor` * Lint * Prettier * Add TODO about creating workspaces in `setActiveWorkspace` (cherry picked from commit 3b1c689)
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jan 30, 2025
* Store profile color in workspace (#51417) * Adjust workspace tests to accept persisted workspace type * Store profile color in workspace * Replace manual workspace creation in stories/tests with `addRootClusterWithDoc` * Fix checking if all colors are taken * Add DELETE IN comment * `ProfileColor` -> `WorkspaceColor` * Lint * Prettier * Add TODO about creating workspaces in `setActiveWorkspace` (cherry picked from commit 3b1c689) * Redesign profile switcher (#51419) * Add mapping of profile color to theme color * Prepare UserIcon to display colors, make it slightly larger * Rewrite single identity item to show icon and user/cluster in separate lines * Render single cluster items in a list * Add color picker * Render active cluster separately, above inactive clusters * Put the new identity components together * Refactor `Identity` story, render the container component instead of "presentational" one * Refresh startup page * Minor style fixes * Add comment about `dataVisualisationColors` * Bring back the original styling of `StaticListItem` * Make the pencil icon hoverable and clickable * Increase min-width from 200 px to 300 px, simplify active cluster layout * Show logout button when any part of `ListItem` is hovered * Remove text from logout button, improve titles * Pass correct index number to `AddClusterItem` * Update comment for `focusGrabber` * Use `useStoreSelector` correctly * Improve accessibility of color picker * Replace Pam icon with plus symbol * Remove unnecessary optional chaining * Align profile status error with user icon * Add story for cluster connect panel * Make user icon letter follow active theme This was suggested by Kenny, and I think it looks good. * Change gap from 11 px to 10 px * Rename profile color -> workspace color (cherry picked from commit 937e4a9)
carloscastrojumo
pushed a commit
to carloscastrojumo/teleport
that referenced
this pull request
Feb 19, 2025
* Adjust workspace tests to accept persisted workspace type * Store profile color in workspace * Replace manual workspace creation in stories/tests with `addRootClusterWithDoc` * Fix checking if all colors are taken * Add DELETE IN comment * `ProfileColor` -> `WorkspaceColor` * Lint * Prettier * Add TODO about creating workspaces in `setActiveWorkspace`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the part 1/2 of the redesigned profile switcher. It adds an API to storing a profile color in workspaces. The color is generated when we add a new workspace or when we restore persisted state and don't find a color in the workspace.
I prepared a list of 7 colors, I don't think people have more clusters than that.
Adding a new property to the workspace state wasn't too nice - I got about 30 TS errors about a missing property in or stories/tests. To fix this for good, I replaced all the places where we construct a workspace manually with a new
addRootClusterWithDochelper. Kudos to Rafał for adding it, it helped me a lot!