- Issue created by @slucero
- First commit to issue fork.
- Merge request !108Issue #3386854: Attach JSON Editor Theme Assets Using Library Attachments → (Merged) created by krisahil
- 🇺🇸United States krisahil
@slucero, I started work to support these changes. The MR, as it stands now, loads the JSON Editor theme assets as a Drupal library, using
#attached
, instead of manually adding the scripts and styles to the DOM. On one site, this change has made loading the CSS and JS much more reliable (the manual method loaded CSS and JS in unpredictable order, which led to race conditions, evidenced in CKEditor 5 integration). - 🇺🇸United States slucero Arkansas
Thanks for getting this started @krisahil! I looked over the code so far and it all looks good. One thing I'd look into as part of this as well is whether we can remove the shadow dom versions and related checks altogether now that we've removed shadow dom support in the beta 9 release.
- Status changed to Active
6 months ago 4:41pm 3 June 2024 - Status changed to Needs review
5 months ago 5:54pm 17 June 2024 - 🇺🇸United States slucero Arkansas
@krisahil, thanks for the heads up on the regression. I'll have to look into that more closely.
What is the back-story for renaming this scope to #patternkit-editor-target ? Does Patternkit allow for opening the editor in a context other than #drupal-off-canvas? If so, how?
Regarding this, yes the block form may also be opened in a full-page view instead of in the sidebar tray. The simplest way to do this that I've found for testing is to right-click the link for one of the block edit forms and select to open it in a new tab. This will open up the full-page form and redirect you back to the layout edit page upon submission.
Applying the
#patternkit-editor-target
ID is a shortcut that was used to have a consistent target for the form to instantiate within and to allow the cygnet theme styles to target more directly without being reliant specifically on the markup for the sidebar tray. This would of course conflict if multiple editors are instantiated on a page at once, but I suspect we'll have a few additional issues in that scenario to overcome as well. - 🇮🇳India minsharm India
I have retested the issue and result looks good to me.
Results:
- Selected themes and icon libraries loads and displays as expected in both the off-canvas tray and full-page view of the block edit form.
- Creation of content on new blocks saved and displayed as expected.
- Editing existing block properly prepopulate existing content into the form.
- Saving changes to existing blocks properly reflected on save.
- Media library integration supports adding and changing selected media.
- 🇺🇸United States slucero Arkansas
There was an issue with naming mismatches for the settings. This should be fixed and ready for testing again.
- Status changed to RTBC
4 months ago 6:49pm 31 July 2024 -
slucero →
committed 430a9a10 on 9.1.x authored by
krisahil →
Issue #3386854 by slucero, krisahil, minsharm: Attach JSON Editor Theme...
-
slucero →
committed 430a9a10 on 9.1.x authored by
krisahil →
- Status changed to Fixed
4 months ago 6:50pm 31 July 2024 - 🇺🇸United States slucero Arkansas
Merged for inclusion in the 9.1.0-beta10 release!
Automatically closed - issue fixed for 2 weeks with no activity.