Skip to content

Commit 54e3e8a

Browse files
committed
fix: Make the navigation height consistent to fix responsiveness
https://harperdb.atlassian.net/browse/STUDIO-604
1 parent e2a3b96 commit 54e3e8a

File tree

8 files changed

+24
-20
lines changed

8 files changed

+24
-20
lines changed

src/components/SubNavMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { ReactNode } from 'react';
33

44
export function SubNavMenu({ children }: { children?: ReactNode }) {
55
return (
6-
<nav className="fixed top-20 w-full md:h-12 z-39 py-2 px-4 md:px-12 bg-grey-700">
7-
<div className="md:flex items-center h-full space-x-8">
6+
<nav className="fixed top-20 w-full h-12 z-39 py-2 px-4 md:px-12 bg-grey-700">
7+
<div className="flex items-center h-full space-x-2">
88
<Breadcrumbs />
99
{children}
1010
</div>

src/features/clusters/ClustersList.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function ClustersList() {
5555
<div className="flex w-full justify-end gap-2">
5656
<Input
5757
placeholder="Filter by name"
58-
className="inline-block w-48 md:w-64 bg-black border"
58+
className="inline-block w-full text-xs"
5959
value={filterByNameValue}
6060
onChange={onFilterByNameChanged}
6161
/>
@@ -64,20 +64,19 @@ export function ClustersList() {
6464
<Link to="new-cluster">
6565
<Button
6666
variant="positive"
67-
className="w-full rounded-full md:w-44"
6867
accessKey="n"
6968
>
7069
<Plus />{' '}
71-
<span>
72-
<u>N</u>ew Cluster
70+
<span className="hidden sm:inline-block">
71+
<u>N</u>ew <span className="hidden md:inline-block">Cluster</span>
7372
</span>
7473
</Button>
7574
</Link>
7675
)}
7776
</div>
7877
) : null}
7978
</SubNavMenu>
80-
<section className="mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
79+
<section className="mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
8180
<div className="grid grid-cols-1 gap-4 md:grid-cols-12 mb-4">
8281
{filteredClusters.map((cluster) => (
8382
<div key={cluster.id} className="col-span-1 md:col-span-4 lg:col-span-3 2xl:col-span-2">

src/features/instance/InstanceLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Outlet } from '@tanstack/react-router';
44
export function InstanceLayout() {
55
return (
66
<>
7-
<nav className="fixed top-20 w-full z-39 md:px-12 md:py-1 bg-grey-700">
7+
<nav className="fixed top-20 w-full z-39 h-12 md:px-12 bg-grey-700">
88
<InstanceNavBar />
99
</nav>
1010
<div className="mt-32 min-h-[calc(100vh-theme(spacing.32))]">

src/features/instance/InstanceNavBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function DesktopInstanceNavBar({ links, restartRequired }: { links: Link[], rest
111111
function MobileInstanceNavBar({ links, restartRequired }: { links: Link[], restartRequired: boolean }) {
112112
return (
113113
<>
114-
<div className="flex md:hidden items-center justify-between p-2 text-white">
114+
<div className="flex md:hidden items-center justify-between h-full px-2 text-white">
115115
<Breadcrumbs restartRequired={restartRequired} />
116116
<DropdownMenu>
117117
<DropdownMenuTrigger asChild>

src/features/instance/applications/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ export function ApplicationsEditor() {
2424
<ApplicationsSidebar />
2525
</aside>
2626

27-
<div className={cx('applications-content overflow-y-auto overflow-x-hidden fixed bottom-0 right-0 left-0' +
28-
' md:left-56' +
29-
' transition-[left]' +
30-
' h-[calc(100vh-theme(spacing.32))]', toggled && 'sm:left-56')}>
27+
<div className={cx(
28+
'applications-content',
29+
'overflow-y-auto overflow-x-hidden',
30+
'fixed top-32 right-0 bottom-0 left-0',
31+
'transition-[left]',
32+
'md:left-56',
33+
toggled && 'sm:left-56',
34+
)}>
3135
<ContentViewer />
3236
<ContentActions toggledSidebar={toggled} toggleSidebar={toggle} />
3337
</div>

src/features/organization/billing/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function OrgBillingIndex() {
1414

1515
if (!update) {
1616
return (
17-
<div className="mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
17+
<div className="mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
1818
You don't have access to manage payments for this organization. Please contact your administrator.
1919
</div>
2020
);
@@ -23,7 +23,7 @@ export function OrgBillingIndex() {
2323
return (
2424
<>
2525
<SubNavMenu />
26-
<div className="mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
26+
<div className="mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
2727
<div className="md:grid gap-4 md:grid-cols-12 min-h-[calc(100vh-theme(spacing.36))] mb-12">
2828
<section className="col-span-1 text-white md:col-span-4 lg:col-span-3 md:border-r-1 border-b md:border-b-0 md:pr-4 border-gray-700">
2929
<DesktopBillingNavBar />

src/features/organizations/NewOrg.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function NewOrg() {
55
return (
66
<>
77
<SubNavMenu />
8-
<section className="mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
8+
<section className="mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
99
<NewOrgForm />
1010
</section>
1111
</>

src/features/organizations/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,19 @@ export function OrganizationsIndex() {
9090
<div className="flex w-full justify-end gap-2">
9191
<Input
9292
placeholder="Filter by name"
93-
className="inline-block w-48 md:w-64 bg-black border"
93+
className="inline-block w-full text-xs"
9494
value={filterByNameValue}
9595
onChange={onFilterByNameChanged}
9696
/>
9797
<Link to="/new-org">
98-
<Button variant="positive" className="rounded-full w-44" accessKey="n">
99-
<PlusIcon /> <span><u>N</u>ew Organization</span>
98+
<Button variant="positive" accessKey="n">
99+
<PlusIcon />
100+
<span className="hidden sm:inline-block"><u>N</u>ew <span className="hidden md:inline-block">Organization</span></span>
100101
</Button>
101102
</Link>
102103
</div>
103104
</SubNavMenu>
104-
<section className="mt-40 md:mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
105+
<section className="mt-32 px-4 pt-4 md:px-12 min-h-[calc(100vh-theme(spacing.32))]">
105106
<div className="grid grid-cols-1 gap-4 md:grid-cols-12">
106107
{organizationRoles.map((organizationRole) => (
107108
<div

0 commit comments

Comments
 (0)