mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-26 14:26:06 +00:00
fix(ui): align workspace switcher with sidebar entries
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="mx-auto w-4/5 group-data-[collapsible=icon]:min-w-0 group-data-[collapsible=icon]:px-2" />
|
<WorkspaceSwitcher className="w-full 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 */}
|
||||||
|
|||||||
@@ -94,10 +94,14 @@ test('moves Cloud plan upgrades into Workspace Settings', () => {
|
|||||||
assert.ok(toolbarEnd < membersHeading && membersHeading < cloudInvite);
|
assert.ok(toolbarEnd < membersHeading && membersHeading < cloudInvite);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('fills 80 percent of the sidebar, centers the trigger, and truncates long names', () => {
|
test('aligns the workspace trigger with navigation entries on both sides and truncates long names', () => {
|
||||||
assert.match(
|
assert.match(
|
||||||
homeSidebarSource,
|
homeSidebarSource,
|
||||||
/<WorkspaceSwitcher className="mx-auto w-4\/5/,
|
/<div className="px-2[^>]*>[\s\S]*<WorkspaceSwitcher className="w-full/,
|
||||||
|
);
|
||||||
|
assert.doesNotMatch(
|
||||||
|
homeSidebarSource,
|
||||||
|
/WorkspaceSwitcher className="[^"]*w-4\/5/,
|
||||||
);
|
);
|
||||||
assert.match(workspaceSwitcherSource, /h-9/);
|
assert.match(workspaceSwitcherSource, /h-9/);
|
||||||
assert.match(workspaceSwitcherSource, /w-64/);
|
assert.match(workspaceSwitcherSource, /w-64/);
|
||||||
|
|||||||
Reference in New Issue
Block a user