- Issue created by @balintbrews
- ๐บ๐ธUnited States hooroomoo
Decrementing PP in issue title since hydration library got in
- ๐บ๐ธUnited States hooroomoo
Oh looks like other blockers are also done now, so updating again to reflect
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
โจ Create a ComponentSource plugin for JS components Active updated
docs/components.md
(for thejs
ComponentSource
plugin) anddocs/config-management.md
(for theJavaScriptComponent
config entity).Unfortunately, โจ Storage for global CSS Active did not update
docs/config-management.md
(for theAssetLibrary
config entity), so that still needs doing here. - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Follow-up to #6: โจ Loading and auto-saving an edited code component Active brings two crucial changes to the
AssetLibrary
config entity worth documenting:- A
global
AssetLibrary
is created during installation, with empty CSS and no JS. - The
library_info
cache tag is automatically invalidated when saving anyAssetLibrary
config entity, causing all asset library info across all extensions to be recomputed: https://git.drupalcode.org/project/experience_builder/-/merge_requests/6...
- A
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
@effulgentsia came up with a way to patch Astro's code in our bundled hydration library (done in โจ Hydration library for code components Active ), and introduce our own type identifier,
raw
, that allows us to pass values where Astro will work with the value as is. Alex also opened this PR for Astro: https://github.com/withastro/astro/pull/13046.โ issue summary of ๐ Fix code component prop serialization in Astro islands Needs work .
On that PR:
Right now, while we have no specific plans to change the format, we can change it at will without worrying about breaking any other implementation. If youโre manually constructing islands, thereโs a risk that it would break in a patch release. Realistically youโd need to be responsible for checking yourself that there are no breaking changes in the format in new releases.
โ https://github.com/withastro/astro/pull/13046#issuecomment-2609036184
This seems pretty essential to document!
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Another MR that landed that merits being documented: the way that
import_maps
work. See #3507567-12: Make JS files generated from code components import Preact modules with the correct paths โ for the high-level architecture on the "integrate with existing Drupal infra" side. - ๐ณ๐ฑNetherlands balintbrews Amsterdam, NL
Another essential piece to document: โจ Bundle a small selection of packages in the hydration library for code components Active .
We now have packages that can be imported:
import { cva } from "class-variance-authority"; import { clsx } from 'clsx'; import { twMerge } from 'tailwind-merge' import { cn } from "@/lib/utils";
Where
cn()
is this function:
https://git.drupalcode.org/project/experience_builder/-/blob/f3b8c6279c2... - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
This must happen in the current sprint.