Draft
Conversation
Values aren't actually saving though
Use full entry types isntead of IDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening this as the Super Branch™ that we'll merge into while converting the UI over to inertia and Vue. A handful of branches have already made it into 6.x, but it's getting harder to make sure things don't break while work is in progress. Merging updates into this branch first will help insulate the main 6.x branch from at least front-end messes.
This brings some compatibility between the legacy javascript and our new inertia and Vue world. The result of all of this is a functional Section settings page which is initially rendered via Inertia but calls legacy code in order to render the slideouts and nested slideouts.
CleanShot.2026-04-08.at.14.33.30.mp4
CpAssetBundle
The
CpAssetBundleis now loaded in both the Inertia and Twig render paths. Twig works as it always has. On the Inertia side, theHandleInertiaRequestsmiddleware will register theCpAssetBundleand then inject theheadHtmlandbodyHtmlinto theapp.blade.phptemplate. That will throw the same oldCraftglobal variable you know and love onto the page. With the variable on the page, when thecp.jsfile gets loaded by its position inbodyHtmlit will populate the global variable with all the methods we've always had.This means you can call your
Craft.*Javascript just like you always have. The one caveat is that it's more possible than previously to create click handlers, etc. for content that will be loaded in after the fact.At the moment you have both the legacy
Craftglobal variable and the newCpvariable. Over time, we'll move methods and configuration fromCrafttoCp.Styling
Styling presented a bit of a challenge as we can have both old and new markup on a page at one time (if a slideout with legacy content is rendered for example). This can make styles a bit messy in some places, but I've done my best to isolate things.
The
TailwindResetAssetwill now only apply styles to.cp-legacy-reset, .slideout-container, .menu--disclosureand (almost) all legacy styles will only kick in when wrapped with a.cp-legacyclass.This falls down a bit for modals, menus, huds, etc. because we render those at the document root instead of in a container where we can add the
cp-legacyclass. Those styles are still applied globally for now.Potential Breaking Changes
{% js %}twig tags will now result in a<script type="module">tag. In theory, this shouldn't break anything because the load order will still be respected, but it is a shift.