Skip to content

Commit

Permalink
chore(ui): rearrange nav
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-rasmussen committed Nov 27, 2024
1 parent dc7e949 commit 654a059
Showing 1 changed file with 44 additions and 58 deletions.
102 changes: 44 additions & 58 deletions weave-js/src/components/FancyPage/useProjectSidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ export const useProjectSidebar = (
label: 'Models',
isShown: isShowAll,
},
{
type: 'button' as const,
name: 'Overview',
slug: 'overview',
isShown: !isWeaveOnly,
isDisabled: false,
iconName: IconNames.Info,
},
{
type: 'button' as const,
name: 'Workspace',
Expand Down Expand Up @@ -94,7 +86,7 @@ export const useProjectSidebar = (
type: 'button' as const,
name: 'Reports',
slug: 'reportlist',
isShown: !isWeaveOnly,
isShown: isModelsOnly,
isDisabled: viewingRestricted,
iconName: IconNames.Report,
},
Expand All @@ -106,21 +98,26 @@ export const useProjectSidebar = (
iconName: IconNames.VersionsLayers,
isDisabled: viewingRestricted,
},
{
type: 'button' as const,
name: 'Overview',
slug: 'overview',
isShown: isModelsOnly,
iconName: IconNames.Info,
},
{
type: 'menuPlaceholder' as const,
isShown: isShowAll,
key: 'moreModels',
menu: ['charts', 'jobs', 'automations', 'sweeps', 'artifacts'],
menu: [
'jobs',
'automations',
'sweeps',
'reportlist',
'artifacts',
'overview',
],
},
// Remember to hide weave if env is not prod
// {
// type: 'button' as const,
// name: 'Weave',
// slug: 'weave',
// isShown: !showWeaveSidebarItems,
// iconName: IconNames.CodeAlt,
// isDisabled: viewingRestricted,
// },
{
type: 'divider' as const,
key: 'dividerModelsWeave',
Expand All @@ -138,11 +135,6 @@ export const useProjectSidebar = (
isShown: showWeaveSidebarItems || isShowAll,
iconName: IconNames.LayoutTabs,
},
{
type: 'divider' as const,
key: 'dividerWithinWeave-1',
isShown: isWeaveOnly,
},
{
type: 'button' as const,
name: 'Evals',
Expand All @@ -152,86 +144,80 @@ export const useProjectSidebar = (
},
{
type: 'button' as const,
name: 'Leaders',
slug: 'weave/leaderboards',
isShown: isWeaveOnly,
iconName: IconNames.BenchmarkSquare,
},
// Hiding until we want to release
{
type: 'button' as const,
name: 'Scorers',
slug: 'weave/scorers',
isShown: isWeaveOnly,
iconName: IconNames.TypeNumberAlt,
},
{
type: 'divider' as const,
key: 'dividerWithinWeave-2',
isShown: isWeaveOnly,
name: 'Playground',
slug: 'weave/playground',
isShown: showWeaveSidebarItems || isShowAll,
iconName: IconNames.RobotServiceMember,
},
{
type: 'button' as const,
name: 'Prompts',
slug: 'weave/prompts',
isShown: showWeaveSidebarItems || isShowAll,
isShown: showWeaveSidebarItems,
iconName: IconNames.ForumChatBubble,
},
{
type: 'button' as const,
name: 'Models',
slug: 'weave/models',
isShown: showWeaveSidebarItems || isShowAll,
isShown: showWeaveSidebarItems,
iconName: IconNames.Model,
},
{
type: 'button' as const,
name: 'Datasets',
slug: 'weave/datasets',
isShown: showWeaveSidebarItems || isShowAll,
isShown: showWeaveSidebarItems,
iconName: IconNames.Table,
},
{
type: 'divider' as const,
key: 'dividerWithinWeave-3',
type: 'button' as const,
name: 'Scorers',
slug: 'weave/scorers',
isShown: isWeaveOnly,
iconName: IconNames.TypeNumberAlt,
},
{
type: 'button' as const,
name: 'Leaders',
slug: 'weave/leaderboards',
isShown: false, // Only shown in overflow menu
iconName: IconNames.BenchmarkSquare,
},
{
type: 'button' as const,
name: 'Ops',
slug: 'weave/operations',
additionalSlugs: ['weave/op-versions'],
isShown: isWeaveOnly,
isShown: false, // Only shown in overflow menu
iconName: IconNames.JobProgramCode,
},
{
type: 'button' as const,
name: 'Objects',
slug: 'weave/objects',
additionalSlugs: ['weave/object-versions'],
isShown: isWeaveOnly,
isShown: false, // Only shown in overflow menu
iconName: IconNames.CubeContainer,
},
{
type: 'button' as const,
name: 'Playground',
slug: 'weave/playground',
type: 'menuPlaceholder' as const,
key: 'moreWeaveOnly',
isShown: isWeaveOnly,
iconName: IconNames.RobotServiceMember,
menu: ['weave/leaderboards', 'weave/operations', 'weave/objects'],
},
{
type: 'menuPlaceholder' as const,
// name: 'More',
// slug: 'moreWeave',
key: 'moreWeave',
key: 'moreWeaveBoth',
isShown: isShowAll,
// iconName: IconNames.OverflowHorizontal,
menu: [
'weave/leaderboards',
'weave/prompts',
'weave/models',
'weave/datasets',
'weave/scorers',
'weave/leaderboards',
'weave/operations',
'weave/objects',
'weave/playground',
],
},
];
Expand Down

0 comments on commit 654a059

Please sign in to comment.