-
Notifications
You must be signed in to change notification settings - Fork 35
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
✨ Workspace #140
✨ Workspace #140
Conversation
Your Render PR Server URL is https://ozone-staging-pr-140.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cpuo2vrv2p9s73a9b51g. |
Your Render PR Server URL is https://ozone-sandbox-pr-140.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cpuo30jv2p9s73a9b5ag. |
const { data: workspaceList } = useWorkspaceList() | ||
const { mutate: addToWorkspace } = useWorkspaceAddItemsMutation() | ||
const { mutate: removeFromWorkspace } = useWorkspaceRemoveItemsMutation() | ||
const isInWorkspace = workspaceList?.find((uri) => uri === item.post.uri) |
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.
Just for convenience!
const isInWorkspace = workspaceList?.find((uri) => uri === item.post.uri) | |
const isInWorkspace = workspaceList?.includes(item.post.uri) |
@@ -0,0 +1,20 @@ | |||
import { usePathname, useSearchParams, useRouter } from 'next/navigation' | |||
|
|||
export const useWorkspaceOpener = () => { |
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.
Nice!
.catch(() => { | ||
statusBySubject[subject] = null |
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.
This is another place a developer error could disappear into the void. Up to you, but I am still a proponent for ensuring they get logged. It's no problem when the error is something we expect like a network error, but when it's an unanticipated programmer error it's nice for those to be detectable.
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.
Logging with console.error
now
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.
Looks good! This will be great. We should just see what's going on with that failing test suite.
@@ -1,6 +1,9 @@ | |||
/** @type {import('next').NextConfig} */ | |||
const nextConfig = { | |||
reactStrictMode: true, | |||
experimental: { | |||
missingSuspenseWithCSRBailout: false, |
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.
We are already wrapping some pages in suspense boundary but there's really no issue not wrapping them so turning this off is fine.
@@ -31,7 +31,7 @@ | |||
"eslint-config-next": "13.4.8", | |||
"kbar": "^0.1.0-beta.45", | |||
"lande": "^1.0.10", | |||
"next": "14.0.1", | |||
"next": "14.2.5", |
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.
In latest version, they fixed an issue that would cause rsc requests to fail when useSearchParams
is used in a component that is rendered in the page. we never had this issue until we had to pass useSearchParams at the top level.
This PR adds a globally available workspace that allows viewing and actioning subjects in bulk.
Screen.Recording.2024-07-26.at.13.05.40.mov
Screen.Recording.2024-07-26.at.13.03.43.mov