Repository navigation
Bundled Themes: Update Ipsum for 7.2 RC 1 #15948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
70f682a
Ipsum: Address the review notes from the 7.2 Beta 5 core commit.
MaggieCabrera 6e7e23a
Ipsum: Fix Pullquote custom line height not applying on the front end.
MaggieCabrera faa7e23
Ipsum: Fix horizontal scroll caused by long unbroken words in comments.
MaggieCabrera e48a0b4
Ipsum: Improve design guide defaults and schema descriptions.
MaggieCabrera 3e7e873
Ipsum: Make the short post date format translatable.
MaggieCabrera 34c3fe4
Ipsum: Fix Details block markers being announced by screen readers.
MaggieCabrera cec447b
Ipsum: Remove the physical left alignment from the page patterns.
MaggieCabrera 2886ce7
Ipsum: Indent the navigation submenus on the inline start.
MaggieCabrera f9c0214
Ipsum: Fix accessible names for overlay navigation.
MaggieCabrera 624f2e1
Bundled Themes: Update Ipsum's core-only files from the 7.2 Beta 5 re…
MaggieCabrera b982de3
Ipsum: Split AGENTS.md so it holds for any copy of the theme.
MaggieCabrera 2a1a953
Ipsum: Use a logical margin for the comment form checkbox.
MaggieCabrera ec4da5b
Bundled Themes: Fix coding standards in the Ipsum design guide abilit…
MaggieCabrera c22f2ad
Ipsum: Keep keyboard focus visible and clear of the sticky header.
MaggieCabrera 765c948
Ipsum: Fix the accessible name of the overlay search form.
MaggieCabrera 2688f29
Ipsum: Show a message when the blog and Archive Full have no posts.
MaggieCabrera 7948da6
Ipsum: Keep the post date on one line when categories wrap.
MaggieCabrera af58360
Ipsum: Remove repeated button styles from theme.json.
MaggieCabrera 7df2e84
Ipsum: Remove unused values from theme.json.
MaggieCabrera e9d0564
Ipsum: Make the credit line URL translatable.
MaggieCabrera 53ba912
Ipsum: Use single border radius values in theme.json.
MaggieCabrera 16fa047
Bundled Themes: Fix the Ipsum design guide ability test on multisite.
MaggieCabrera 822c9fa
Ipsum: Escape the short post date format instead of ignoring PHPCS.
MaggieCabrera 14d177a
Ipsum: Use the Site Title in Footer Centered.
MaggieCabrera 427f294
Merge branch 'trunk' into sync/ipsum
peterwilsoncc 7ab4a32
Ipsum: Keep AGENTS.md about the theme, not the GitHub repository.
MaggieCabrera a82db54
Ipsum: Treat "Written by" as a label before the author name.
MaggieCabrera 853c1c5
Ipsum: Use Quote blocks for statement patterns and remove text quote …
MaggieCabrera 5383cc4
Merge branch 'trunk' into sync/ipsum
MaggieCabrera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # AGENTS.md | ||
|
|
||
| How coding agents should work on the Ipsum theme. This file covers what is specific to the theme and easy to get wrong. [DESIGN.md](DESIGN.md) says how to design with it. | ||
|
|
||
| ## Key directories | ||
|
|
||
| Templates, patterns, `theme.json` and CSS are served as they are in the tree. The only generated file is `style.min.css`. | ||
|
|
||
| - `templates/*.html` - Block templates. Each is a one-line delegate to a pattern. | ||
| - `parts/*.html` - Template parts. Each is a one-line delegate to a pattern. | ||
| - `patterns/*.php` - The markup of every template and part, plus the insertable patterns. | ||
| - `styles/colors/*.json` - Color style variations, number-prefixed to control their order. | ||
| - `styles/typography/*.json` - Typography style variations. | ||
| - `styles/blocks/*.json` - Block style variations. The `slug` is used in markup as `is-style-<slug>`. | ||
| - `assets/fonts/` - Self-hosted fonts, one directory per family, credited under `== Fonts ==` in `readme.txt`. | ||
| - `assets/css/editor-style.css` - Editor-only overrides, loaded after `style.css` in the editors. | ||
| - `functions.php` - Theme PHP: stylesheets, the comments CTA block binding, sidebar template types, block styles. It loads `inc/abilities.php`. | ||
| - `inc/abilities.php` - The `ipsum/get-design-guide` ability, which gives agents on a live site the palette roles, presets, style variations, block styles, patterns and templates through the Abilities API. A new palette color needs its role in `ipsum_get_color_roles()`. | ||
| - `theme.json` - Global settings and styles, fonts, `customTemplates`, per-block styles. | ||
| - `style.css` - The theme header plus the CSS that `theme.json` cannot express. It loads in the editors through `add_editor_style()`, and is inlined on the front end when `SCRIPT_DEBUG` is on. | ||
| - `style.min.css` - `style.css` minified by `npm run build` in the theme directory, inlined on the front end otherwise. Generated: rebuild it, never edit it. | ||
| - `readme.txt` - The WordPress.org readme: description, changelog, copyright, font credits. | ||
|
|
||
| ## Progressive discovery | ||
|
|
||
| Read only what your task needs, when it needs it: | ||
|
|
||
| - **Styling, or building pages, patterns or templates**: read [DESIGN.md](DESIGN.md) first. It covers the color roles, the type and spacing scales, the style variations, and which pattern fills each template and part. | ||
| - **Adding or changing a pattern**: read [Writing patterns](DESIGN.md#writing-patterns) in DESIGN.md first. It covers categories, hiding from the inserter, which i18n function to use, images, and removing `id`, `queryId`, `theme`, `area`, `patternName` and `metadata.categories` from copied markup. | ||
|
|
||
| ## Markdown files | ||
|
|
||
| Ipsum's Markdown files are soft-wrapped: a paragraph, list item or table row is one line, however long. Do not hard-wrap prose, and do not re-flow lines a change does not otherwise touch. | ||
|
|
||
| ## Architectural decisions | ||
|
|
||
| - **The pattern is the source of truth.** `templates/index.html` is `<!-- wp:pattern {"slug":"ipsum/hidden-index"} /-->` and nothing else. Editing a delegate template or part changes nothing at render time; edit the pattern it names. A pattern that only fills a template or part is hidden from the inserter with `Inserter: no`, and its file and slug take the `hidden-` prefix (`patterns/hidden-index.php` is `ipsum/hidden-index`); template patterns also carry `Template Types:`. Insertable patterns use `Categories`, `Block Types`, `Viewport width` and `Description`. | ||
| - **Style with the design tokens, not literals.** Colors come from `var(--wp--preset--color--<slug>)`, spacing from `var:preset|spacing|N`. The palette uses the Twenty Twenty-Five slugs, so default theme patterns pick up Ipsum's colors: `base` (Base) is the background, `contrast` (Contrast) the text, headings, links and buttons, `accent-1` (Accent) the accent, which only the arrival bar uses, `accent-3` (Strong Contrast) the hover color and the ground of inverted sections and cards, `accent-5` (Surface) the faint wash behind quotes, tags and cards, and `accent-6` (Border) the faint lines. `accent-2` and `accent-4` are not defined. Every color variation redefines all six, so a literal hex freezes one variation's look into all the others. `settings.custom.controlScheme` says whether the active palette is `light` or `dark`. | ||
| - **`theme.json` comes first.** Prefer `theme.json` and Global Styles over custom CSS, and add CSS only when the block editor or theme APIs cannot express the design yet. Don't add PHP or JavaScript workarounds for what the block editor might reasonably provide. | ||
| - **CSS explains why, in prose.** Rules in `style.css` and `assets/css/editor-style.css` carry a comment saying why they exist, often with the Gutenberg or Trac issue behind it. `css` strings in `theme.json` cannot hold comments. | ||
| - **Text domain is `ipsum`.** Every user-visible string goes through an i18n function, including single characters such as the `·` separators. | ||
| - **PHP follows the WordPress coding standards**, in tabs. Functions in `functions.php` and `inc/` are wrapped in `if ( ! function_exists( '…' ) ) : … endif;`, every docblock carries `@since Ipsum 1.0`, and `@package Ipsum` heads the file. | ||
|
|
||
| ## Do not reformat block markup | ||
|
|
||
| The delimiters in templates, parts and patterns are Gutenberg's serialization, not hand-written HTML: flush left, one delimiter per line, a blank line between sibling blocks, and a block's wrapper element on the same line as the opening delimiter of its first child: | ||
|
|
||
| ```html | ||
| <!-- wp:group {"metadata":{"name":"Body"},"layout":{"type":"constrained"}} --> | ||
| <div class="wp-block-group"><!-- wp:post-title /--> | ||
| ``` | ||
|
|
||
| Reindenting or rewrapping it produces a large diff that the next editor round-trip undoes. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file reads to me as being very specific to the GitHub development flow for the theme rather than for once it lands in WordPress-Develop. I think it can be removed as it may lead to agents doing unexpected things (such as cloning the ipsum repo).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the file so it's not relted to the GH development but theme dvelopment in general, it should be good to go