fix(workspace): improve workspace switcher list visibility and scrollbar cue (#444) - #566
Open
Tyagiquamar wants to merge 1 commit into
Open
Tyagiquamar wants to merge 1 commit into
Tyagiquamar wants to merge 1 commit into
Conversation
Reviewer's GuideThe workspace switcher now exposes more workspace rows and provides a persistent scrollbar cue by using a visible-scrollbar style with a 320px maximum height. A focused Jest regression test verifies both container classes after opening the dropdown. Flow diagram for visible workspace list scrollingflowchart TD
User[User opens workspace switcher] --> WorkspaceList[Workspace list container]
WorkspaceList --> VisibleScrollbar[appflowy-visible-scrollbar]
WorkspaceList --> MaxHeight["max-h-[320px]"]
VisibleScrollbar --> ScrollCue[Persistent scrollbar cue]
MaxHeight --> MoreRows[More workspace rows visible]
MoreRows --> Scroll[Scroll to additional workspaces]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Problem
When a user has more than 4 workspaces, the workspace switcher dropdown in the sidebar only displays the first 4 items in the visible area. Workspaces 5 and beyond are pushed below the fold. Because the list uses a scrollbar that stays transparent unless hovered directly, users cannot visually discover that the list is scrollable, leading them to believe that subsequent workspaces are missing.
Root cause
In
src/components/app/workspaces/Workspaces.tsx, the workspace list container was capped withmax-h-[200px]and styled withappflowy-scroller, which renders a transparent scrollbar thumb until hovered. With ~60px per workspace row, only 4 rows fit before clipping, with no visible indication of scrollability.Fix
appflowy-visible-scrollbarso a subtle scrollbar thumb is always visible when content overflows.max-h-[320px]to comfortably fit up to 6-7 workspace rows directly in the visible area.src/components/app/workspaces/__tests__/Workspaces.test.tsxasserting that the container appliesappflowy-visible-scrollbarandmax-h-[320px].Testing
pnpm type-checkpassed (exit code 0).pnpm jest src/components/app/workspaces/__tests__/Workspaces.test.tsxpassed (1/1 green).Closes #444
Summary by Sourcery
Improve the workspace switcher so additional workspaces are easier to discover and access.
Bug Fixes:
Tests: