Conversation
The block model's spatial relationships move from @plone/layout's content-area.css (custom layer, Public UI only) to its styles/content.css, which the app loads in both UIs in the plone-content layer. The public view is unchanged; the editor now spaces blocks like the public view. Part of #200.
* b8-structural: 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)
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.
Phase 9 of #200: blocks are now spaced the same in the editor as in the public view. The public view doesn't change. The editor does, on purpose: this is the "view/edit drift" phase, and the accepted diffs are listed below.
Changes
The block model's spatial relationships move out of
@plone/layout/styles/content-area.css. That file only loads in the Public UI, in thecustomlayer. They go into the new@plone/layout/styles/content.css, which the styles loader puts in theplone-contentlayer of both UIs.The moved rules:
.content-area > .block: centering, background and color;text,heading, and thelayout/default/narrowwidth classes;--block-bottom-spacingper category, and none before or at a separator;max-width,padding-bottom,margin,justify-items, and so on.content-area.csskeeps the container query setup and.documentDescription.@plone/layoutgets the samecontent.cssStylelint rules as plate and blocks. The selectors are inside:where().Why the public view doesn't change: the loader imports
content.cssfiles in add-on order (plate, blocks, layout, agave). So layout's rules still win over plate's node rules on ties, as they did from thecustomlayer. Since Phase 8, no Tailwind utilities are left on the content's inner containers to interfere. That interference is why this phase had to wait.This is the first version, parked during Phase 1b, unchanged except for comments.
Accepted diffs (editor only)
All 6 changed screenshots are editor screenshots; every public-view screenshot is pixel-identical.
native-blocks-editinline-marks-editimage-block-edit(floated image selected)add-form(cmsui)edit-form-block-sidebar(cmsui)floating-toolbarRemaining editor/view differences are typography: Agave's heading styles only apply in the public view, for instance. Those aren't part of the block spacing.
Baselines: once this is merged, the CI baselines for these 6 screenshots need the "Update VRT Screenshots" workflow.
Tests
New:
plate/acceptance/tests/block-spacing.test.tscompares the inner container'smax-width,padding-bottom, margins andjustify-itemsbetween the public view and the editor, for:It would have failed before this change.
Docs:
packages/layout/AGENTS.mddescribesstyles/content.css. The comment on plate's base.block-inner-containerrule is updated.Validation
CI=1 pnpm visual-test --retries=0: 18 identical, and the 6 editor diffs above.pnpm acceptance-test: 179 passed.pnpm --filter @plone/layout test --run: 9 passed.check:ts(layout, plate),stylelintandprettier: clean.Part of #200.