Skip to content
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

React 18 compatibility #2268

Merged
merged 57 commits into from
Jan 28, 2025
Merged

Conversation

bordoni
Copy link
Member

@bordoni bordoni commented Nov 14, 2024

Ticket: TEC-5322
Update asset version, registration and usage to align with React 18.

lucatume and others added 20 commits November 14, 2024 10:44
Most of the libraries used by the modules today are shipping with WP, no
need to rebundle them.
This is not a solution since no replacement is provided.
The todo note is a reminder to come back to this.
The php-date-formatter package does not really export anything, so it
cannot be aliased in webpack externals. The next best thing is moving
the script to Common and providing a handle for it.
While we need the plugin text domain in the matching function, no need
to load markup and translate information.
@lucatume lucatume force-pushed the fix/TEC-5322-wp-67-packages branch from 406b23c to 01ab890 Compare November 22, 2024 10:51
@lucatume lucatume force-pushed the fix/TEC-5322-wp-67-packages branch from a4d4a23 to b21c56a Compare December 4, 2024 14:54
@lucatume lucatume force-pushed the fix/TEC-5322-wp-67-packages branch from cc8883c to b29019c Compare December 5, 2024 12:53
@lucatume lucatume changed the base branch from master to release/T25.imp January 7, 2025 10:35
This updates the `data` attribute to use a less generic name and
modifies the `click` handler logic to target IAN elements only.
Additionally, ensure elements exist in the current context before
targeting them.
@lucatume lucatume force-pushed the fix/TEC-5322-wp-67-packages branch from 89547e7 to 6fd025a Compare January 15, 2025 10:40
@lucatume lucatume force-pushed the fix/TEC-5322-wp-67-packages branch from 6fd025a to 1142ac7 Compare January 15, 2025 10:41
Base automatically changed from release/T25.imp to master January 22, 2025 20:29
@lucatume lucatume changed the base branch from master to release/T25.adamwarlock January 24, 2025 09:36
Copy link
Member

@dpanta94 dpanta94 left a comment

Choose a reason for hiding this comment

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

Just a file movement in order for our final zips to include php-date-formatter.js.

Everything else looks great!

Comment on lines +53 to +54
"node_modules/php-date-formatter/js/php-date-formatter.js",
"node_modules/php-date-formatter/js/php-date-formatter.min.js",
Copy link
Member

Choose a reason for hiding this comment

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

Can we include those outside of node_modules ?

Copy link
Contributor

@lucatume lucatume Jan 24, 2025

Choose a reason for hiding this comment

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

I think the build system should support this, changing the way dependencies are managed, in node_modules and through npm, to go with something that is fixed (in vendor or includes) seems working around a bug.
The node_modules directory is being included when ET is built.

Furthermore, this is both included directly, and imported in the blocks.

Could the build system be fixed?

@@ -258,6 +258,7 @@ public function load_assets() {
[ 'tribe-attrchange', 'vendor/attrchange/js/attrchange.js' ],
[ 'tec-ky-module', 'vendor/ky/ky.js', [], null, [ 'module' => true ] ],
[ 'tec-ky', 'vendor/ky/tec-ky.js', [ 'tec-ky-module' ], null, [ 'module' => true ] ],
[ 'tec-common-php-date-formatter', 'node_modules/php-date-formatter/js/php-date-formatter.js' ],
Copy link
Member

Choose a reason for hiding this comment

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

the file source would need to be replaced here as well

@bordoni bordoni merged commit 028c6e6 into release/T25.adamwarlock Jan 28, 2025
17 checks passed
@bordoni bordoni deleted the fix/TEC-5322-wp-67-packages branch January 28, 2025 18:23
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