Extract center column offset, reduce by 20px (#7974)

* extract offset, reduce by 20px

* move constant to `Layout/const.ts`
This commit is contained in:
Samuel Newman
2025-03-24 21:55:05 +02:00
committed by GitHub
parent 1b8719293c
commit 412b107420
6 changed files with 19 additions and 7 deletions
+5 -1
View File
@@ -69,6 +69,7 @@ import {
UserCircle_Filled_Corner0_Rounded as UserCircleFilled,
UserCircle_Stroke2_Corner0_Rounded as UserCircle,
} from '#/components/icons/UserCircle'
import {CENTER_COLUMN_OFFSET} from '#/components/Layout'
import * as Menu from '#/components/Menu'
import * as Prompt from '#/components/Prompt'
import {Text} from '#/components/Typography'
@@ -559,7 +560,10 @@ export function DesktopLeftNav() {
leftNavMinimal && styles.leftNavMinimal,
{
transform: [
{translateX: centerColumnOffset ? -450 : -300},
{
translateX:
-300 + (centerColumnOffset ? CENTER_COLUMN_OFFSET : 0),
},
{translateX: '-100%'},
...a.scrollbar_offset.transform,
],
+2 -1
View File
@@ -19,6 +19,7 @@ import {
} from '#/alf'
import {AppLanguageDropdown} from '#/components/AppLanguageDropdown'
import {Divider} from '#/components/Divider'
import {CENTER_COLUMN_OFFSET} from '#/components/Layout'
import {InlineLinkText} from '#/components/Link'
import {ProgressGuideList} from '#/components/ProgressGuide/List'
import {Text} from '#/components/Typography'
@@ -66,7 +67,7 @@ export function DesktopRightNav({routeName}: {routeName: string}) {
position: 'fixed',
left: '50%',
transform: [
{translateX: centerColumnOffset ? 150 : 300},
{translateX: 300 + (centerColumnOffset ? CENTER_COLUMN_OFFSET : 0)},
...a.scrollbar_offset.transform,
],
width: 300 + gutters.paddingLeft,