Skip to content

[6.x] Inertia filesystems#18932

Draft
brianjhanson wants to merge 1 commit into
6.xfrom
feature/inertia-filesystems
Draft

[6.x] Inertia filesystems#18932
brianjhanson wants to merge 1 commit into
6.xfrom
feature/inertia-filesystems

Conversation

@brianjhanson
Copy link
Copy Markdown
Contributor

Description

Related issues

@brianjhanson brianjhanson changed the title Feature/inertia filesystems [6.x] Inertia filesystems May 20, 2026
<template>
<AppLayout>
<Pane appearance="raised">
<div class="grid gap-3">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Base automatically changed from feature/inertia-ui to 6.x May 26, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants