Merge updates from dev#488
Open
shrimp2t wants to merge 42 commits into
Open
Conversation
…pen. #479 Introduce a new React-powered customizer stack and supporting tooling. Adds .eslintrc.js, multiple new src/admin/customizer React components (icon picker, repeatable controls, alpha color picker, modal editor, WP editor bridge, bindings, etc.), and related SCSS. Update customizer CSS/RTL to support SVG icon preview/editor UI. Update asset manifests to require react, react-dom and wp-element and refresh built assets/webpack output. These changes modernize the Customizer controls and enable richer UI features (icon SVG editing, repeatable fields, alpha color support).
Ensure repeatable control data reliably syncs with wp.customize and the hidden input, preventing silent no-op sets that left the setting not marked dirty. Adds pushRepeatablePayloadToCustomizer and robust equality/parsing helpers (parseRepeatableStructure, stripUiMetaFromRepeatable, repeatableSettingValuesEqual) using lodash.isEqual. Fixes editor/textarea and color picker integrations: initialize modal editors when fields become visible, bind jQuery/change/input events for TinyMCE sync, handle alpha/wp color picker events and dragging via RAF, and ensure proper teardown. Also force remount of conditional fields by incorporating visibility into React keys, update various repeatable field components and bundle supporting lodash modules; bump assets/admin/customizer asset version.
Add support for self-hosted videos in the videolightbox section: initialize lightGallery with selector:"a" and add CSS to make empty-href self-hosted links behave as clickable elements. Introduce a customizer media control (inc/customize-controls/control-media.php) and update related PHP, JS, and SCSS files, bump frontend asset version, and adjust WPML config. These changes enable self-hosted HTML5 playback via data-html/lg-html5 and improve customizer integration for the video lightbox.
Apply wp_kses_post() before content filters in multiple section templates so filters (shortcodes/embeds) operate on sanitized input, remove redundant escaping where appropriate, and add PHPCS ignore annotations for intentional unescaped outputs. Also update changelog.md to add v2.3.17 notes (self-hosted video lightbox & customizer/svg improvements). Files updated include various section-parts PHP templates and changelog.md.
Replace the giant expanded RTL Bootstrap CSS with a minified/bootstrap.min.css import/header and update the Bootstrap version string. Also update related frontend assets (theme.css, theme.js, theme.js.map, theme.asset.php) and the frontend entry (src/frontend/index.js). Update changelog.md to reflect these asset changes. Likely result of a rebuild/minification and source map regeneration.
Replace empty alt on the hcl2-image in section-parts/section-hero.php with the site name for improved accessibility and SEO. Uses esc_attr( get_bloginfo('name') ) to safely output the blog name (esc_url already used for src).
Enable a grid layout for blog/news loops: read blog loop config in archive.php, set a loop prop when grid is active, wrap posts in row/column containers and remove the prop after the loop. Update Customizer UI: show/hide grid column controls based on layout selection in customizer.js and adjust admin CSS/RTL (control actions use flex, add tablet/mobile preview sizes). Add full Bootstrap SCSS sources under src/frontend/libs/bootstrap and update compiled asset versions and frontend/admin styles/scripts accordingly.
Replace the large Sass-compiled RTL stylesheet with a minified Bootstrap RTL build and rebuild frontend assets. Updated assets include theme-rtl.css (now referencing bootstrap.min.css), theme.css, theme.js, theme.js.map, theme.asset.php and src/frontend/index.js to reflect the new build output and reduce compiled CSS size.
Introduces AGENTS.md as a slim index plus nine focused spec files under docs/ covering architecture, build pipeline, front-page sections, Customizer/theme supports, hooks, admin surfaces, naming conventions, backward-compatibility & additive-only mandate, LF-only line-ending policy, and commit conventions. Designed for AI coding agents (and human contributors) working on a theme with 60,000+ active installs: every spec emphasizes the additive-only backward-compatibility contract, lists frozen public-API surface (theme mods, section IDs, hooks, classes, image sizes, CSS classes), and documents known shipped inconsistencies that must not be "fixed" (Onepress_/OnePress_ split, onepres_save_settings typo, pdbotom typo, etc.). Establishes Conventional Commits with OnePress-specific scopes and a mandatory BC: footer on every commit going forward. BC: none — docs only, no PHP/JS/CSS touched
assets/ is webpack's output directory (see webpack.config.js: output.path = path.resolve(__dirname, "assets")). The tree is fully regenerable from src/ via `npm run build`. Tracking compiled bundles produced noisy diffs on every rebuild and diverged checkouts on parallel branches. After this commit, contributors must run `npm install && npm run build` once after git clone so assets/ exists at runtime. PHP references to assets/* paths remain unchanged. Working tree preserved — files only untracked from the index. 93 files removed from tracking: assets/admin/ (35 files: compiled JS/CSS, source maps, .asset.php) assets/fonts/ (11 files: hashed FontAwesome + lightgallery webfonts) assets/frontend/ (28 files: bundles + maps + .asset.php + LICENSE.txt) assets/images/ (13 files: copied from src/images/ + 1 webpack hashed)
.feature-item SCSS uses --icon-bg-color and --icon-hover-bg-color with hardcoded defaults. Inline style only set color: directly on .icon-background-default (FA stack path), so .feature-icon-svg-wrap kept the hardcoded #03c4eb / #333333 regardless of customizer color. Fix: also set the two CSS vars on .feature-item; both icon variants now inherit from onepress_primary_color / onepress_secondary_color. BC: none — additive CSS variable rules; defaults unchanged
- Sidebar-aware content-cap routed by template→single_layout→onepress_layout
chain; emitted as :root --wp--style--global--content-size only.
- Stretched template → 100vw, fullwidth-contained → 1110, sidebar → 790.
- Watcher JS (src/admin/editor-content-width.js) live-updates the var on
template change in the editor sidebar.
- Customizer palette bridge (primary + secondary) + postMessage live preview.
- $primary/$secondary in _variables.scss now alias var(--wp--preset--color--{slug}).
BC: additive — new theme.json, new helpers, new mods scope. Defaults match
existing visual output. Inline rules in template-tags.php still wrap in
the original `if (\$primary != '')` guards; values switch from baked hex
to var(...) so live preview JS can update them.
- New spec-block-editor.md covers editor↔frontend parity, palette/font size filters, sidebar-aware content-width architecture. - Plan files trace the 2.4.1 work (block-editor-parity, css-var-integration). - AGENTS.md / spec-admin.md / spec-commits.md / spec-naming.md updated to reference the new spec and document frozen palette-slug inconsistencies. BC: none — docs only
Old rules — `display: inline-block; width: 100%; max-width: 33.33%` — packed gallery items edge-to-edge with no margin in either axis. Combined with WP's default `size-thumbnail` (150x150), a three-column gallery showed each small image orphaned in the corner of a 370px inline-block cell and adjacent rows touching, producing the tall vertical strips reported on https://onepress.wp.local/gallery/. Rewritten with CSS Grid: - `.gallery { display: grid; grid-template-columns: repeat(var(--gallery-cols, 3), 1fr); gap: 1rem }` - `.gallery-columns-N { --gallery-cols: N }` for N = 1..9 (one custom property mechanism replaces nine per-N max-width rules; child themes can tweak by overriding the var alone) - `.gallery .gallery-icon img { width: 100%; height: auto; display: block; max-width: 100% }` — image fills the grid cell at native aspect ratio. Trade-off: `size="thumbnail"` images now upscale visibly because the cell is wider than 150px. Authors who want sharper output should pass `size="medium"` (or larger) to the [gallery] shortcode. Noted inline in _contents.scss above the rules. Verified end-to-end on the test page: gallery container computes to `display: grid; gap: 16px; grid-template-columns: 359px 359px 359px`, items render at 359x359 with the expected 1rem gutters, layout matches the screenshot review. BC: visual — sites with existing [gallery] shortcodes will see the new grid layout (gap + images filling cells) instead of the old inline-block packing. No shim because the previous layout was effectively broken for the default small-thumbnail case
- theme.json `styles` now consumes `--wp--preset--font-family--body` and
`--…--heading` so consumers reflect intent, not typeface name.
- Aliases declared at `:root` in `_document.scss` (`body → open-sans`,
`heading → raleway`); editor "Font family" dropdown stays uncluttered
with only the four canonical typefaces.
- Any later stylesheet can override either alias via `:root { … }`.
BC: none — defaults render identically (Open Sans body, Raleway heading)
Morphext read phrase content via jQuery `.text()` which strips markup, so `<strong>`, `<em>`, `<a>` inside the hero rotating block surfaced as plain text. Switched to `.html()`; the existing `innerHTML` write already round-trips markup. Server-side `wp_kses_post` on the Customizer field still gates the allowed tag set. BC: none — pure additive capability; plain-text phrases unaffected
BC: none — version bump for additive 2.4.1 work
BC: none — docs only
The 2.4.1 bump in `2a0258c` was wrong — the prior shipped release is 2.3.17, and this work is a patch increment on that line. Renumber package.json + style.css + changelog header accordingly. BC: none — version label only
Merg from dev-fix-editor into dev
The repeater control was setting `__visibility = 'hidden'` on any row whose `section_id` mapped to an inactive section in `onepress_sections_settings`. The Customizer stylesheet collapses `.visibility-hidden` rows to `height: 0`, so a row disabled via the Sections admin page disappeared entirely from the Customizer with no in-Customizer way to re-enable, reorder, or edit it — recovery required bouncing out to the Sections admin and back. Every row now stays visible regardless of section active state. The per-row `show_section` checkbox inside the item remains the user-facing toggle for hiding a section from the rendered page; the Customizer list itself is now a complete inventory. `__visibility` is still emitted (empty string) so downstream code that reads the field doesn't see `undefined`. changelog.md: 2.3.18 entry added under the existing FIXED block. BC: visual — rows previously hidden from the Customizer (e.g. slider when its section was disabled in the Sections admin) now appear at their saved order. No data change; per-row `show_section` toggle keeps its meaning
fix(controls): always show every row in Section Order & Styling list
The `docs/` tree (spec / plan / agent guides) and any `plan-*.md` anywhere in the repo are development artefacts — they don't belong in the distributable theme. BC: none — release artefact only; no code change
Adds `!plans/**` alongside `!docs/**` — the top-level `plans/` directory holds the same kind of dev-only planning artefacts. BC: none — release artefact only
New `grunt gh_release` task creates or refreshes the `v<version>` GitHub release: extracts notes from changelog.md, uploads the zip via `gh release create/edit --clobber`, fails fast when `gh` CLI is missing or unauthenticated. Build only — not invoked from `release` / `zipfile`. Run after `grunt zipfile` and `git push`. BC: none — additive build task
…ision
The "text" palette slug caused WP core to emit a preset utility class
`.has-text-color { color: var(--wp--preset--color--text) !important }`,
which collides with the core-managed `.has-text-color` flag class added
to any block where the user picks a custom text color. The `!important`
rule then overrode the user's inline `style="color:..."`, forcing every
custom text color back to the preset gray.
Rename the slug to `body-text` (no other slug is reserved by core) and
update the two style references in theme.json. No customizer code is
affected — the bridge in inc/theme-json-bridge.php only maps
primary/secondary.
Updates style.css header, package.json, and changelog.md for the .has-text-color collision fix (f9ea387).
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.
No description provided.