Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-597: Sidebar layout #1308

Draft
wants to merge 47 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d40602d
Add feature flag
TWilson023 Oct 2, 2024
d045117
Add side nav layout
TWilson023 Oct 3, 2024
56ca7f5
Continue filling in side nav
TWilson023 Oct 3, 2024
a90a438
Move sidenav feature flag check to backend
TWilson023 Oct 4, 2024
2e33711
Add help button to side nav
TWilson023 Oct 4, 2024
04b193c
Add scroll fade to workspace dropdown
TWilson023 Oct 4, 2024
4f4054a
Add subtle gradient to sidebar
TWilson023 Oct 4, 2024
d115732
Remove feature flag and update links page
TWilson023 Oct 4, 2024
ca77f8d
Merge branch 'main' into side-nav-layout
steven-tey Oct 6, 2024
a80283a
Fix page layouts
TWilson023 Oct 7, 2024
79d92e2
Update active states + add animations
TWilson023 Oct 7, 2024
833749e
Merge branch 'main' into side-nav-layout
steven-tey Oct 7, 2024
8d28d78
Update settings pages/navs and add animations
TWilson023 Oct 8, 2024
18ac7b0
Update sidebar-nav.tsx
TWilson023 Oct 8, 2024
3a47d98
Merge branch 'main' into side-nav-layout
steven-tey Oct 8, 2024
4d75dd1
Merge branch 'side-nav-layout' of https://github.com/dubinc/dub into …
steven-tey Oct 8, 2024
99b5168
Merge branch 'main' into side-nav-layout
steven-tey Oct 8, 2024
08ca78f
Delete settings-nav-mobile.tsx
TWilson023 Oct 8, 2024
25562de
Update package.json
steven-tey Oct 8, 2024
3753f25
dub logo should redirect too
steven-tey Oct 8, 2024
7eadbb0
Move menu items around
TWilson023 Oct 8, 2024
f2bdf11
Merge branch 'side-nav-layout' of github.com:dubinc/dub into side-nav…
TWilson023 Oct 8, 2024
91c135d
integration marketplace grid 3
steven-tey Oct 8, 2024
17c9f94
Merge branch 'side-nav-layout' of https://github.com/dubinc/dub into …
steven-tey Oct 8, 2024
c222900
Make icons animate on hover
TWilson023 Oct 8, 2024
5683cbe
Update sidebar-nav.tsx
TWilson023 Oct 8, 2024
fbe7294
Use transitions for nav page changes
TWilson023 Oct 8, 2024
e0026ae
Update sidebar-nav.tsx
TWilson023 Oct 8, 2024
805b5ce
add some top padding
steven-tey Oct 8, 2024
d6a4a05
tweaks
steven-tey Oct 8, 2024
d4ede51
remove /workspaces
steven-tey Oct 8, 2024
b8b993d
remove "/workspaces"
steven-tey Oct 8, 2024
d274266
Update not-found.tsx
steven-tey Oct 8, 2024
9a246bd
Add console.log for debugging in preview
TWilson023 Oct 9, 2024
7ae56c7
Revert ENG-504 (for ENG-612)
TWilson023 Oct 9, 2024
cf3c190
Update link display dirty notification color
TWilson023 Oct 9, 2024
a492d7f
Update sidebar-nav.tsx
TWilson023 Oct 9, 2024
29eb4c1
Update sidebar-nav.tsx
TWilson023 Oct 9, 2024
2542335
Update sidebar-nav.tsx
TWilson023 Oct 9, 2024
64b9e0c
Update sidebar-nav.tsx
TWilson023 Oct 9, 2024
417b653
Update sidebar-nav.tsx
TWilson023 Oct 9, 2024
6d2d5bc
remove usememo
steven-tey Oct 9, 2024
0f547be
try useEffect instead 🤢
steven-tey Oct 9, 2024
4f48cd0
Remove duplicate toolbar
TWilson023 Oct 9, 2024
87bf0d4
Tweak workspace not found page
TWilson023 Oct 9, 2024
81d0068
Remove old files
TWilson023 Oct 9, 2024
15904df
Update main-nav.tsx
TWilson023 Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions apps/web/app/app.dub.co/(dashboard)/[slug]/analytics/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import Analytics from "@/ui/analytics";
import LayoutLoader from "@/ui/layout/layout-loader";
import { PageContent } from "@/ui/layout/page-content";
import { Suspense } from "react";
import AnalyticsClient from "./client";

export default function WorkspaceAnalytics() {
return (
<Suspense fallback={<LayoutLoader />}>
<AnalyticsClient>
<Analytics />
</AnalyticsClient>
<PageContent title="Analytics">
<AnalyticsClient>
<Analytics />
</AnalyticsClient>
</PageContent>
</Suspense>
);
}
13 changes: 8 additions & 5 deletions apps/web/app/app.dub.co/(dashboard)/[slug]/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import Events from "@/ui/analytics/events";
import { EventsProvider } from "@/ui/analytics/events/events-provider";
import LayoutLoader from "@/ui/layout/layout-loader";
import { PageContent } from "@/ui/layout/page-content";
import { Suspense } from "react";
import AnalyticsClient from "../analytics/client";

export default function WorkspaceAnalyticsEvents() {
return (
<Suspense fallback={<LayoutLoader />}>
<AnalyticsClient>
<EventsProvider>
<Events />
</EventsProvider>
</AnalyticsClient>
<PageContent title="Events">
<AnalyticsClient>
<EventsProvider>
<Events />
</EventsProvider>
</AnalyticsClient>
</PageContent>
</Suspense>
);
}
27 changes: 12 additions & 15 deletions apps/web/app/app.dub.co/(dashboard)/[slug]/page-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,12 @@ function WorkspaceLinks() {
<>
<LinkBuilder />
<AddEditTagModal />
<div className="mt-10 flex w-full items-center pt-3">
<div className="flex w-full items-center pt-3">
<MaxWidthWrapper className="flex flex-col gap-y-3">
<div className="flex flex-wrap items-center justify-between gap-2 md:flex-nowrap">
<h1 className="order-1 text-2xl font-semibold tracking-tight text-black">
Links
</h1>
<div className="order-4 flex w-full grow flex-wrap justify-end gap-2 md:order-2 md:w-auto">
<div className="w-full md:w-56 lg:w-64">
<SearchBoxPersisted
loading={isValidating}
inputClassName="h-10"
/>
<div className="flex flex-wrap items-center justify-between gap-2 lg:flex-nowrap">
<div className="flex w-full grow gap-2 md:w-auto">
<div className="grow basis-0 md:grow-0">
<LinkDisplay />
</div>
<div className="grow basis-0 md:grow-0">
<Filter.Select
Expand Down Expand Up @@ -135,11 +129,14 @@ function WorkspaceLinks() {
}}
/>
</div>
<div className="grow basis-0 md:grow-0">
<LinkDisplay />
</div>
</div>
<div className="order-3 flex gap-x-2">
<div className="flex gap-x-2 max-md:w-full">
<div className="w-full md:w-56 lg:w-64">
<SearchBoxPersisted
loading={isValidating}
inputClassName="h-10"
/>
</div>
<div className="grow-0">
<CreateLinkButton />
</div>
Expand Down
7 changes: 6 additions & 1 deletion apps/web/app/app.dub.co/(dashboard)/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { PageContent } from "@/ui/layout/page-content";
import WorkspaceLinksClient from "./page-client";

export default function WorkspaceLinks() {
return <WorkspaceLinksClient />;
return (
<PageContent title="Links">
<WorkspaceLinksClient />
</PageContent>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Integrations = async () => {
});

return (
<div className="grid gap-3 sm:grid-cols-2">
<div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
{integrations.map((integration) => (
<IntegrationCard
key={integration.id}
Expand Down
121 changes: 0 additions & 121 deletions apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { ReactNode } from "react";
import WorkspaceSettingsLayoutClient from "./layout-client";
import SettingsLayout from "../../../../../ui/layout/settings-layout";

export default function WorkspaceSettingsLayout({
children,
}: {
children: ReactNode;
}) {
return (
<WorkspaceSettingsLayoutClient>{children}</WorkspaceSettingsLayoutClient>
);
return <SettingsLayout>{children}</SettingsLayout>;
}
30 changes: 1 addition & 29 deletions apps/web/app/app.dub.co/(dashboard)/account/settings/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
import SettingsLayout from "@/ui/layout/settings-layout";
import { Gear2, Key, ShieldCheck } from "@dub/ui";
import { ReactNode } from "react";

export default function PersonalSettingsLayout({
children,
}: {
children: ReactNode;
}) {
const tabs = [
{
group: "",
tabs: [
{
name: "General",
icon: Gear2,
segment: null,
},
{
name: "Security",
icon: ShieldCheck,
segment: "security",
},
{
name: "API Keys",
icon: Key,
segment: "tokens",
},
],
},
];

return (
<SettingsLayout tabs={tabs} tabContainerClassName="top-[105px]">
{children}
</SettingsLayout>
);
return <SettingsLayout>{children}</SettingsLayout>;
}
21 changes: 6 additions & 15 deletions apps/web/app/app.dub.co/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
import { MainNav } from "@/ui/layout/main-nav";
import NavTabs from "@/ui/layout/nav-tabs";
import { HelpButtonRSC } from "@/ui/layout/sidebar/help-button-rsc";
import Toolbar from "@/ui/layout/toolbar/toolbar";
import UserSurveyPopup from "@/ui/layout/user-survey";
import { MaxWidthWrapper } from "@dub/ui";
import { constructMetadata } from "@dub/utils";
import { ReactNode, Suspense } from "react";
import { ReactNode } from "react";
import Providers from "../../providers";

export const dynamic = "force-static";
export const metadata = constructMetadata();

export default function Layout({ children }: { children: ReactNode }) {
export default async function Layout({ children }: { children: ReactNode }) {
return (
<Providers>
<div className="min-h-screen w-full bg-gray-50/80">
<div className="sticky -top-16 z-20 border-b border-gray-200 bg-white">
<MaxWidthWrapper>
<MainNav />
<Suspense fallback={<div className="h-12 w-full" />}>
<NavTabs />
</Suspense>
</MaxWidthWrapper>
</div>
{children}
<div className="min-h-screen w-full bg-white">
<MainNav toolContent={<HelpButtonRSC />}>{children}</MainNav>
</div>
<UserSurveyPopup />
{/* <ChangelogPopup /> */}
<Toolbar />
<Toolbar show={["onboarding"]} />
</Providers>
);
}
23 changes: 0 additions & 23 deletions apps/web/app/app.dub.co/(dashboard)/workspaces/page.tsx

This file was deleted.

Loading
Loading