Skip to content

Commit 83cdfda

Browse files
ken-zlaidavid-zlai
authored andcommitted
feature - left nav match (#217)
## Summary This PR updates the left navigation to align with the new structure in the Figma design. The updated order places **Home** at the top, followed by **your dataset entities**, and then **resources** at the bottom. In a future PR, I will add templates for the **Models**, **Groupbys**, and **Staging Queries** pages, including tabs for **Observability** and **Job Tracking**. Currently, these routes will result in a 404 error. ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update
1 parent 652760b commit 83cdfda

File tree

3 files changed

+49
-22
lines changed

3 files changed

+49
-22
lines changed

frontend/src/lib/components/NavigationBar/NavigationBar.svelte

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import IconExclamationTriangle from '~icons/heroicons/exclamation-triangle-16-solid';
3333
import IconMagnifyingGlass from '~icons/heroicons/magnifying-glass-16-solid';
3434
import IconUser from '~icons/heroicons/user';
35+
import IconSquaresSolid from '~icons/heroicons/squares-2x2-16-solid';
36+
import { Separator } from '$lib/components/ui/separator';
3537
3638
type Props = {
3739
navItems: Entity[];
@@ -113,19 +115,12 @@
113115
</span>
114116
{/if}
115117
</Button>
116-
<Button
117-
variant="ghost"
118-
class="mb-9 text-regular-medium"
119-
size="nav"
120-
href="https://docs.chronon.ai"
121-
target="_blank"
122-
rel="noopener noreferrer"
123-
icon="leading"
124-
>
125-
<IconDocumentText class="text-muted-icon-neutral" />
126-
<span class="text-muted-foreground">Chronon docs</span>
118+
<Button variant="ghost" class="text-regular-medium" size="nav" href="/" icon="leading">
119+
<IconSquaresSolid class="text-muted-icon-neutral" />
120+
<span class="text-muted-foreground">Home</span>
127121
</Button>
128-
<span class="mb-[10px] px-2 text-xs-medium text-muted-foreground">Observability</span>
122+
<Separator class="my-6" />
123+
<span class="mb-[10px] px-2 text-xs-medium text-muted-foreground">Datasets</span>
129124
<ul class="space-y-1 flex-grow">
130125
{#each navItems as item}
131126
<li>
@@ -143,7 +138,32 @@
143138
</li>
144139
{/each}
145140
</ul>
146-
<div class="flex items-center mt-auto">
141+
<Separator class="my-6" />
142+
<span class="mb-[10px] px-2 text-xs-medium text-muted-foreground">Resources</span>
143+
<Button
144+
variant="ghost"
145+
class="w-full text-regular-medium my-1"
146+
size="nav"
147+
href="https://docs.chronon.ai"
148+
target="_blank"
149+
rel="noopener noreferrer"
150+
icon="leading"
151+
>
152+
<IconDocumentText class="text-muted-icon-neutral" />
153+
<span class="text-muted-foreground">Chronon docs</span>
154+
</Button>
155+
<Button
156+
variant="ghost"
157+
class="w-full text-regular-medium my-1"
158+
size="nav"
159+
href="mailto:[email protected]"
160+
icon="leading"
161+
>
162+
<IconDocumentText class="text-muted-icon-neutral" />
163+
<span class="text-muted-foreground">Support</span>
164+
</Button>
165+
<Separator class="mt-6 mb-4" />
166+
<div class="flex items-center">
147167
<DropdownMenu>
148168
<DropdownMenuTrigger asChild let:builder>
149169
<Button variant="ghost" class="flex items-center cursor-pointer" builders={[builder]}>

frontend/src/lib/types/Entity/Entity.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import IconCube from '~icons/heroicons/cube-16-solid';
2-
import IconPuzzlePiece from '~icons/heroicons/puzzle-piece-16-solid';
32
import IconSquare3Stack3d from '~icons/heroicons/square-3-stack-3d-16-solid';
3+
import IconCubeTransparent from '~icons/heroicons/cube-transparent';
4+
import IconRectangleStack from '~icons/heroicons/rectangle-stack-16-solid';
45

56
export const entityConfig = [
67
{
@@ -9,17 +10,24 @@ export const entityConfig = [
910
icon: IconCube,
1011
id: 'models'
1112
},
12-
{
13-
label: 'GroupBys',
14-
path: '/groupbys',
15-
icon: IconPuzzlePiece,
16-
id: 'groupbys'
17-
},
1813
{
1914
label: 'Joins',
2015
path: '/joins',
2116
icon: IconSquare3Stack3d,
2217
id: 'joins'
18+
},
19+
{
20+
label: 'GroupBys',
21+
path: '/GroupBys',
22+
icon: IconRectangleStack,
23+
id: 'groupbys'
24+
},
25+
26+
{
27+
label: 'Staging Queries',
28+
path: '/StagingQueries',
29+
icon: IconCubeTransparent,
30+
id: 'stagingqueries'
2331
}
2432
] as const;
2533

frontend/src/routes/+layout.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
<NavigationSlider />
2424

2525
<!-- Left navigation -->
26-
<NavigationBar navItems={entityConfig.filter((entity) => entity.id === 'joins')} {user} />
27-
26+
<NavigationBar navItems={[...entityConfig]} {user} />
2827
<!-- Main content -->
2928
<main
3029
class="flex-1 flex flex-col overflow-hidden bg-neutral-100 relative rounded-tl-xl"

0 commit comments

Comments
 (0)