Conversation
Step A3 of #199, the pilot for the content CSS architecture. The image block drops its CSS Module and the block inner container its duplicated Public UI and CMSUI rules: both now live in styles/content.css, loaded in both user interfaces inside the plone-content cascade layer. The editor gets the .content-area content root, and Agave ships its first content token. Acceptance tests prove that a theme token reaches the image block in both user interfaces and that its layout doesn't depend on the public theme's reset.
A centered image right after a float is pushed below it by an amount that depends on how tall the text next to the float is, which varies with the fonts installed. The test page now puts the floated image last.
* a2-content-css-entry-point: Fix the server not loading translations, which broke hydration (#207)
The retry worked around React replacing the server-rendered DOM on hydration. #207 fixed the cause (the server didn't load the translations), so the nodes now stay connected.
This was referenced Oct 2, 2026
* a2-content-css-entry-point: Move the table drag handle fragment to @plone/quanta Releasing @plone/aurora 1.0.0-alpha.16 Release @plone/contents 1.0.0-alpha.3 Release @plone/publicui 1.0.0-alpha.8 Release @plone/cmsui 1.0.0-alpha.11 Release @plone/agave 1.0.0-alpha.8 Release @plone/theming 1.0.0-alpha.8 Release @plone/layout 1.0.0-alpha.13 Release @plone/blocks 1.0.0-alpha.17 Release @plone/plate 1.0.0-alpha.22 Release @plone/react-router 2.0.0-alpha.7 Release @plone/helpers 2.0.0-alpha.9 Release @plone/registry 4.0.0-alpha.4 Release @plone/quanta 1.0.0-alpha.1 Release @plone/components 5.0.0-alpha.5 Release @plone/client 2.0.0-alpha.8 Release @plone/icons 1.0.0-alpha.1 Release @plone/types 3.0.0-alpha.7 Split Quanta and icons out of @plone/components into @plone/quanta and @plone/icons (#212)
Member
Author
|
LGTM! |
This branch has not been deployed
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.
Step A3 of #199: the pilot. The first real block styles go through the
styles/content.cssentry point from A2, end to end, for one Plate concern and one Plone block.Changes
@plone/plate:.block-inner-containermoves into a newstyles/content.css, wrapped in:where(). The duplicated rules instyles/publicui.cssandstyles/cmsui.cssare removed. Those two files stay, because the registry needs them to emit plate's Tailwind@source.plone-block-adapter.tsxdrops the selection outline of a floated image block with Tailwind variants ([&.block-image[data-style-align=left]]:outline-none). The selection outline is an editor affordance, so the rule that hides it belongs with the selection utilities, in theutilitieslayer. Before, the CSS Module did it with an unlayered rule.@plone/blocks:Image/ImageBlock.module.cssis replaced bystyles/content.css, with plain classnames and every selector inside:where().plone-content, above the reset.block-image__link, the Track B (Remove Tailwind from block content in @plone/plate and @plone/blocks #200) contract name. The figure keepsimage-blockuntil Track B renames it.--block-bottom-spacing: 0on the floated block, the token@plone/layout'scontent-area.cssreads. A plainpadding-bottominplone-contentwould lose tocontent-area.cssincustom.acceptance/**, as in plate and cmsui. This is the package's first acceptance folder.@plone/cmsui: the block editor gets thecontent-areaclass, the same content root as the Public UI. Themes declare content tokens on.content-area, and they now reach the editor's blocks without touching the CMS chrome. plate's discussion popover already looked up.content-areafor its collision padding; it now finds it in the editor too.@plone/agave: a firststyles/content.css, declaring--block-float-max-size: 66%on.content-area. That's the same value as the framework fallback, so nothing changes visually. It's the theme's content-token entry point, and the test below uses it to prove the token reaches both UIs.Proofs (#199 A3 criteria)
CI=1 --retries=0), against reference screenshots generated from the pre-change buildblocks/acceptance/tests/image-block-content-css.test.ts:--block-float-max-sizeon.image-blockis66%in the public view and the editor. The framework only reads it with a fallback, so the value can only come from Agave'scontent.cssfloat,marginand theimgdisplay match for (1) Agave's Tailwind preflight, (2) no reset (all rules in thebaselayer removed), (3) a different reset inbase. A plain<figure>confirms which reset is active in each caseNew visual tests
blocks/acceptance/visual/image-block.test.tscovers the image block floated left (with text and a list after it), floated right, and centered with a link, in the public view (full page) and in the editor (floated image selected, outline hidden).Baselines: these two tests are new. Run "Update VRT Screenshots" with
grepset toImage block alignments, so only they're added. They capture the current look, since this PR has zero diff.Things to look at
justify-itemsdrift is left alone. The Public UI's copy hadjustify-items: start; the CMS copy didn't. Unifying them in the editor changed it visibly: nested blocks such as quoted paragraphs shrank, and the list after a floated image stopped wrapping. The Public UI doesn't need plate's copy, becausecontent-area.csssetsjustify-itemson every inner container. So it's dropped, and both UIs keep their current behavior. Movingcontent-area.cssinto the shared content styles is Remove Tailwind from block content in @plone/plate and @plone/blocks #200 Phase 1, which will unify this with listed diffs.--block-bottom-spacing: 0is declared on floated image blocks, inside:where(), so any theme rule still overrides it.publicui.css→custom) intocontent.csswould change how the editor looks, so it's left for Track B.A flaky test, fixed on
maincmsui/acceptance/tests/image-block-style-fields.test.ts› "combinations set in the editor render correctly after saving" started failing intermittently on this branch (about 4 in 5 runs). Right after a page load, React replaced the image block's server-rendered nodes, and the test measured the detached ones (0/0 =NaN).The replacement wasn't caused by this PR: it happened on every load on
maintoo, and this PR only changed the timing. The cause was the server not loading the translations, so React discarded the whole server-rendered page on hydration. That's fixed in #207, which is now merged into this branch, andwidthRatio()is back to measuring once, as onmain. With that, the style fields and hydration tests passed 80/80 with--repeat-each=8, and the fullpnpm acceptance-testsuite passed (168).Validation
CI=1 pnpm visual-test --retries=0: 22 passed, pixel-exact against the pre-change reference.pnpm acceptance-test: 166 passed. Theimage-block-style-fieldstests also passed 48/48 with--repeat-each=6.@plone/plate74,@plone/blocks29,@plone/cmsui189, all passed.check:tsfor plate, blocks and cmsui: clean.stylelint,eslintandprettieron changed files: clean.Part of #199.