Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaAmega committed Dec 5, 2024
1 parent 984fc66 commit b1be9f7
Show file tree
Hide file tree
Showing 27 changed files with 47 additions and 47 deletions.
5 changes: 0 additions & 5 deletions ui/service/src/_routes/src/dashboard/import.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions ui/service/src/_routes/src/home/import.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions ui/service/src/_routes/src/project/import.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions ui/service/src/_routes/src/projects-list/import.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions ui/service/src/_routes/src/reports-list/import.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions ui/service/src/_routes/src/snapshot-view/import.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions ui/service/src/_routes/src/test-suites-list/import.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion ui/service/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CssBaseline, ThemeProvider } from 'evidently-ui-lib/shared-dependencies
import { RouterProvider } from 'evidently-ui-lib/shared-dependencies/react-router-dom'
import { theme } from 'evidently-ui-lib/theme/index'
// import { router } from './Routes'
import { _router as router } from './_routes/router'
import { router } from './routes/router'

import './index.css'

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ export const routes = [
}
] as const satisfies RouteExtended[]

export const _router = createBrowserRouter(
export const router = createBrowserRouter(
routes.map(decorateTopLevelRoutes).map((r) => decorateAllRoutes(r))
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { GetParams, LoaderSpecialArgs } from 'evidently-ui-lib/router-utils/types'
import type { CrumbDefinition } from 'evidently-ui-lib/router-utils/utils'

import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { useRouteParams } from 'evidently-ui-lib/router-utils/hooks'
import {
Expand Down
5 changes: 5 additions & 0 deletions ui/service/src/routes/src/dashboard/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// export * as Dashboard from '~/routes/src/dashboard/dashboard-main'

// we export it lazy because of ~2.6 MB chunk size :) plotly.js is too big :3
const lazy = () => import('~/routes/src/dashboard/dashboard-main')
export const DashboardLazy = { lazy } as const
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getVersion } from 'evidently-ui-lib/routes-components/home/data'
import { Box } from 'evidently-ui-lib/shared-dependencies/mui-material'
import { Outlet, ScrollRestoration } from 'evidently-ui-lib/shared-dependencies/react-router-dom'

import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { useCrumbsFromHandle, useRouteParams } from 'evidently-ui-lib/router-utils/hooks'
import type { CrumbDefinition } from 'evidently-ui-lib/router-utils/utils'
Expand Down
4 changes: 4 additions & 0 deletions ui/service/src/routes/src/home/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * as Home from '~/routes/src/home/home-main'

// const lazy = () => import('~/routes/src/home/home-main')
// export const Home = { lazy } as const
4 changes: 4 additions & 0 deletions ui/service/src/routes/src/project/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * as Project from '~/routes/src/project/project-main'

// const lazy = () => import('~/routes/src/project/project-main')
// export const Project = { lazy } as const
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import { Outlet } from 'evidently-ui-lib/shared-dependencies/react-router-dom'

import { ContentCopy as ContentCopyIcon } from 'evidently-ui-lib/shared-dependencies/mui-icons-material'

import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { useRouteParams } from 'evidently-ui-lib/router-utils/hooks'
import { RouterLink, useMatchRouter } from '~/_routes/components'
import { clientAPI } from '~/api'
import { RouterLink, useMatchRouter } from '~/routes/components'

///////////////////
// ROUTE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { ProjectModel } from 'evidently-ui-lib/api/types'
import type { StrictID } from 'evidently-ui-lib/api/types/utils'
import { AddNewProjectButton, ProjectCard } from 'evidently-ui-lib/components/ProjectCard'
import { useState } from 'react'
import { useSubmitFetcher } from '~/_routes/fetchers'
import { useSubmitFetcher } from '~/routes/fetchers'

import { useOnSubmitEnd } from 'evidently-ui-lib/router-utils/hooks'
import { RouterLink } from '~/_routes/components'
import { RouterLink } from '~/routes/components'
import type { CurrentRoute } from './projects-list-main'

export const ProjectCardWrapper = ({ project }: { project: StrictID<ProjectModel> }) => {
Expand Down
4 changes: 4 additions & 0 deletions ui/service/src/routes/src/projects-list/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * as ProjectsList from '~/routes/src/projects-list/projects-list-main'

// const lazy = () => import('~/routes/src/projects-list/projects-list-main')
// export const ProjectsList = { lazy } as const
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from 'evidently-ui-lib/routes-components/projectsList/data'
import { Box, Grid, Typography } from 'evidently-ui-lib/shared-dependencies/mui-material'

import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { clientAPI } from '~/api'

Expand Down
4 changes: 4 additions & 0 deletions ui/service/src/routes/src/reports-list/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * as ReportsList from '~/routes/src/reports-list/reports-list-main'

// const lazy = () => import('~/routes/src/projects-list/projects-list-main')
// export const Reports = { lazy } as const
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { GetParams, LoaderSpecialArgs } from 'evidently-ui-lib/router-utils/types'

import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { clientAPI } from '~/api'

Expand All @@ -10,8 +10,8 @@ import {
getReports,
getSnapshotsActionSpecial
} from 'evidently-ui-lib/routes-components/snapshots/data'
import { RouterLink } from '~/_routes/components'
import { useSubmitFetcher } from '~/_routes/fetchers'
import { RouterLink } from '~/routes/components'
import { useSubmitFetcher } from '~/routes/fetchers'

///////////////////
// ROUTE
Expand Down
5 changes: 5 additions & 0 deletions ui/service/src/routes/src/snapshot-view/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// export * as SnapshotId from '~/routes/src/snapshot-view/snapshot-view-main'

// we export it lazy because of ~2.6 MB chunk size :) plotly.js is too big :3
const lazy = () => import('~/routes/src/snapshot-view/snapshot-view-main')
export const SnapshotIdLazy = { lazy } as const
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { useRouteParams } from 'evidently-ui-lib/router-utils/hooks'
import type { GetParams, LoaderSpecialArgs } from 'evidently-ui-lib/router-utils/types'
Expand Down
4 changes: 4 additions & 0 deletions ui/service/src/routes/src/test-suites-list/import.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * as TestSuitesList from '~/routes/src/test-suites-list/test-suites-list-main'

// const lazy = () => import('~/routes/src/projects-list/projects-list-main')
// export const Reports = { lazy } as const
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { GetParams, LoaderSpecialArgs } from 'evidently-ui-lib/router-utils/types'

import type { GetRouteByPath } from '~/_routes/types'
import type { GetRouteByPath } from '~/routes/types'

import { clientAPI } from '~/api'

Expand All @@ -10,8 +10,8 @@ import {
getSnapshotsActionSpecial,
getTestSuites
} from 'evidently-ui-lib/routes-components/snapshots/data'
import { RouterLink } from '~/_routes/components'
import { useSubmitFetcher } from '~/_routes/fetchers'
import { RouterLink } from '~/routes/components'
import { useSubmitFetcher } from '~/routes/fetchers'

///////////////////
// ROUTE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GetMatches } from 'evidently-ui-lib/router-utils/types'
import type { routes } from '~/_routes/router'
import type { routes } from '~/routes/router'

export type Routes = GetMatches<typeof routes>

Expand Down

0 comments on commit b1be9f7

Please sign in to comment.