Skip to content

v1.0.19#242

Merged
lukasniebler merged 66 commits into
mainfrom
dev
Jun 24, 2025
Merged

v1.0.19#242
lukasniebler merged 66 commits into
mainfrom
dev

Conversation

@lukasniebler

Copy link
Copy Markdown
Collaborator

No description provided.

This fix aims to fix the gsap animations for the counter-row by resetting the scroll position on load.
Ensures all categories are available for selection by setting `per_page` to -1 in the `getEntityRecords` call. This resolves an issue where only a limited number of categories were displayed.
Updates the news block with a new generated index.js file
and updates the asset file with a new version.
Ensures collapse and accordion titles are sanitized by removing HTML tags and normalizing special characters.

This prevents potential XSS vulnerabilities and improves the consistency of title display when migrating old content into the new block. Resolves #239
Enhances the title sanitization process to create more reliable jump names.

This includes:
- Removal of HTML tags.
- Removal of common HTML entities.

These changes improve the accuracy and consistency of jump name generation.

Resolves #239, #238
Ensures the `jumpName` attribute is sanitized during the block transformation process.

This prevents potential issues caused by invalid characters in the jump name, improving the reliability of the collapsible block's functionality.

Resolves #238
Extends the allowed blocks for the timeline item
to include the "media-text" block, enabling users
to incorporate media alongside text content within
timeline items.
Deprecations still need to be adressed.
Adds deprecated component to handle migrations and ensure backward compatibility for older versions of the Alert block.

This enables smooth transitions and prevents breaking changes for users who have utilized previous versions of the block.
Updates the accordion block with frontend rendering.

The accordion block allows users to create collapsible sections of content.
It includes attributes for title, color, heading level, and jump name.
Also registers the block type with a render callback to handle frontend display.
Updates "Accordions" block to wrap multiple "Accordion" blocks.

This change introduces a parent block for the existing Accordion block, enabling users to group multiple accordions within a single container.

- Registers the dynamic block "Accordions".
- Creates a new class `Accordions` to handle the rendering of the new block.
- Deprecates an older version of the accordions block.
This change introduces a dynamic block registration system, streamlining the process and reducing code duplication.

Instead of registering each dynamic block individually, it now uses a loop to iterate through an array of block definitions.  This approach makes it easier to add or modify blocks in the future.

The 'collapsibles' and 'collapse' blocks are now handled using this dynamic registration. The separate registration functions for alert and accordion blocks are consolidated into a single function.
Updates the collapse block with enhanced features to use dynamic rendering in the future:
- Includes title, color, and jump name attributes.
- Integrates SVG icons for visual enhancements.
- Supports loading the collapsed section open by default.
- Introduces deprecated versions for backward compatibility.
Adds dynamic rendering for the Collapsibles block to the editor, allowing users to group related content within expandable sections.

This change introduces:
- Dynamic Collapsibles block with options for an "expand all" link and customizable labels.
- Frontend rendering logic for the block, leveraging inner blocks for content.
- Deprecation handling for previous versions of the block.
Adds dynamic rendering for the notice block with different styles and icons.

The dynamic notice block allows users to display important information or announcements in a visually appealing way. It includes several pre-defined styles with corresponding icons and supports inner blocks for adding content.

The block is registered as a dynamic block and includes deprecated versions for future compatibility.
Adds dynamic rendering for the Columns block with configurable number of columns, rule, width, border, and background color.

This commit introduces dynamic rendering for the "Columns" block, allowing users to create multi-column layouts within the editor.
It supports customization options like the number of columns, the presence of a rule (divider) between columns, column width, border style, and background color, enhancing layout flexibility.
Adds dynamic rendering to the counter block with customizable attributes such as title, description, duration, and font size.

Registers the block type and sets up the render callback to display the counter on the frontend.

Includes deprecated block functionality to support older versions.
This commit streamlines the codebase by removing the separate `save.tsx` files and associated `save` imports from multiple block components.

The functionality of these `save` functions has been integrated directly into the block's `index.tsx` file, typically using `` for rendering saved content.
This change simplifies the block structure and reduces code duplication without affecting functionality.
Refactors counter and timeline animations to improve initialization and refresh behavior.
The changes include:
- Ensures that animations are properly initialized and refreshed on window load and page transitions.
- Improves the handling of reduced motion preferences.
- Fixes scroll position issues.
Updates the counter animation logic to use GSAP's `modifiers`
instead of `onUpdate` for formatting numbers with dots. This
improves performance by directly modifying the text content
during the animation, reducing unnecessary calculations.
Adds the ability to apply color theming to CTA blocks based on predefined color schemes (TF, PHIL, RW, MED, NAT).

