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

PLANET-7635 Move remaining code from plugin #2483

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

mleray
Copy link
Contributor

@mleray mleray commented Dec 18, 2024

Description

See PLANET-7635

Moved code:

Other changes

  • Remove last uses of p4bk_vars
  • Wait for DOM content to be loaded before using frontend functions in app.js
  • Fix Happy Point default image
  • Moved filters from planet4-plugin-gutenberg-blocks

Note: the editor validation feature also needs to be moved, it's done in #2470

@mleray mleray self-assigned this Dec 18, 2024
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold fa41d8a9-8b7d-4dac-a210-1c1beff7f362
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 600b91e4-0af2-4943-8b1f-2efd4982d0ff
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold ba88e203-4e03-4a37-9697-60664f3321cc
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 21dc9923-08b4-42a2-a8ce-e4c03787cd01
@mleray mleray force-pushed the plugin-retirement branch 2 times, most recently from a67d320 to f643e97 Compare December 18, 2024 14:56
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold aefb8362-e8ba-4cf9-a778-05e8a5fe5898
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold e7ca49ea-424a-4b4b-9f0c-187c20179cb4
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold a81dcfe8-f6a4-45dc-9a00-1be5f0489e6f
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 15c9f992-8501-459c-bf82-325d11d93fa6
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 122a1fc2-04e1-43df-babe-8e5b3638925c
@mleray mleray force-pushed the plugin-retirement branch 2 times, most recently from 925c4a3 to 447ecf7 Compare December 18, 2024 15:50
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 684c4a03-dbf6-418c-89ec-7999c59fd837
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold b4e119b3-104b-4798-af3b-89778ea1c25b
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold d0ff754a-d777-4fb8-9f3e-9abe12e5ae16
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 7347750d-5a3b-474e-b1e6-ea2b6def96f2
planet-4 added a commit to greenpeace/planet4-test-titan that referenced this pull request Dec 18, 2024
/unhold 7c44179c-eaf0-46cd-8494-5768d7469a80
planet-4 added a commit to greenpeace/planet4-test-umbriel that referenced this pull request Jan 21, 2025
/unhold da668e3e-9b35-4cd2-b78e-ca7e170f41bc
src/Loader.php Outdated Show resolved Hide resolved
Copy link
Contributor

@GP-Dan-Tovbein GP-Dan-Tovbein left a comment

Choose a reason for hiding this comment

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

@mleray I'm leaving some comments but please feel free to modify what you consider neccesary.


const newTermLabel =
taxonomy?.labels?.add_new_item ??
(slug === 'post_tag' ? __('Add new tag') : __('Add new Term'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to add the domain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because this is copied from a WordPress original file. We should update it though, and there is a ticket for that already!

(slug === 'post_tag' ? __('Add new tag') : __('Add new Term'));
const singularName =
taxonomy?.labels?.singular_name ??
(slug === 'post_tag' ? __('Tag') : __('Term'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to add the domain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because this is copied from a WordPress original file. We should update it though, and there is a ticket for that already!

@mleray mleray requested a review from GP-Dan-Tovbein January 24, 2025 09:18
mleray added 17 commits January 24, 2025 10:18
This is in preparation to finally retire it
This was set in the plugin but in the theme we use p4_vars
We made some simplifications when migrating the block to the theme that broke this behaviour
We can just add these in the editor overrides
This removes one line of code with an unnecessary variable
This removes a file and some unnecessary code
This was requested by PR feedback
These were really small files so we can directly include the code in editorStyle
Not sure why this function was duplicated there
The slug was incorrect
These used to be in the plugin
This used to be in the plugin
This filter used to be in the plugin
This is no longer used
These are minor but do improve the code
@mleray mleray force-pushed the plugin-retirement branch from 13ad035 to ed44cc0 Compare January 24, 2025 09:18
planet-4 added a commit to greenpeace/planet4-test-umbriel that referenced this pull request Jan 24, 2025
/unhold 83699bc5-c320-4a4a-aed3-e7d87ae89b58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants