Skip to content

Commit

Permalink
Finalised the doc page migration to react-router
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Nov 12, 2024
1 parent 3b96f61 commit b0b8ca1
Show file tree
Hide file tree
Showing 34 changed files with 114 additions and 358 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can also track down hydration issues with the **Errors** tab and view your r

### Remix Development Tools

This repository used to be called Remix Development Tools, but we decided to rename it to react-router-devtools to better reflect the fact that it's a package for React Router v7+ and not just for Remix.
This repository used to be called remix-development-tools, but we decided to rename it to react-router-devtools to better reflect the fact that it's a package for React Router v7+ and not just for Remix.

If you're looking for the old version of this package, you can find it [here](https://github.com/forge42dev/Remix-Dev-Tools/tree/remix-development-tools).

Expand Down Expand Up @@ -66,7 +66,7 @@ react-router-devtools is open-source software released under the [MIT License](h

React Router Devtools was inspired by the React Router v7 and aims to enhance the development experience for React Router v7+ users.

Feel free to explore React Router Devtools, and we hope it significantly improves your Remix development process. If you encounter any issues or have suggestions for enhancements, please don't hesitate to open an issue on our GitHub repository. Happy Remixing!
Feel free to explore React Router Devtools, and we hope it significantly improves your React Router development process. If you encounter any issues or have suggestions for enhancements, please don't hesitate to open an issue on our GitHub repository. Happy Remixing!

## Thanks

Expand Down
6 changes: 3 additions & 3 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
ARG NODE_VERSION=20.10.0
FROM node:${NODE_VERSION}-slim as base

LABEL fly_launch_runtime="Remix"
LABEL fly_launch_runtime="React Router"

# Remix app lives here
# React router app lives here
WORKDIR /app

# Set production environment
Expand Down Expand Up @@ -42,4 +42,4 @@ COPY --from=build / /

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "node_modules/.bin/remix-serve", "./build/server/index.js" ]
CMD [ "node_modules/.bin/react-router-serve", "./build/server/index.js" ]
2 changes: 1 addition & 1 deletion docs/app/components/ThemeSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useFetcher } from 'react-router'

import { useTheme } from '~/hooks/useTheme'

