[WEB-3394] improvement: minor improvements for workspace switcher#6609
[WEB-3394] improvement: minor improvements for workspace switcher#6609sriramveeraghanta merged 1 commit intopreviewfrom
Conversation
WalkthroughThis pull request removes the optional Changes
Sequence Diagram(s)sequenceDiagram
participant DD as SidebarDropdown
participant OL as orderWorkspacesList
DD->>+OL: Pass unsorted workspaces array
OL-->>-DD: Return sorted workspaces array
DD->>DD: Render sorted workspaces list
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/utils/src/workspace.ts (1)
4-5: Add null check for workspace names.The function assumes all workspaces have valid names. Add null checks to handle potential edge cases.
- workspaces.sort((a, b) => a.name.localeCompare(b.name)); + workspaces.sort((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
packages/types/src/workspace.d.ts(0 hunks)packages/utils/src/index.ts(1 hunks)packages/utils/src/workspace.ts(1 hunks)web/ce/components/common/index.ts(1 hunks)web/ce/components/common/subscription/index.ts(1 hunks)web/core/components/workspace/sidebar/dropdown-item.tsx(1 hunks)web/core/components/workspace/sidebar/dropdown.tsx(2 hunks)web/ee/components/common/subscription-pill.tsx(0 hunks)
💤 Files with no reviewable changes (2)
- web/ee/components/common/subscription-pill.tsx
- packages/types/src/workspace.d.ts
✅ Files skipped from review due to trivial changes (2)
- web/ce/components/common/index.ts
- web/ce/components/common/subscription/index.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (python)
🔇 Additional comments (3)
packages/utils/src/index.ts (1)
13-13: LGTM!The workspace module export is correctly added.
web/core/components/workspace/sidebar/dropdown-item.tsx (1)
15-15: LGTM!The import path update aligns with the subscription components restructuring.
web/core/components/workspace/sidebar/dropdown.tsx (1)
69-69: LGTM!The implementation correctly uses the new
orderWorkspacesListutility while maintaining the active workspace at the top of the list.
Description
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
New Features
Refactor