-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Implement ContentBrowserWidget
for the new pat-contentbrowser
pattern
#197
Conversation
@petschki thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
ca86463
to
1db83a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some remarks in the code.
In general: Do we want to drop support for pat-relateditems
completely? Then we can also remove the Pattern from Mockup.
But isn't that a breaking change? Or is the plan to provide a pat-relateditems
drop-in replacement with a Pattern alias for pat-relateditems
?
Okay, checking one of my more complex projects, I'm not using any templates which would directly use a |
Linking I started testing this implementation with |
@thet the general idea is to provide it with plone.classicui it now as an alternative, already usable in Plone 6.1 and later drop the old implementation in Plone 7. |
@MrTango meanwhile I'm against the "opt-in" approach in favor of automatically provide the new widget with |
The only thing is, we are also having a different feature set and API of the pattern, which is a breaking change too. |
ok... my understanding of the only thing which really would mean a breaking change (we talked about that yesterday) is the dropped "search mode" ... but to be honest, this could be implemented very simple in |
ok than let's go in that direction, if we keep it non breaking, even better. |
58c3119
to
c026425
Compare
@jenkins-plone-org please run jobs |
Latest changes, as talked to @thet lately:
As you can see, there's nothing breaking in the current coredev tests in jenkins ... though these changes will bump version to new feature release /cc @plone/classicui-team |
@petschki your last comment reads like we're still keeping the related items pattern and only provide the content browser pattern for those who actively using it. Is this right? Can the PR plone/plone.app.relationfield#51 ignored for now? |
Well ... the relateditems pattern is used in several places spread all over the core. This widget here is for I just found out, that the And there is the integration in So there are the following steps to replace
UPDATE: these steps depend on the order but do not need to be made all at once. |
4118e58
to
62aff76
Compare
8d25b09
to
54ce09d
Compare
@jenkins-plone-org please run jobs |
ContentBrowserWidget
is simply a copy ofRelatedItemsWidget
and exposes the newpat-contentbrowser
which has the same API and features aspat-relateditems
right now.The following core modules use
RelatedItemsFieldWidget
:For now we only update therelatedItems
field in plone.app.relationfield. The others can be updated afterwards.UPDATE No. 1:RelatedItemsWidget
is now a pure alias ofContentBrowserWidget
usingzope.deferredimport
UPDATE No. 2:
RelatedItemsWidget
is not replaced! Everything works like before, onlyContentBrowserWidget
functionality is added. Nothing changes untilplone.app.relationfield
schema gets updated to the new widget (see PR below).This PR should be tested with:
ContentBrowserWidget
plone.app.relationfield#51)pat-contentbrowser
resources plone.staticresources#336)NOTE: robottests in
Products.CMFPlone
need to be updated too for the new contentbrowser markup.