mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-26 14:26:06 +00:00
fix(ui): widen and center workspace switcher
This commit is contained in:
@@ -1916,7 +1916,7 @@ export default function HomeSidebar({
|
||||
</SidebarHeader>
|
||||
|
||||
<div className="px-2 group-data-[collapsible=icon]:px-0">
|
||||
<WorkspaceSwitcher className="w-1/2 max-w-36 group-data-[collapsible=icon]:min-w-0 group-data-[collapsible=icon]:px-2" />
|
||||
<WorkspaceSwitcher className="mx-auto w-4/5 group-data-[collapsible=icon]:min-w-0 group-data-[collapsible=icon]:px-2" />
|
||||
</div>
|
||||
|
||||
{/* Navigation items grouped by section */}
|
||||
|
||||
@@ -92,8 +92,11 @@ test('moves Cloud plan upgrades into Workspace Settings', () => {
|
||||
assert.ok(toolbarEnd < membersHeading && membersHeading < cloudInvite);
|
||||
});
|
||||
|
||||
test('keeps the workspace trigger compact and truncates long names', () => {
|
||||
assert.match(homeSidebarSource, /<WorkspaceSwitcher className="w-1\/2/);
|
||||
test('fills 80 percent of the sidebar, centers the trigger, and truncates long names', () => {
|
||||
assert.match(
|
||||
homeSidebarSource,
|
||||
/<WorkspaceSwitcher className="mx-auto w-4\/5/,
|
||||
);
|
||||
assert.match(workspaceSwitcherSource, /h-9/);
|
||||
assert.match(workspaceSwitcherSource, /w-64/);
|
||||
assert.doesNotMatch(workspaceSwitcherSource, /min-w-80/);
|
||||
|
||||
Reference in New Issue
Block a user