This change ensures that the background and text colors of the CTA block adapt to the selected color theme, improving visual consistency.
Comment thread src/utility/utils.ts Fixed
Enhances the sanitization function to better handle HTML entities and whitespace when generating jump names from titles.

It achieves this by:
- Decoding HTML entities present in the title.
- Removing redundant hyphens.
- Trimming leading and trailing hyphens.
Comment thread src/utility/utils.ts Fixed
Comment thread src/utility/utils.ts Fixed
Replaces the custom HTML entity decoding logic in `sanitizeTitleToJumpName` with the `he` library.

This ensures more robust and accurate decoding of HTML entities in titles,
leading to better jump name generation.
Also removes the DOMParser method and the entityMap for decoding.

Also adds he as a dependency.
@lukasniebler lukasniebler requested a review from Copilot June 13, 2025 13:28

This comment was marked as resolved.

Adds a default wrapper class to the Counter block and implements a function in CounterRow to strip legacy wrappers, ensuring consistent styling and backward compatibility.
Updates the plugin version across all relevant files
(package.json, main plugin file, and block.json files) to
ensure consistency.
@lukasniebler lukasniebler requested a review from Copilot June 16, 2025 13:22

This comment was marked as outdated.

Updates the changelog, readme, and readme.txt files to reflect the release of version 1.0.19.

This release includes dynamic rendering for blocks, sanitization improvements, new timeline block features and addresses several bug fixes related to animations and category selection.
Refactors the animation initialization process by wrapping the code in try-catch blocks to handle potential errors and prevent the entire script from failing.

This change ensures that errors during animation initialization are caught and logged, allowing the rest of the website to function correctly. It also improves the robustness and maintainability of the code.

Fixes #233
Ensures timeline animations function correctly even when a timeline item does not have a tooltip, preventing errors and improving robustness.

Also removes minified file which should not be part of the commit.
Enhances the alert block's styling options, including font color control and background customization. Introduces a 'font-light' class for improved text contrast on dark backgrounds. Also, ensures consistent styling for the blocks within alerts.
Refactors the CTA block's CSS to correctly apply background and text colors based on the selected color scheme.

This change ensures that the CTA block's appearance accurately reflects the chosen theme, enhancing visual consistency and user experience.
@lukasniebler lukasniebler requested a review from Copilot June 23, 2025 14:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This release upgrades to version 1.0.19, refactors block saving into dynamic rendering using InnerBlocks.Content, adds improved title‐to‐anchor sanitization, and updates server‐side block registration.

  • Enhanced sanitizeTitleToJumpName with HTML decoding and more robust hyphen cleanup.
  • Converted most block save functions to simple <InnerBlocks.Content /> wrappers and introduced dynamic PHP render callbacks.
  • Bumped version tags across JSON, PHP, and readme files.

Reviewed Changes

Copilot reviewed 215 out of 225 changed files in this pull request and generated 2 comments.

File Description
src/utility/utils.ts Rewrote title sanitization to use he.decode and chained replaces for umlauts and punctuation.
includes/Patterns.php Modified is_development_environment() to include a second environment check.
includes/Main.php Added new rrze_register_dynamic_blocks() method for dynamic render callbacks.
Comments suppressed due to low confidence (2)

src/blocks/collapsibles/transforms.ts:191

  • Remove this debugging console.log call or wrap it in a conditional debug flag to avoid unintended console output in production.
        let titleStore: { title: string; type: string; level: number; items?: any[] }[] = [];

src/components/CustomColorSwitcher.tsx:58

  • [nitpick] There's a stray ESLint disable comment without a rule. Remove it or specify which rule is being disabled to keep linting configurations clear.
	} catch (error) {

Comment thread includes/Patterns.php Outdated
Comment thread src/utility/utils.ts
Corrects a logic error in the environment check to properly identify development environments.

Adds 'FAU-Elemental' to the list of allowed theme prefixes.
@lukasniebler lukasniebler merged commit abdf6e5 into main Jun 24, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants