Conversation
Phase 1a of #200. An acceptance test checks that the public block content only uses contract classnames, against a list of pending Tailwind classes that may only shrink as nodes are converted. Stylelint rules guard styles/content.css. Lists get the block-p__list and block-p__item parts and a data-list-style-type attribute, and the classname contract is documented for themers.
* a3-content-css-pilot: Make the image block reset test independent of fonts
* a3-content-css-pilot: Measure the image block width once again in the style fields test Fix the server not loading translations, which broke hydration (#207)
* a3-content-css-pilot: 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 1a of #200: the foundations of the block content classname contract, with zero visual change.
Why Phase 1 is split
#200's Phase 1 mixes zero-diff groundwork with changes that visibly alter spacing:
hrtoplateBlocksConfiggives it.category-separator, which@plone/layout'scontent-area.cssalready styles.content-area.cssintocontent.csssettles the view/edit drift.So the phase is split:
hr/h1anatomy and the shared spacing rules, with every accepted diff listed.Changes
Class-contract test (
plate/acceptance/tests/content-class-contract.test.ts)p,h2,table,code, …, andeditorfor the editor root).slate-*,block,block-<type>,block-<type>__<part>,category-*;hljs-*,function_), lucide icons, React Aria (react-aria-*).PENDINGmap: every remaining class must match the map of Tailwind classes still waiting for conversion, per node, exactly.Stylelint rules for
styles/content.cssThese are overrides in the
.stylelintrcof@plone/plate,@plone/blocksand@plone/agave, the packages that ship one. They enforce #199's authoring rules:at-rule-disallowed-list: layer;selector-disallowed-list(withsplitList) for:root,html,bodyand selectors that start with a bare element, including inside:where()/:is().I checked them against a sample: it flags
@layer,:root,html,body .x,h1,figure imgand:where(figure img), and it allows.ok h1,:where(.x)and.content-area. All three realcontent.cssfiles pass.List parts
block-p__listonul/olandblock-p__itemonli, in both the static and the editable list renderers.BlockAnatomyPluginaddsdata-list-style-typeto list blocks (paragraphs with alistStyleType), with a unit test.Docs
docs/development/block-anatomy.mdgets a "Classname contract for themers" section: hooks, rules, shared type names (.block-video.slate-video/.slate-ploneBlock), BEM parts, variants as data attributes, and lists.@plone/plateAGENTS.md: how to maintainPENDING.@plone/blocksAGENTS.md: "keep CSS colocated" now points block content styles tostyles/content.css.Validation
CI=1 pnpm visual-test --retries=0: 22 passed, pixel-identical to the reference.pnpm acceptance-test: 168 passed, including the 2 new contract tests.pnpm --filter @plone/plate test --run: 75 passed, 1 of them new.check:ts,eslintandstylelint: clean.Part of #200.