[6.x] Inertia filesystems#18932
Conversation
| <template> | ||
| <AppLayout> | ||
| <Pane appearance="raised"> | ||
| <div class="grid gap-3"> |
There was a problem hiding this comment.
It's probably good to have a <FormFields> wrapper that defines the spacing, just so it's consistent everywhere and if it has to change it's only in 1 file, or have <Pane> be a grid by default
There was a problem hiding this comment.
Yeah, I'm planning to add a <craft-field-group/> component that will handle the spacing as well as the layout system for fields.
| @@ -0,0 +1,130 @@ | |||
| <script setup lang="ts"> | |||
There was a problem hiding this comment.
It might make sense to start putting pages in folders, for example pages/settings/filesystems/EditFilesystemPage.vue
Seb wrote a blog on how Spatie structures Inertia apps and there might be some ideas in there we could use as well.
For example if there are components needed just for filesystems we could put them in pages/settings/filesystems/components
There was a problem hiding this comment.
Opened #18964 to restructure things based on their opinions. I'll hopefully pull that in soon so we don't have too many PRs to rebase
| name="url" | ||
| :required="true" | ||
| placeholder="//example.com/path/to/folder" | ||
| data-error-key="url" |
There was a problem hiding this comment.
Do we always have to provide this or could we fall back to what's provided in name for example and only need to provide this when it's different than the input name?
There was a problem hiding this comment.
Yeah, we'll want something like that. I just haven't quite worked out exactly where we'll want the logic. data-error-key will likely be obsolete relatively soon (as far as I know it's only to link the error summary to the field itself).
We could create a useCraftField that would return all of these attributes. Ideally I'd like a place to centralize this logic so we don't have to worry (as much) about keeping all our fields up to date with things like this, and so we can make sure they all follow the same logic for setting those.
My other thought is to eventually have some kind of <CraftForm/> component that would look over the fields within it and makes sure they have everything we want.
Since I haven't quite figured that out, I've just been adding things manually for the moment.
Description
Related issues