From d4c2aa946481384b148fd7cf457acbc994429ddc Mon Sep 17 00:00:00 2001 From: Marcus Notheis Date: Thu, 12 Dec 2024 11:19:42 +0100 Subject: [PATCH] chore(examples): migrate remix to react-router 7 (#6725) --- .github/workflows/examples.yml | 2 +- .storybook/images/logo-react-router.svg | 23 + .storybook/images/logo-remix.svg | 45 - docs/ProjectTemplates.mdx | 30 +- .../{remix-ts => react-router-ts}/.gitignore | 1 + examples/react-router-ts/README.md | 45 + .../app/components/AppShell.tsx | 0 .../app/components/AppShellBar.module.css | 0 .../app/components/AppShellBar.tsx | 4 +- .../app/components/TodoList.tsx | 2 +- .../app/globals.css | 0 .../app/mockData/todos.ts | 0 examples/react-router-ts/app/root.tsx | 36 + examples/react-router-ts/app/routes.ts | 3 + .../app/routes/index.tsx} | 23 +- .../app/routes/todo.tsx} | 15 +- .../eslint.config.mjs | 2 +- .../package-lock.json | 9091 +++++------------ .../package.json | 34 +- .../public/favicon.ico | Bin .../react-router-ts/react-router.config.ts | 7 + .../tsconfig.json | 12 +- examples/react-router-ts/vite.config.ts | 7 + examples/remix-ts/README.md | 53 +- examples/remix-ts/app/entry.client.tsx | 22 - examples/remix-ts/app/entry.server.tsx | 130 - examples/remix-ts/app/root.tsx | 28 - examples/remix-ts/vite.config.ts | 10 - 28 files changed, 2977 insertions(+), 6648 deletions(-) create mode 100644 .storybook/images/logo-react-router.svg delete mode 100644 .storybook/images/logo-remix.svg rename examples/{remix-ts => react-router-ts}/.gitignore (69%) create mode 100644 examples/react-router-ts/README.md rename examples/{remix-ts => react-router-ts}/app/components/AppShell.tsx (100%) rename examples/{remix-ts => react-router-ts}/app/components/AppShellBar.module.css (100%) rename examples/{remix-ts => react-router-ts}/app/components/AppShellBar.tsx (95%) rename examples/{remix-ts => react-router-ts}/app/components/TodoList.tsx (95%) rename examples/{remix-ts => react-router-ts}/app/globals.css (100%) rename examples/{remix-ts => react-router-ts}/app/mockData/todos.ts (100%) create mode 100644 examples/react-router-ts/app/root.tsx create mode 100644 examples/react-router-ts/app/routes.ts rename examples/{remix-ts/app/routes/_index.tsx => react-router-ts/app/routes/index.tsx} (53%) rename examples/{remix-ts/app/routes/todos.$id.tsx => react-router-ts/app/routes/todo.tsx} (80%) rename examples/{remix-ts => react-router-ts}/eslint.config.mjs (96%) rename examples/{remix-ts => react-router-ts}/package-lock.json (55%) rename examples/{remix-ts => react-router-ts}/package.json (55%) rename examples/{remix-ts => react-router-ts}/public/favicon.ico (100%) create mode 100644 examples/react-router-ts/react-router.config.ts rename examples/{remix-ts => react-router-ts}/tsconfig.json (72%) create mode 100644 examples/react-router-ts/vite.config.ts delete mode 100644 examples/remix-ts/app/entry.client.tsx delete mode 100644 examples/remix-ts/app/entry.server.tsx delete mode 100644 examples/remix-ts/app/root.tsx delete mode 100644 examples/remix-ts/vite.config.ts diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 74eb3c2f6d7..86c7daf8923 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -20,7 +20,7 @@ jobs: path: - nextjs-app - nextjs-pages - - remix-ts + - react-router-ts - vite-ts fail-fast: false steps: diff --git a/.storybook/images/logo-react-router.svg b/.storybook/images/logo-react-router.svg new file mode 100644 index 00000000000..73284929d36 --- /dev/null +++ b/.storybook/images/logo-react-router.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.storybook/images/logo-remix.svg b/.storybook/images/logo-remix.svg deleted file mode 100644 index ad6b857518d..00000000000 --- a/.storybook/images/logo-remix.svg +++ /dev/null @@ -1,45 +0,0 @@ - - Remix Logo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/ProjectTemplates.mdx b/docs/ProjectTemplates.mdx index d18277ebdbc..5cf9c73b587 100644 --- a/docs/ProjectTemplates.mdx +++ b/docs/ProjectTemplates.mdx @@ -1,9 +1,9 @@ -import { Footer, ProjectTemplate, TableOfContent, LabelWithWrapping } from '@sb/components'; -import { Meta } from '@storybook/blocks'; -import { Link, FlexBox, FlexBoxJustifyContent, FlexBoxWrap, Label } from '@ui5/webcomponents-react'; +import { Footer, LabelWithWrapping, ProjectTemplate, TableOfContent } from '@sb/components'; import NextLogo from '@sb/images/logo-nextjs.svg'; +import ReactRouterLogo from '@sb/images/logo-react-router.svg'; import ViteLogo from '@sb/images/logo-vitejs.svg'; -import RemixLogo from '@sb/images/logo-remix.svg'; +import { Meta } from '@storybook/blocks'; +import { FlexBox, FlexBoxJustifyContent, FlexBoxWrap, Label } from '@ui5/webcomponents-react'; @@ -98,15 +98,10 @@ A curated list of minimal project templates and examples to get started using UI >