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

Refactor plone.app.contentrules to provide API methods, which plone.restapi can use #4110

Open
MrTango opened this issue Feb 14, 2025 · 6 comments

Comments

@MrTango
Copy link
Contributor

MrTango commented Feb 14, 2025

PLIP (Plone Improvement Proposal)

Responsible Persons

Proposer: @MrTango

Seconder:

Abstract

Currently plone.restapi is directly filling out form data, instead of using Python API methods.
This makes it impossible to decouple plone.app.contentrules UI related code from API code.
We should introduce Python API methods, plone.restapi could use.

Motivation

We want to decouple the UI related code and templates and move it to plone.app.layout, so that headless installations can work without it.

Assumptions

Proposal & Implementation

  • Add Python API methods, which plone.restapi/plone.api could use.
  • Move UI related code to plone.app.layout and make use of the Python API methods.
  • Refacture plone.restapi to use the new Python methods

Deliverables

  • Python API methods for all functions in contentrules
  • UI Code seperated into plone.app.layout
  • updated plone.restapi

Risks

Participants

@petschki petschki changed the title Refacture plone.app.contentrules to provide API methods, which plone.restapi can useb Refactor plone.app.contentrules to provide API methods, which plone.restapi can use Feb 14, 2025
@petschki petschki changed the title Refactor plone.app.contentrules to provide API methods, which plone.restapi can use Refactor plone.app.contentrules to provide API methods, which plone.restapi can use Feb 14, 2025
@MrTango
Copy link
Contributor Author

MrTango commented Feb 14, 2025

@plone/framework-team @plone/classicui-team @plone/restapi-team

@MrTango
Copy link
Contributor Author

MrTango commented Feb 14, 2025

We have to decide if we want to do the effort to separate this or live with the dependency and templates in the headless stack. That's up to debate.

@jensens
Copy link
Member

jensens commented Feb 17, 2025

I propose to turn plone.app.contentrules into a core addon, its a perfect candidate.
This should go in an own PLIP right?

@davisagli
Copy link
Member

@jensens +1

@mauritsvanrees
Copy link
Member

I am +1 for making plone.app.contentrules a core add-on. By extension the same goes for plone.contentrules.

@jensens
Copy link
Member

jensens commented Feb 19, 2025

See new PLIP #4119
Overall, making it a core addon does not make this PLIP vanish (except the line "Move UI related.."), plone.restapi would definitely profit from a better API here. Maintainability here would increase too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants