-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react): add DevMode #470
Conversation
🦋 Changeset detectedLatest commit: 4e05229 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #470 +/- ##
==========================================
- Coverage 81.37% 74.11% -7.27%
==========================================
Files 25 29 +4
Lines 392 452 +60
Branches 84 110 +26
==========================================
+ Hits 319 335 +16
- Misses 63 98 +35
- Partials 10 19 +9
|
First of all, I'm sorry for the late confirmation. In my case, I understood by looking at the code, but from the user's point of view, there seems to be something that needs to be improved by showing documents and example cases. From my understanding,
is that right? I think And assuming that we usually use developer tools, I think we only declared it once at the top and tested the development environment using only that tool. But now that user only can control each by calling First of all, I think that if I understand what I meant, it would give me a great DX. |
And visualization app is also production, user can't see Devmode 😢 |
Note to remember idea: how about make each Suspense, ErrorBoundary contain DevMode |
fix: #446 # Overview <!-- A clear and concise description of what this pr is about. --> @okinawaa @minsoo-web I want to add new feature `DevMode` in @suspensive/react or in new package @suspensive/react-devtools Before add new feature, I want discuss this without explaining it. because I want to make DevMode's user understand it easily without studying ```tsx 'use client' import type { ErrorBoundaryFallbackProps } from '@suspensive/react' import { DevMode, ErrorBoundary, Suspense, devMode } from '@suspensive/react' import { Area, Box, Button, Spinner } from '~/components/uis' export default function Page() { return ( <Area title="devMode"> <Area title="<Suspense devMode={{ showFallback: true }} />"> <Suspense fallback={<Spinner />} devMode={{ showFallback: true }}> <Box.Success>children</Box.Success> </Suspense> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: true }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: true }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: { after: 2000 } }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: { after: 2000 } }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> </Area> ) } const ErrorBoundaryFallback = ({ error, reset }: ErrorBoundaryFallbackProps) => ( <Box.Error> {error.message} <Button onClick={reset}>↻</Button> </Box.Error> ) ``` ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --------- Co-authored-by: Minsoo Kim <[email protected]>
fix: #446 # Overview <!-- A clear and concise description of what this pr is about. --> @okinawaa @minsoo-web I want to add new feature `DevMode` in @suspensive/react or in new package @suspensive/react-devtools Before add new feature, I want discuss this without explaining it. because I want to make DevMode's user understand it easily without studying ```tsx 'use client' import type { ErrorBoundaryFallbackProps } from '@suspensive/react' import { DevMode, ErrorBoundary, Suspense, devMode } from '@suspensive/react' import { Area, Box, Button, Spinner } from '~/components/uis' export default function Page() { return ( <Area title="devMode"> <Area title="<Suspense devMode={{ showFallback: true }} />"> <Suspense fallback={<Spinner />} devMode={{ showFallback: true }}> <Box.Success>children</Box.Success> </Suspense> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: true }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: true }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: { after: 2000 } }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: { after: 2000 } }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> </Area> ) } const ErrorBoundaryFallback = ({ error, reset }: ErrorBoundaryFallbackProps) => ( <Box.Error> {error.message} <Button onClick={reset}>↻</Button> </Box.Error> ) ``` ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests. ---------
fix: #446 # Overview <!-- A clear and concise description of what this pr is about. --> @okinawaa @minsoo-web I want to add new feature `DevMode` in @suspensive/react or in new package @suspensive/react-devtools Before add new feature, I want discuss this without explaining it. because I want to make DevMode's user understand it easily without studying ```tsx 'use client' import type { ErrorBoundaryFallbackProps } from '@suspensive/react' import { DevMode, ErrorBoundary, Suspense, devMode } from '@suspensive/react' import { Area, Box, Button, Spinner } from '~/components/uis' export default function Page() { return ( <Area title="devMode"> <Area title="<Suspense devMode={{ showFallback: true }} />"> <Suspense fallback={<Spinner />} devMode={{ showFallback: true }}> <Box.Success>children</Box.Success> </Suspense> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: true }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: true }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: { after: 2000 } }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: { after: 2000 } }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> </Area> ) } const ErrorBoundaryFallback = ({ error, reset }: ErrorBoundaryFallbackProps) => ( <Box.Error> {error.message} <Button onClick={reset}>↻</Button> </Box.Error> ) ``` ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --------- Co-authored-by: Minsoo Kim <[email protected]>
fix: #446 # Overview <!-- A clear and concise description of what this pr is about. --> @okinawaa @minsoo-web I want to add new feature `DevMode` in @suspensive/react or in new package @suspensive/react-devtools Before add new feature, I want discuss this without explaining it. because I want to make DevMode's user understand it easily without studying ```tsx 'use client' import type { ErrorBoundaryFallbackProps } from '@suspensive/react' import { DevMode, ErrorBoundary, Suspense, devMode } from '@suspensive/react' import { Area, Box, Button, Spinner } from '~/components/uis' export default function Page() { return ( <Area title="devMode"> <Area title="<Suspense devMode={{ showFallback: true }} />"> <Suspense fallback={<Spinner />} devMode={{ showFallback: true }}> <Box.Success>children</Box.Success> </Suspense> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: true }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: true }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> <Area title="<ErrorBoundary devMode={{ showFallback: { after: 2000 } }} />"> <ErrorBoundary fallback={ErrorBoundaryFallback} devMode={{ showFallback: { after: 2000 } }}> <Box.Default>children</Box.Default> </ErrorBoundary> </Area> </Area> ) } const ErrorBoundaryFallback = ({ error, reset }: ErrorBoundaryFallbackProps) => ( <Box.Error> {error.message} <Button onClick={reset}>↻</Button> </Box.Error> ) ``` ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --------- Co-authored-by: Minsoo Kim <[email protected]>
fix: #446
Overview
@okinawaa @minsoo-web I want to add new feature
DevMode
in @suspensive/react or in new package @suspensive/react-devtoolsBefore add new feature, I want discuss this without explaining it. because I want to make DevMode's user understand it easily without studying
PR Checklist