export const RemixPWAThemeSwitcher = () => {
export const PWAThemeSwitcher = () => {
const fetcher = useFetcher()
const theme = useTheme()
const ref = useRef<HTMLButtonElement>(null)
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/layout/Documentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import clsx from 'clsx'
import redent from 'redent'
import type { MouseEvent } from 'react'

import { RemixPWAInfo as Info } from '~/components/plugins/Info'
import { RemixPWAWarn as Warn } from '~/components/plugins/Warn'
import { PWAInfo as Info } from '~/components/plugins/Info'
import { PWAWarn as Warn } from '~/components/plugins/Warn'
import SnippetGroup from '~/components/plugins/Snippet'
import Editor from '~/components/plugins/Editor'
import Heading from '~/components/plugins/Heading'
Expand Down
8 changes: 4 additions & 4 deletions docs/app/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ChevronDownIcon, RatioIcon, SearchIcon, XIcon } from 'lucide-react'
import { Disclosure, Menu, Transition } from '@headlessui/react'
import { useTransition, animated } from 'react-spring'

import { RemixPWAThemeSwitcher as ThemeSwitcher } from '~/components/ThemeSwitcher'
import { PWAThemeSwitcher as ThemeSwitcher } from '~/components/ThemeSwitcher'
import { useOnClickOutside } from '~/hooks/useOnClickOutside'
import type { MetadataType } from '~/utils/server/doc.server'
import { DEFAULT_TAG } from '~/utils/defatult'
Expand Down Expand Up @@ -312,9 +312,9 @@ export default function Header({
className="md:flex"
>
<RatioIcon className="mr-2 h-7 w-7 self-center text-center md:hidden" />
<span className="sr-only">Remix Dev Tools home page</span>
<span className="sr-only">React Router Devtools home page</span>
<p className="relative hidden font-space text-4xl text-slate-700 dark:text-sky-100 md:flex">
<span className="mr-2">Remix Dev Tools</span>
<span className="mr-2">React Router Devtools</span>
</p>
</Link>
{/* eslint-disable-next-line multiline-ternary */}
Expand Down Expand Up @@ -401,7 +401,7 @@ export default function Header({
<a
className="group"
aria-label="GitHub"
href="https://github.com/Code-Forge-Net/Remix-Dev-Tools"
href="https://github.com/Code-Forge-Net/react-router-devtools"
target="_blank"
rel="noreferrer"
>
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/plugins/Info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const RemixPWAInfo = ({ children, title = 'You should know!' }: any) => {
export const PWAInfo = ({ children, title = 'You should know!' }: any) => {
return (
<div className="my-8 flex rounded-3xl bg-sky-50 p-6 dark:bg-slate-950/60 dark:ring-1 dark:ring-slate-300/10">
<svg
Expand Down Expand Up @@ -72,5 +72,5 @@ export const RemixPWAInfo = ({ children, title = 'You should know!' }: any) => {
)
}

const Info = RemixPWAInfo
const Info = PWAInfo
export default Info
4 changes: 2 additions & 2 deletions docs/app/components/plugins/Summary.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode, JSX } from 'react'

export const RemixPWASummary = ({
export const PWASummary = ({
children,
title,
}: {
Expand All @@ -17,5 +17,5 @@ export const RemixPWASummary = ({
)
}

const Summary = RemixPWASummary
const Summary = PWASummary
export default Summary
4 changes: 2 additions & 2 deletions docs/app/components/plugins/Warn.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const RemixPWAWarn = ({
export const PWAWarn = ({
children,
title = 'Oh no! Something bad happened!',
}: any) => {
Expand Down Expand Up @@ -82,5 +82,5 @@ export const RemixPWAWarn = ({
)
}

const Warn = RemixPWAWarn
const Warn = PWAWarn
export default Warn
4 changes: 2 additions & 2 deletions docs/app/components/ui/navbar-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ export function Navbar({ className }: { className?: string }) {
</MenuItem>
<MenuItem setActive={setActive} active={active} item="Links">
<div className="flex flex-col space-y-4 text-sm">
<ExternalLink url="https://remix.run" text="Remix.run" />
<ExternalLink url="https://reactrouter.com/en/main" text="React Router" />
<ExternalLink
url="https://github.com/Code-Forge-Net/Remix-Dev-Tools"
url="https://github.com/forge42dev/react-router-devtools"
text="Github"
/>
<ExternalLink
Expand Down
17 changes: 7 additions & 10 deletions docs/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,24 @@ export default function handleRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
remixContext: EntryContext,
reactRouterContext: EntryContext,
loadContext: AppLoadContext
) {
return isBotRequest(request.headers.get('user-agent'))
? handleBotRequest(
request,
responseStatusCode,
responseHeaders,
remixContext
reactRouterContext
)
: handleBrowserRequest(
request,
responseStatusCode,
responseHeaders,
remixContext
reactRouterContext
)
}

// We have some Remix apps in the wild already running with isbot@3 so we need
// to maintain backwards compatibility even though we want new apps to use
// isbot@4. That way, we can ship this as a minor Semver update to @remix-run/dev.
function isBotRequest(userAgent: string | null) {
if (!userAgent) {
return false
Expand All @@ -55,13 +52,13 @@ function handleBotRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
remixContext: EntryContext
reactRouterContext: EntryContext
) {
return new Promise((resolve, reject) => {
let shellRendered = false
const { abort, pipe } = renderToPipeableStream(
<ServerRouter
context={remixContext}
context={reactRouterContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
Expand Down Expand Up @@ -105,13 +102,13 @@ function handleBrowserRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
remixContext: EntryContext
reactRouterContext: EntryContext
) {
return new Promise((resolve, reject) => {
let shellRendered = false
const { abort, pipe } = renderToPipeableStream(
<ServerRouter
context={remixContext}
context={reactRouterContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
Expand Down
59 changes: 0 additions & 59 deletions docs/app/entry.worker.ts

This file was deleted.

4 changes: 2 additions & 2 deletions docs/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export const meta: MetaFunction<typeof loader> = () => {
return [
{
property: 'og:site_name',
content: 'Remix Development Tools',
content: 'React Router Devtools',
},
{
property: 'og:title',
content: 'Remix Development Tools Documentation',
content: 'React Router Devtools Documentation',
},
{
property: 'og:image',
Expand Down
8 changes: 4 additions & 4 deletions docs/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Index() {

<LampContainer>
<h1 className="bg-opacity-50 bg-gradient-to-b from-neutral-50 to-neutral-400 bg-clip-text text-center text-4xl font-bold !leading-normal text-transparent md:text-7xl">
Own <br /> your <span className="mr-4 text-green-500"> Remix</span>
Own <br /> your <span className="mr-4 text-green-500"> React Router</span>
application
</h1>
</LampContainer>
Expand All @@ -41,19 +41,19 @@ export default function Index() {
title: 'Raphaël Moreau',
name: 'Software Engineer',
quote:
'Remix dev tools are really helpful when I struggle with something that doesn’t work as I expect. You have everything you need to debug right in your browser (really helpful when I can’t use a second monitor). The features I can’t work without are the active page data with the loader/action data and the server responses (no need to search for a console.log in the terminal or the browser console) and the error tab with the hydration mismatch view 🔥. (I love everything but it would be suspicious if I listed it all)',
'React Router Devtools are really helpful when I struggle with something that doesn’t work as I expect. You have everything you need to debug right in your browser (really helpful when I can’t use a second monitor). The features I can’t work without are the active page data with the loader/action data and the server responses (no need to search for a console.log in the terminal or the browser console) and the error tab with the hydration mismatch view 🔥. (I love everything but it would be suspicious if I listed it all)',
},
{
title: 'Alem Tuzlak',
name: 'The guy who created this',
quote:
'Remix development tools is the best tool I have created so far. You should definitely try it out in your Remix project and this is not a paid testimonial 😂',
'React Router Devtools is the best tool I have created so far. You should definitely try it out in your React Router project and this is not a paid testimonial 😂',
},
{
title: 'xHomu',
name: 'Software Engineer',
quote:
"From hydration error to hunting down nested routes, with RDT, the solution to the worst Remix pain points is always just a click away. Don't build a Remix app without it! ",
"From hydration error to hunting down nested routes, with RDT, the solution to the worst React Router pain points is always just a click away. Don't build a React Router app without it! ",
},
]}
/>
Expand Down
4 changes: 2 additions & 2 deletions docs/fly.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# fly.toml app configuration file generated for remix-development-tools on 2024-03-09T20:07:33+01:00
# fly.toml app configuration file generated for react-router-devtools on 2024-03-09T20:07:33+01:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'remix-development-tools'
app = 'react-router-devtools'
primary_region = 'lhr'

[build]
Expand Down
Loading

0 comments on commit b0b8ca1

Please sign in to comment.