diff --git a/frontend/apps/app/components/CommonLayout/GlobalNav/GlobalNav.module.css b/frontend/apps/app/components/CommonLayout/GlobalNav/GlobalNav.module.css index da27a9b069..2d84752194 100644 --- a/frontend/apps/app/components/CommonLayout/GlobalNav/GlobalNav.module.css +++ b/frontend/apps/app/components/CommonLayout/GlobalNav/GlobalNav.module.css @@ -1,6 +1,6 @@ /* Menu open state specific to CommonLayout */ .globalNav:has([data-radix-menu-content][data-state='open']) { - width: 11rem; + width: 15rem; box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2); } diff --git a/frontend/apps/app/components/CommonLayout/GlobalNav/Item.module.css b/frontend/apps/app/components/CommonLayout/GlobalNav/Item.module.css index a131622408..31551fbe33 100644 --- a/frontend/apps/app/components/CommonLayout/GlobalNav/Item.module.css +++ b/frontend/apps/app/components/CommonLayout/GlobalNav/Item.module.css @@ -22,6 +22,7 @@ .item { gap: var(--spacing-2half); width: auto; + justify-content: center; } .iconContainer > svg { @@ -35,8 +36,10 @@ .labelArea { display: flex; - gap: var(--spacing-2); align-items: center; + gap: var(--spacing-2); + flex: 1; + min-width: 0; opacity: 0; transition: opacity 0.1s var(--default-timing-function); } @@ -50,6 +53,8 @@ } .label { + flex: 1; + min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--font-size-4, 0.8125rem); diff --git a/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.module.css b/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.module.css index 46afdf653a..62e0b873fc 100644 --- a/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.module.css +++ b/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.module.css @@ -1,4 +1,10 @@ .newSessionButton { + display: grid; + grid-auto-flow: column; + align-items: center; + justify-content: center; + justify-items: center; + column-gap: var(--spacing-2half); color: var(--button-primary-foreground); background-color: var(--button-primary-background); border: var(--border-width-base) solid var(--button-primary-background); @@ -12,3 +18,30 @@ .newSessionButton .icon { color: var(--button-primary-foreground); } + +.iconContainer { + display: flex; +} + +:global([data-global-nav-container]):hover .newSessionButton .iconContainer, +:global([data-global-nav-container]):has( + [data-radix-menu-content][data-state='open'] + ) + .newSessionButton + .iconContainer { + display: none; +} + +.labelArea { + display: none; + justify-content: center; +} + +:global([data-global-nav-container]):hover .newSessionButton .labelArea, +:global([data-global-nav-container]):has( + [data-radix-menu-content][data-state='open'] + ) + .newSessionButton + .labelArea { + display: flex; +} diff --git a/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.tsx b/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.tsx index e1d982ae26..f45dd08f9d 100644 --- a/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.tsx +++ b/frontend/apps/app/components/CommonLayout/GlobalNav/NewSessionButton/NewSessionButton.tsx @@ -12,11 +12,11 @@ export const NewSessionButton: FC = () => { href={urlgen('design_sessions/new')} className={clsx(itemStyles.item, styles.newSessionButton)} > -