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 16 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
@mleray
Copy link
Contributor Author

mleray commented Jan 14, 2025

Do we have to move the code lines 129 to 154 from the planet4-gutenberg-blocks.php file?
In the planet4-gutenberg-blocks.php file, starting at line 164 there are a bunch of actions and filters. Should we move them, too?

@mardelnet both great catches and now moved!

@mleray mleray requested a review from mardelnet January 14, 2025 15:08
@mleray
Copy link
Contributor Author

mleray commented Jan 14, 2025

Do we have to move these elements?

  • classes/command/class-controller.php
  • classes/controller/class-uninstall-controller.php
  • classes/exception/class-notimplemented.php

For these, again I'll refer to @comzeradd, sorry but I'm not sure 😬

Edit: @comzeradd the only one I'm unsure of is classes/command/class-controller.php, because:

  • classes/controller/class-uninstall-controller.php is for uninstalling the plugin so it shouldn't be needed anymore once we deprecate it
  • classes/exception/class-notimplemented.php seemed to be used only in this update_data function that we never use, so I removed this code

@comzeradd
Copy link
Member

Edit: this second endpoint seems to be only used in this function, which itself seems to never be called? Pinging @comzeradd again to double-check 😬

Yes, I couldn't find any usage of this function either. We should probably also clean up that code in the theme then.

planet-4 added a commit to greenpeace/planet4-test-umbriel that referenced this pull request Jan 15, 2025
/unhold fd5701f1-903a-4752-8ade-8453eb35ba00
planet-4 added a commit to greenpeace/planet4-test-umbriel that referenced this pull request Jan 15, 2025
/unhold a40ed880-76a9-4775-80a9-e09d2e4a8c4e
@comzeradd
Copy link
Member

@comzeradd the only one I'm unsure of is classes/command/class-controller.php, because:

I think it's fine to leave this out. We already have moved the menu options for this functionality.

@mleray mleray force-pushed the plugin-retirement branch from d0fd1b1 to c798b57 Compare January 20, 2025 09:15
planet-4 added a commit to greenpeace/planet4-test-umbriel that referenced this pull request Jan 20, 2025
/unhold 12df2ee6-d894-4b8e-b7ad-1911f6e884c2
Copy link
Contributor

@mardelnet mardelnet left a comment

Choose a reason for hiding this comment

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

Great job, @mleray
Once the file conflict is solved, I'll approve this PR.
However, due to the complexity and risk of merging this, I'd suggest you go for a second approval and UAT approval, as well.

mleray added 16 commits January 20, 2025 16:31
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
@mleray mleray force-pushed the plugin-retirement branch from c798b57 to 1f43bc6 Compare January 20, 2025 15:32
@mleray mleray requested a review from mardelnet January 20, 2025 15:32
planet-4 added a commit to greenpeace/planet4-test-umbriel that referenced this pull request Jan 20, 2025
/unhold 10493e6b-e1e1-40b8-a504-598a05080640
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.

4 participants