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