Skip to content

Latest commit

 

History

History
206 lines (151 loc) · 20.2 KB

File metadata and controls

206 lines (151 loc) · 20.2 KB

Webentor Core Changelog

0.15.8

  • Fix: the editor script's WordPress dependencies were never applied. setup-core.php reads public/build/editor.deps.json, but the build only ever emitted that file hashed under assets/, so the path never existed and the core editor bundle enqueued with just react/react-dom — none of its ten wp-* dependencies. It is now emitted, sorted, at the path PHP reads.
  • Fixes a related build-output churn: @roots/vite-plugin builds that dependency list in a Set, whose insertion order follows module-transform order and is nondeterministic under Rolldown. Every rebuild changed the asset hash, filename and manifest.json, so git diff could not distinguish a real build change from noise. Output is now byte-stable across rebuilds.
  • Editor-only and transparent to consumers: pnpm up @webikon/webentor-core within the existing ^0.15 range. Verified against the test-site — 26 blocks insert and validate, editor and frontend console output identical to 0.15.7.

0.15.7

  • Pattern Overrides support for Webentor blocks (WordPress 7.0). WP 7.0 opened Pattern Overrides to custom blocks via a single server-side opt-in, so e-button (button), e-accordion and e-tab-container (title), e-image (imgId, link), e-svg (imgId), e-icon-picker (icon) and e-gallery (images) now expose their content attributes to Block Bindings — a synced pattern can be reused across pages with per-instance content while the design keeps propagating from the original. The list is filterable via the new webentor/block_bindings_supported_attributes filter, and because Pattern Overrides and Block Bindings share it, these attributes also become connectable to post meta. Container blocks are overridden through their inner blocks rather than the container itself; see the new Pattern Overrides guide in the docs. One caveat: WordPress keys bindings by top-level attribute name only, so e-button's single button object is overridden as a whole — once an instance overrides a button it keeps its own variant/size/icon and stops inheriting later design changes from the pattern.
  • Pass resolved attributes into Blade views. The block render_callback discarded its $attributes argument and re-read $block->attributes instead, bypassing the value WordPress guarantees carries resolved Block Bindings values for dynamic blocks. render_block_blade() now takes them as an optional third argument and the callback passes them through. No behavior change for blocks without bindings.

0.15.6

  • Give the l-section background video an accessible name. The <video> added in 0.15.5 rendered with no title or aria-label (<video> has no alt). It now labels itself from the attachment's alt text, falling back to the attachment title, and emits both; with neither set it is treated as decorative and gets aria-hidden="true". New webentor/l-section/video_label filter overrides the label. Frontend template only.

0.15.5

  • l-section background video. The Section block's "Background Image Settings" panel now accepts a background <video> alongside the existing image, which remains the fallback shown while the video loads and on mobile when disabled. Three toggles control delivery: Disable video on mobile (≤480px — the video is neither shown nor fetched; the image is used instead), Lazyload video (loads only when the section scrolls into the viewport, via a vanilla IntersectionObserver — core does not depend on @alpinejs/intersect), and Lazyload background image (loading="lazy" on the section image; off by default since section backgrounds are usually the LCP element). The video renders muted/looped/autoplay/playsinline on the existing .w-section-img background layer, above the <picture> and below the overlay/content; its source is held in data-src (preload="none") so nothing is fetched until the block script decides to load it. The load decision re-runs on a throttled resize, so a viewport that starts on mobile still loads the video after crossing up to desktop. New attributes: video, disableVideoOnMobile, lazyloadVideo, lazyloadImage. Additive — existing sections are unaffected.
  • WebentorButton gains hideIcon and hideHtmlElement props. Blocks that embed the shared button and only need a title + variant (handling URL/icon externally) can now hide the icon toggle + picker and the <a>/<button> element select from the settings popover, matching the existing hideVariant / hideSize / hideLink flags. Both default off, so the standalone e-button block and existing consumers still show every control. Editor-only; no frontend or API change.

0.15.4

  • Restore inspector-control spacing under WordPress 7.0. @wordpress/components 32.0.0 (bundled by WP 7.0) flipped __nextHasNoMarginBottom to default-true, silently removing the implicit 8px bottom margin from controls that relied on it. The affected bare controls — e-slider settings (Autoplay Speed, Slider ID, Slides per view, Space Between Slides), e-query-loop (Posts Per Page, Query ID, taxonomy FormTokenField), and e-picker-query-loop (Query ID) — are now wrapped in PanelRow, the house spacing idiom, so inspector panels render with consistent gaps again on WP 7.0. Editor-only; no frontend or API change.
  • Align @wordpress/* devDependencies with the WP 7.0 runtime. These imports are externalized to window.wp.*, so the WP-bundled Gutenberg versions are what actually runs — declared ranges now match them instead of npm latest: components ^32.2.1, icons ^11.7.1, block-editor ^15.13.2, blocks ^15.13.1, block-library ^9.40.2, i18n ^6.13.1. Also declares the previously undeclared externalized imports (compose ^7.40.1, data ^10.40.1, element ^6.40.1, hooks ^4.40.1, html-entities ^4.40.1) so their types resolve, and removes the unused webpack-era @wordpress/dependency-extraction-webpack-plugin. Types/lint-only; runtime is unchanged by design.
  • Consumer migration: the core update itself is a transparent patch within the existing ^0.15 range (pnpm up @webikon/webentor-core && composer update webikon/webentor-core); the @wordpress/* dependency alignment applies to consumer theme manifests via pnpm dlx @webikon/webentor-codemods run starter-2.1.2 (dry-run), then --apply. See @webikon/webentor-codemods.

0.15.3

  • Fix e-picker-query-loop ignoring the manual pick order. The Posts Picker Query Loop block stores the editor's hand-picked order in its posts attribute and builds a WP_Query with post__in, but never set orderby, so WP_Query fell back to its default orderby => date, order => DESC and re-sorted the results by publish date — discarding the chosen order on the frontend. It now sets 'orderby' => 'post__in', so picked posts render in exactly the order the editor arranged them. No consumer migration needed; the webentor/query_loop_args filter can still override orderby per query.

0.15.2

  • Preserve text alignment on core blocks under WordPress 7.0. WP 7.0 moved Paragraph's "Align text" control into supports.typography.textAlign, which the disableTypography filter was wiping by nulling the whole typography object. The filter now keeps textAlign and strips only the rest, so Paragraph/Heading keep alignment while native typography stays hidden. No consumer migration needed.

0.15.1

  • Fix focal-point cropping in responsive <source srcset>. get_resized_image_object() re-derived its src via bis_get_attachment_image_src() without the $crop flag, so Better Image Sizes never read the attachment's focal_point meta for the srcset — the <picture> <source> entries (1x/2x) loaded the center-fit file while only the fallback <img> honored the focal point. It now passes $crop through, matching get_resized_image_url(), so focal-point crops apply at every breakpoint. Also stops generating the redundant crop-less duplicate file. No API change for consumers.

0.15.0

  • Vite 8 / Rolldown build toolchain. Migrate the package build from Vite 7 to Vite 8 (Rolldown). Editor, app, and slider bundles are rebuilt under Rolldown; the manifest contract is unchanged, so consumers consume assets exactly as before.
  • Shared WordPress externals interop. The @wordpress/*wp.* / React externalization now comes from @webikon/webentor-configs/vite (wordpressExternals(command), requires @webikon/webentor-configs ^1.1.0). It's hybrid per command: roots wordpressPlugin() + interop shims for build, kucrut wp_scripts() for the dev server (serve).
  • Editor interop fixes for Rolldown. Rolldown otherwise broke the block editor two ways — it preserved a CJS require() of the @wordpress/* externals, and mis-bound the ESM import * as React. Fixed with a generateBundle require-shim for @wordpress and by aliasing react/react-dom/jsx-runtime to the window.* CJS shims. The editor works fully on Vite 8.
  • Dev-tooling bumps: vite 8, @roots/vite-plugin 2.2.0, @vitejs/plugin-react 6 (devDependencies; no runtime/API change for consumers).
  • Consumer migration: the dependency bumps, the resources/scripts/app.ts static-asset import.meta.glob change, and the vite.config.js externals rewrite apply to consumer theme code. Run pnpm dlx @webikon/webentor-codemods run 0.15.0 (dry-run), then --apply; the vite.config.js change is a documented manual step. See @webikon/webentor-codemods.

0.14.1

  • Republish of 0.14.0 with the Vite 7 toolchain. 0.14.0 inadvertently shipped an in-progress Vite 8 / Rolldown migration (devDependency bumps + Rolldown-built assets). There is no runtime or API change for consumers — devDependencies are not installed by consumers and the bundle output is equivalent — but 0.14.1 restores a consistent Vite 7 build. Prefer 0.14.1 over 0.14.0.

0.14.0

  • Make l-section background settings extensible, mirroring the button extension pattern.
    • New overlay feature (first-class): enable an overlay with opacity + color from the block's "Background Image Settings" panel. Renders a .w-section-overlay element with a w-section--has-overlay class on the <section>. Color/opacity are piped through the --w-section-overlay-color / --w-section-overlay-opacity CSS custom properties, so consumers can override the variables or the whole .w-section-overlay rule in CSS. Fixes a latent issue where the editor drew a fixed bg-black opacity-20 overlay that never rendered on the frontend — the preview now reflects the actual setting.
    • New editor (JS) filters for injecting custom controls into the background panel: webentor.core.l-section.bgSettingsBefore and webentor.core.l-section.bgSettingsAfter (signature (node, props); return a React node). Controls store data on the free-form bgSettings block attribute via setAttributes.
    • New frontend (PHP) filters: webentor/l-section/section_classes (append classes to the <section>, e.g. for variants), webentor/l-section/overlay (override the overlay markup), and webentor/l-section/inner_start (inject markup at the start of the section). Each receives ($value, $attributes, $block).
    • See the docs guide "Extend Section Background" (docs/src/guides/extend-l-section.md) for a consumer variant-dropdown example.
  • Fix l-section "Hidden" responsive display: because the section splits classes between the <section> wrapper and the inner container, a display:none value previously landed on the inner container and only hid the content — the background image, overlay, and spacing still rendered. Hide tokens (hidden / {bp}:hidden) now apply to the <section> wrapper so the whole section is hidden; other display values (flex/grid/block) stay on the inner container. The editor preview dims the whole section when hidden.
  • Consolidate all l-section z-index into the block's style.css (keyed by .w-section-img, .w-section-overlay, .w-section--has-overlay .w-section-inner) instead of scattered wbtr:z-[*] utilities in the editor component and Blade view.

0.13.0

  • WordPress 7.0 / PHP 8.4 compatibility: resolve block-editor deprecation notices surfaced by the iframed editor and the newer @wordpress/* runtime.
    • Add apiVersion: 3 to l-nav-menu, l-mobile-nav, and l-site-logo blocks (they use useBlockProps, which requires API v2+; fixes the "API version 1 / iframe editor" warnings).
    • Enqueue core editor styles on enqueue_block_assets (guarded by is_admin()) instead of enqueue_block_editor_assets, so WordPress routes them into the editor iframe correctly (fixes "added to the iframe incorrectly"). Styles still stay off the public frontend.
    • Refactor the e-gallery block toolbar to use ToolbarButton (via MediaUpload's render prop) instead of custom components wrapped in ToolbarItem (deprecated since 5.6).
  • Update dependencies to latest stable: @wordpress/* (block-editor/blocks 15.21, components 35, block-library 9.48, i18n 6.21, icons 14, dependency-extraction 6.48), @10up/block-components 1.22.2 (resolves the getMedia deprecation), swiper 12.2, alpinejs/@alpinejs/collapse 3.15.12.
  • Update dev tooling, including majors: stylelint 17 + stylelint-config-recommended 18, @types/wordpress__block-editor 15, prettier-plugin-tailwindcss 0.8, plus typescript-eslint 8.61, prettier 3.8, postcss 8.5, tailwindcss 4.3. (ESLint 10, React 19, Vite 8, TypeScript 6 and lint-staged 17 are intentionally held — incompatible peers / runtime constraints.)
  • Consumer migration: the editor-asset enqueue change applies to consumer theme code too (app/setup.php), as do the dependency bumps. Run the codemod from your project root: pnpm dlx @webikon/webentor-codemods run 0.13.0 (dry-run), then --apply. See @webikon/webentor-codemods.

0.12.0

  • BREAKING: Remove init.php entry point. Bootstrap logic (constant defines, optional vendor autoload, core app file requires) moved into WebentorCoreServiceProvider. Acorn auto-discovery handles loading — consumer themes must no longer manually require_once WEBENTOR_CORE_PHP_PATH . '/init.php' from functions.php.
    • Migration: delete the require_once WEBENTOR_CORE_PHP_PATH . '/init.php' line from your theme's functions.php. Keep the WEBENTOR_CORE_PHP_PATH define — it's still consumed by config/view.php to register core view paths. Then run composer update webikon/webentor-core && wp acorn optimize:clear.

0.11.0

  • Add responsive spacing settings for WP Core blocks (core/paragraph, core/heading) — spacing panel appears automatically, classes rendered on frontend via WP_HTML_Tag_Processor
    • Filterable block list: JS webentor.core.wpCoreBlocksWithSpacing, PHP webentor/wp_core_blocks_with_spacing
    • Native WP spacing controls disabled on affected blocks to avoid duplication
  • Fix React hooks warning ("Do not call Hooks inside useEffect") caused by generateClassNames being called outside React component context via blocks.getSaveContent.extraProps
  • Fix WP Core blocks breaking after save/refresh — classNameGenerator no longer injects responsive classes into saved markup, preventing block validation failures on static blocks
  • Fix l-section responsive settings not splitting classes between wrapper and inner container in editor (layout/flexbox/grid classes now correctly apply to the inner container, matching frontend behavior)
  • Add WebentorCoreServiceProvider — Acorn auto-discovered service provider for webentor-core
    • Blade directives (@sliderContent, @enqueueScripts, @xdebugBreak) moved from theme to core
    • View Components (Button, Slider) moved from theme to core — themes can override by extending Webentor\Core\View\Components\Button etc.
    • Core block data.php files now loaded by the service provider instead of ThemeServiceProvider

0.10.1

  • Fix l-section inner z-index

0.10.0

  • Refactor responsive settings and improve UX
    • BREAKING: Run keys migrator from Settings -> Webentor Migrator
    • BREAKING: Attributes keys changed, so supports in block.json and other usage in theme needs to be checked and renamed:
      • flexboxItem -> flexItem
      • display -> layout (for display) and sizing (for width, height, minWidth, minHeight, maxWidth, maxHeight)
    • Added reset buttons for breakpoints
    • Better values grouping
    • Better cascade breakpoints conditioning
    • Spacing linking
  • Add webentor/block_wrapper_class_properties filter to exclude generated class groups such as backgroundColor and textColor from filtered classes_by_property and wrapper output, while keeping the raw generated map available for block_custom_classes
  • Add Wrap with Flexible container
  • Add applied classes viewer to see which responsive classes are applied
  • Add Quick layout presets, customizable with filter webentor.core.responsiveSettings.layoutPresets
  • Fix PHP path in init.php
  • Add package module exports, you can now use @webikon/webentor-core instead of @webentorCore when importing in the theme
  • Add webentor.core.l-section.output filter to customize the section editor preview markup

0.9.14

  • Fix Button link display
  • Disable auto sizes styles for images

0.9.13

  • Fix CSS formatting (quote style normalization, multiline transitions, selector indentation)

0.9.12

  • Add webentor.core.button.output filter
  • Allow picking up multiple post types in Query Loop block
  • Add e-button HTML Element setting
  • Fix webentorConfig safelist
  • Fix image object-fit defaults
  • Fix useParentBlock hook to get proper parent block
  • Adjust responsive settings to be conditioned by parent block
  • Fix Table block cell colspan
  • Fix button url escaping & show conditional
  • Fix Vite blocks build on Windows Herd
  • BREAKING: Fix accordion collapse animation - if you customized accordion blade view, adjust its content wrapper
  • Fix l-404 block button
  • Fix $anchor passed variable in inner blocks

0.9.11

  • Fix husky install
  • Add missing wbtr: prefixes in blocks edit
  • Fix rendering in REST API request
  • Refactor custom size settings into separate React component
  • Improve block classes rendering conditions
  • Improve block assets registering, so they can be overriden in the theme
  • Allow picking up multiple post types in Picker Query Loop block
  • NEW: Add basic webentor-config, which can be included in the theme, export spacing
  • NEW: Add flexbox, grid and background image settings to Section block
  • NEW: Add webentor/e-gallery block
  • NEW: Add hooks webentor/skip_render_block_blade and webentor/slider/view/swiper_params
  • NEW: Add loop and slider_id settings to Slider block
  • NEW: Add flex/grid item order settings
  • NEW: Add JS events e_tabs_nav_initialized, e_tabs_nav_item_clicked, e_accordion_btn_clicked
  • NEW: Add components BEM classes
  • NEW: Add aspect-ratio settings to e-image block.
    • BREAKING: Add aspect-ratio config to webentor-config.ts
  • BREAKING:: Change view paths for Blade blocks and core-components. Now these folder names doesn't need to be included in the path when including views from them.
    • Replace core-components.button.button and core-components.slider.slider with button.button and slider.slider
    • If you included blocks as blocks.blockName.view, remove blocks. and leave just blockName.view
  • Fix slider pagination styles
  • Update deps
  • Fix publicDir Vite error
  • Remove Button asPill parameter

0.9.10

  • Add ability to select icon in Button Block
  • Fix condition to render flex/grid item classes depending on parent display setting

0.9.9

  • BREAKING: Move slider styles to @layer components
  • Add more slider view classes
  • Remove empty styles folders
  • Add opacity to hidden FC blocks instead of hiding them entirely

0.9.8

  • Add pnpm
  • Update node deps
  • BREAKING: Rename npm package to @webikon/webentor-core
  • BREAKING: Include build/ assets

0.9.7

  • Fix empty content in WP REST API response

0.9.6

  • Add Icon Picker block
  • Update deps

0.9.5

  • Add new border & border radius responsive settings, applied to Flexible Content, Section and Image
  • Add Picker Query Loop block
  • (BREAKING) Remove old Image block border and rounded setting which are replaced by border responsive settings

0.9.4

  • Bundle core-js package
  • Add Button component extension hooks
  • Add Vite build plugin
  • Update deps