-
Notifications
You must be signed in to change notification settings - Fork 2
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: add disclosure for settings #451
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @seaerchin and the rest of your teammates on Graphite |
ed4c094
to
3722911
Compare
3722911
to
a55d173
Compare
a55d173
to
a9dfeb5
Compare
a9dfeb5
to
832c3a8
Compare
832c3a8
to
d1e8ab5
Compare
d1e8ab5
to
8deb8ef
Compare
fd437e7
to
5d20ce2
Compare
import { AdminCmsSidebarLayout } from "~/templates/layouts/AdminCmsSidebarLayout" | ||
import { trpc } from "~/utils/trpc" | ||
|
||
const folderPageSchema = z.object({ | ||
siteId: z.coerce.number(), | ||
folderId: z.coerce.number(), | ||
siteId: z.string(), |
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.
should this continue to be int? since schema is still an int.
folderId can be string because folder's id is bigint.
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.
wa actually i changed it to string
here - i agree with the reasoning you gave that the bigint
is just to autoincrement automatically for id, but on the frontend we can just treat as a string since we'll never interact with it.
i think changing to string
here is ok - i'll have a PR to change number -> string later on wdyt?
siteId: parseInt(siteId), | ||
resourceId: parseInt(folderId), |
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 should refrain from all the casting and transformations imo. easy to desync or lose reasoning on why the types are the way they are. as discussed offline, since we do not actually do any arithmetic on the resource ids, we technically can keep them in their expected types: siteId: int, resourceId: string. Server should be able to pass them to the query without any transformations too
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.
i agree. how do we feel about a PR later on to tidy these types since they are unlikely to change? i want to do a 1 shot change rather than in phases so that post change, it's easier to reference and take code
apps/studio/src/pages/sites/[siteId]/folders/[folderId]/index.tsx
Outdated
Show resolved
Hide resolved
apps/studio/src/pages/sites/[siteId]/folders/[folderId]/index.tsx
Outdated
Show resolved
Hide resolved
apps/studio/src/pages/sites/[siteId]/folders/[folderId]/index.tsx
Outdated
Show resolved
Hide resolved
apps/studio/src/pages/sites/[siteId]/folders/[folderId]/index.tsx
Outdated
Show resolved
Hide resolved
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.
lgtm after you fix ci
494b935
to
54257cb
Compare
54257cb
to
18d0b58
Compare
Merge activity
|
37f80d5
to
54f2dc0
Compare
TL;DR
This PR introduces a folder settings modal in the folder page.
What changed?
Modal
,Input
,FormControl
, etc.useDisclosure
hook.FolderSettingsModal
component for folder settings.useZodForm
for form handling and validation.How to test?
Folder settings
button.Save changes
and verify if the changes are reflected.Why make this change?
This change adds the ability to edit the folder title and permalink directly from the folder page, enhancing the user experience by providing a straightforward way to manage folder settings.
Screen.Recording.2024-08-07.at.5.47.04.PM.mov