-
Notifications
You must be signed in to change notification settings - Fork 277
feat: DBRowSidePanel global error boundary #856
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a global error boundary around the DBRowSidePanel drawer by splitting the component into an “inner” renderer and a “container” that handles the Drawer and error fallback.
- Added
DBRowSidePanelErrorBoundary
to encapsulate Drawer logic, state management, and render an error UI. - Refactored the original
DBRowSidePanel
into an inner component that receives a newsetSubDrawerOpen
prop. - Updated conditional rendering for loading, success, and error states, and removed legacy query‐param and resize logic from the inner panel.
Comments suppressed due to low confidence (2)
packages/app/src/components/DBRowSidePanel.tsx:1
- Several hooks and utilities used later (useState, useQueryState, parseAsStringEnum, useZIndex, useResizable) are not imported here. Please add those imports to avoid build errors.
import { createContext, Dispatch, SetStateAction, useCallback, useContext, useMemo,
packages/app/src/components/DBRowSidePanel.tsx:411
- [nitpick] Using
_
as a bound variable can be unclear. If you intend to ignore the first value, you can omit it via[, setQueryTab]
or give it a more descriptive name.
const [_, setQueryTab] = useQueryState(
8eeba39
to
688faaa
Compare
Restored this PR #856 which should be merged into main Co-authored-by: Ernest Iliiasov <20255948+ernestii@users.noreply.github.com>
Add a global error boundary to DBRowSidePanel.
In order to show the error boundary inside the drawer, I had to split the component into
"inner" and "drawer/container" sections.