Skip to content

[6.x] Inertia route settings#18927

Draft
riasvdv wants to merge 11 commits into
feature/inertia-uifrom
feature/inertia-route-settings
Draft

[6.x] Inertia route settings#18927
riasvdv wants to merge 11 commits into
feature/inertia-uifrom
feature/inertia-route-settings

Conversation

@riasvdv
Copy link
Copy Markdown
Contributor

@riasvdv riasvdv commented May 20, 2026

Description

Ports the route settings page to Inertia

I've decided to not port it in the same way with the edit happening in a modal, this isn't really a pattern used anywhere else in the control panel.

This ports the edit screen to a normal Inertia page with a form, which we can render in a slideout once that functionality is implemented.

riasvdv added 10 commits May 20, 2026 15:26
# Conflicts:
#	resources/build/assets/AdminTable-BaWDz4rn.js
#	resources/build/assets/Badge-DpS_C1p3.js
#	resources/build/assets/CpGlobalSidebar-CwLSFqmn.js
#	resources/build/assets/CpGlobalSidebar-D3tqrxar.js
#	resources/build/assets/CpGlobalSidebar-Dad7OYRX.js
#	resources/build/assets/CpQueueIndicator-BIIoBttd.js
#	resources/build/assets/CpQueueIndicator-Bn6InNNP.js
#	resources/build/assets/CpQueueIndicator-Z5fWxzKz.js
#	resources/build/assets/CraftInput-Diy-IcJh.js
#	resources/build/assets/CraftInputHandle-DC3oqA7Q.js
#	resources/build/assets/DeleteSiteModal-BcQpmR0f.js
#	resources/build/assets/DynamicHtmlRenderer-C36QxfOD.js
#	resources/build/assets/EntryTypesController-CFx2poSn.js
#	resources/build/assets/GraphQlSchemasPage-13Oak1St.js
#	resources/build/assets/GraphQlTokensPage-BLthOlOS.js
#	resources/build/assets/InlineFlash-Mr7imUWg.js
#	resources/build/assets/InputCombobox-DAgXLrVb.js
#	resources/build/assets/Modal-C3z5Gb2R.js
#	resources/build/assets/SectionsController-BQdhSguM.js
#	resources/build/assets/SectionsController-DXvTOXL3.js
#	resources/build/assets/SectionsController-hmgeYlcK.js
#	resources/build/assets/Select-BaRh7IFc.js
#	resources/build/assets/SettingsFieldsIndexPage-C5hm_gWn.js
#	resources/build/assets/SettingsFilesystemsIndexPage-BwXG7dOT.js
#	resources/build/assets/UserGroupsController-CSpl-KnZ.js
#	resources/build/assets/UtilitiesShowPage-A8JIeXgI.js
#	resources/build/assets/VolumesController-BjAWrNHV.js
#	resources/build/assets/VolumesController-CoajQ-Mw.js
#	resources/build/assets/VolumesController-DqjDlCi_.js
#	resources/build/assets/_plugin-vue_export-helper-mF6LBIZ_.js
#	resources/build/assets/cp-Ck7FKPK5.css
#	resources/build/assets/decorate-BM_SnROF.js
#	resources/build/assets/decorate-BqdY79kW.js
#	resources/build/assets/decorate-DQXQhzse.js
#	resources/build/assets/keyboard-B8LrfiOo.js
#	resources/build/assets/keyboard-LXOg_7gc.js
#	resources/build/assets/keyboard-suU_xNs9.js
#	resources/build/assets/nav-item.ts-M5J4cS0U.js
#	resources/build/assets/transformBooleanOptions-EOyV07RD.js
#	resources/build/assets/useFetch-CmOkdaaH.js
#	resources/build/assets/useInputGenerator-C97rdGdo.js
#	resources/build/assets/useServerSort-Di1sY1yR.js
#	resources/build/assets/useSettingsSave-BLqVG46P.js
#	resources/build/assets/useSettingsSave-CXH8py4m.js
#	resources/build/assets/useSettingsSave-DregJRb-.js
#	resources/build/manifest.json
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.

This is mostly a strict port of the legacy MixedInput component, it works but I'm not 100% confident on how idiomatic Vue this is

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.

I extended this to make it possible to pass in actionMenuItems (in this case a "Delete" action) which show up next to the save button

Copy link
Copy Markdown
Contributor Author

@riasvdv riasvdv May 21, 2026

Choose a reason for hiding this comment

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

This was crashing the browser when used on the Routes index, I don't exactly know why it was crashing but Codex made these changes to memoize or delay some things and now it's not crashing.

</template>
</ActionMenu>
</craft-button-group>
v-if="formAdditionalActions?.length"
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.

Added an extra ActionMenu here

Comment on lines +52 to +55
.optimistic<{routes: Array<RouteIndexData>}>(() => {
return {
routes,
};
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.

First time I used Inertia optimistic, but a pretty good use-case for it 😄

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.

1 participant