Feat: Add compact workspace drawer style#2298
Open
DenysMb wants to merge 22 commits intoferdium:developfrom
Open
Feat: Add compact workspace drawer style#2298DenysMb wants to merge 22 commits intoferdium:developfrom
DenysMb wants to merge 22 commits intoferdium:developfrom
Conversation
|
I love this. Switching workplaces takes so many clicks right now. (keeping the drawer open is not an option at it's current size) |
transitions to prevent visual glitches
alwaysShowWorkspaces flag
There was a problem hiding this comment.
Pull request overview
Adds a new “Use compact workspace drawer” option to render a narrower workspace drawer (aligned with sidebar width) and adjusts styling/animations to improve drawer UX.
Changes:
- Introduces compact drawer mode (new setting + theme/style support) and renders compact workspace items (icon/initial).
- Reworks drawer width/transform logic using CSS variables and dynamic appearance-generated CSS.
- Tweaks workspace switching delays to respect
prefers-reduced-motionand avoid animation jank.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/themes/default/index.ts | Adds a compactWidth theme value for the drawer. |
| src/styles/vertical.scss | Adjusts active workspace button styling behavior for compact mode. |
| src/styles/layout.scss | Introduces --workspace-drawer-width CSS variable + drawer shadow overlay styling. |
| src/i18n/locales/en-US.json | Adds strings for the new setting and a “services” label. |
| src/features/workspaces/store.ts | Changes workspace switching timing to align with animation duration / reduced motion. |
| src/features/workspaces/components/WorkspaceDrawerItem.tsx | Renders compact item UI (icon/initial) and adds compact-specific styles. |
| src/features/workspaces/components/WorkspaceDrawer.tsx | Adds compact drawer layout + passes compact state down to items. |
| src/features/appearance/index.ts | Adds compact drawer CSS generation, transform logic, and reactions for transition control. |
| src/containers/settings/EditSettingsScreen.tsx | Adds the new setting metadata for the settings screen. |
| src/config.ts | Adds default app setting useCompactWorkspaceDrawer. |
| src/components/settings/settings/EditSettingsForm.tsx | Adds the toggle control to the settings form. |
| src/components/layout/AppLayout.tsx | Adds app--compact-workspace class and adjusts transform to respect compact width. |
Comments suppressed due to low confidence (1)
src/features/workspaces/components/WorkspaceDrawerItem.tsx:165
- In compact mode the visual label is reduced to an icon/initial, but the tooltip content only shows the keyboard shortcut and not the workspace name—making it harder for users (and assistive tech) to identify items. Consider adding
aria-label={name}(and/or includingnameindata-tooltip-content, or adding atitle) so the compact representation remains discoverable and screen-reader friendly.
data-tooltip-id="tooltip-workspaces-drawer"
data-tooltip-content={acceleratorString({
index: shortcutIndex,
keyCombo: `${cmdOrCtrlShortcutKey(false)}+${altKey(false)}`,
})}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix matchMedia always-truthy bug in generateAppContentTransition:
window?.matchMedia?.(query) returns a MediaQueryList (truthy) even
when the media query does not match; use reducedMotionQuery?.matches
to evaluate the actual match result
- Normalize settings to appSettings in updateStyle to prevent
updateProgressbar receiving the full settings store (which lacks
progressbarAccentColor at the top level), fixing broken progress
bar coloring when called from the new drawer-settings reaction
- Guard getDrawerAnimationDuration against non-browser environments
with typeof window check before calling window.matchMedia
- Rename compactClass prop to isCompact: boolean in WorkspaceDrawerItem
to remove dual-purpose string/boolean usage; derive the CSS class
name locally from the boolean flag
- Add aria-label={name} to compact workspace items so screen readers
and assistive tech can identify items when the visual label is
reduced to an icon/initial
- Use CSS variable var(--workspace-drawer-width) as single source of
truth for drawer width in WorkspaceDrawer JSS styles, removing the
hard-coded theme values and the compact override that could cause
inconsistencies with the appearance-injected CSS
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.
Pre-flight Checklist
Please ensure you've completed all of the following.
Description of Change
Added an option "Use compact workspace drawer". This option shows a smaller version of the workspace drawer (the same width as the sidebar), displaying the "All services" workspace as displaying the first character of the name of all the user-created workspace (so if we start the name of the workspace with an emoji, for example, we'll display the emoji).
I always fixed a bug
Motivation and Context
The workspace drawer is too big to use the "Always show workspace drawer" option comfortably.
In order to fix this, I added a option to use a compact workspace drawer style.
Screenshots
Screencast_20251122_201902.mp4
Screencast_20251122_202119.mp4
Checklist
pnpm prepare-code)pnpm testpassesRelease Notes
Added "Use compact workspace drawer" option.