-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Turn this into a core addon #211
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
pre-commit.ci autofix |
@jensens I see that you added already a @ericof @mauritsvanrees I requested the new classifier: pypa/trove-classifiers#146 I was about to ask for the |
@jensens great job! 😄 👍🏾 I have a few questions though, unfortunately we did not have enough time this week to talk about things in depth 😅 I was mostly 😵💫 all they long with too many conversations going on 😅 Anyway:
|
This package's translations are already included in the plone domain, so we don't need to do anything. The pot file generation script will take the messages wherever they are. |
One important point about Trove classifiers and CI: As soon as the classifier is accepted, w e need to bump the trove-classifiers package everywhere (or in meta) |
The classifier has been merged, but it does not appear, yet, on pypi, but hopefully is a matter of a few days/weeks 🍀 |
Note: This needs an uninstall as well. |
pre-commit.ci autofix |
… remove old files
updates: - [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](asottile/pyupgrade@v3.15.2...v3.16.0) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.0](PyCQA/flake8@7.0.0...7.1.0)
Is that actually needed in Plone 6?
updates: - [github.com/asottile/pyupgrade: v3.16.0 → v3.17.0](asottile/pyupgrade@v3.16.0...v3.17.0) - [github.com/psf/black: 24.4.2 → 24.8.0](psf/black@24.4.2...24.8.0) - [github.com/PyCQA/flake8: 7.1.0 → 7.1.1](PyCQA/flake8@7.1.0...7.1.1) - [github.com/collective/i18ndude: 6.2.0 → 6.2.1](collective/i18ndude@6.2.0...6.2.1)
I have added an upgrade step in plone/plone.app.upgrade#330. See testing hints there. I have merged main/master in the PR branches of the other packages. This seems ready now. |
I noticed that on Jenkins only 142 robot tests were run instead of 149. The console showed the reason: ``` Set up plone.app.contenttypes.testing.PloneAppContenttypes in 0.020 seconds. Set up plone.app.robotframework.testing.SimplePublicationLayer in 0.001 seconds. Set up plone.app.robotframework.remote.RemoteLibraryBundle:RobotRemote in 0.000 seconds. Set up plone.testing.zope.WSGIServer in 0.043 seconds. Set up plone.app.robotframework.testing.RemoteLibrary:Robot in 0.000 seconds. Set up plone.app.discussion.testing.PloneAppDiscussionRobot Traceback (most recent call last): File "/Users/maurits/shared-eggs/cp311/zope.testrunner-6.4-py3.11.egg/zope/testrunner/runner.py", line 474, in run_layer setup_layer(options, layer, setup_layers) File "/Users/maurits/shared-eggs/cp311/zope.testrunner-6.4-py3.11.egg/zope/testrunner/runner.py", line 839, in setup_layer setup_layer(options, base, setup_layers) File "/Users/maurits/shared-eggs/cp311/zope.testrunner-6.4-py3.11.egg/zope/testrunner/runner.py", line 844, in setup_layer layer.setUp() File "/Users/maurits/shared-eggs/cp311/plone.app.testing-7.1.0-py3.11.egg/plone/app/testing/helpers.py", line 378, in setUp self.setUpPloneSite(portal) File "/Users/maurits/community/plone-coredev/6.1/src/plone.app.discussion/plone/app/discussion/testing.py", line 111, in setUpPloneSite settings = registry.forInterface(IDiscussionSettings) File "/Users/maurits/shared-eggs/cp311/plone.registry-2.0.1-py3.11.egg/plone/registry/registry.py", line 71, in forInterface raise KeyError( KeyError: 'Interface `plone.app.discussion.interfaces.IDiscussionSettings` defines a field `globally_enabled`, for which there is no record.' ```
We are already loading a file with the same name from plone.app.robotframework.
Note for reviewers: several GitHub Actions tests fail in this PR. This is because in GitHub Actions we test against what is on https://dist.plone.org/release/6.1-dev/. And these tests will fail because we need several checkouts. That is what we do on Jenkins, so we can ignore the failing tests here. |
This should work https://github.com/plone/buildout.coredev/blob/6.1/plips/plip-padiscussion-addon.cfg |
PLIP jobs in jenkins can be added, it's a matter of configuring them, they do not appear automatically though... |
<property name="content_icon">discussionitem_icon.png</property> | ||
>Discussion Items are documents which reply to other content. | ||
They should *not* be addable through the standard 'folder_factories' interface.</property> | ||
<property name="content_icon">string:${portal_url}/discussionitem_icon.png</property> |
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.
This should be something like: string:chat-left-text
?
<property name="content_icon">string:chat-left-text</property>
i.e. this icon: https://icons.getbootstrap.com/icons/chat-left-text/
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.
Actually, the content_icon
property should no longer be used. At least I do not see it in the type definitions in plone.app.contenttypes
.
Same for content_meta_type
. I have removed them from this branch now.
We can still look at improving other icons, which you are partially already doing here: https://github.com/plone/plone.app.discussion/pull/222/files
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.
Oops, removing those old properties is a bad idea. At least, when I instead add icon_expr
, I get an error while creating a Plone Site. So I reverted that change.
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.
@gforcada I have updated your PR 222 to update more icons and add an upgrade step. That is for Plone 6.0.
And I have copied that code in adapted form to the current PR for 6.1.
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.
And yes, I took your proposed icon chat-left-text
. :-)
This was moved here from `plone.app.dexterity`, but it has the exact same contents as `tests/functional_test_behavior_discussion.rst`. I compared again with the original in `plone.app.dexterity`, and it is indeed the same, except that the behavior name is fixed to `plone.allowdiscussion` instead of the former `plone.app.dexterity.behaviors.discussion.IAllowDiscussion`.
The FTIs in `plone.app.contenttypes` do not have them.
…rom FTI." This reverts commit da5b2f5. I looked at `plone.app.contenttypes` for comparison, but those are Dexterity FTIs, and here we have an old-style FTI. When I locally added `icon_expr` in here, I actually got an error while adding a Plone Site: ``` ValueError: http://localhost:8080/@@plone-addsite Traceback (innermost last): Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents Module ZPublisher.WSGIPublisher, line 391, in publish_module Module ZPublisher.WSGIPublisher, line 285, in publish Module ZPublisher.mapply, line 98, in mapply Module ZPublisher.WSGIPublisher, line 68, in call_object Module Products.CMFPlone.browser.admin, line 299, in __call__ Module Products.CMFPlone.factory, line 165, in addPloneSite Module Products.GenericSetup.tool, line 393, in runAllImportStepsFromProfile - __traceback_info__: profile-Products.CMFPlone:plone Module Products.GenericSetup.tool, line 1513, in _runImportStepsFromContext Module Products.GenericSetup.tool, line 1360, in _doRunHandler Module Products.CMFPlone.setuphandlers, line 139, in importFinalSteps Module Products.GenericSetup.tool, line 393, in runAllImportStepsFromProfile - __traceback_info__: profile-Products.CMFPlone:dependencies Module Products.GenericSetup.tool, line 1504, in _runImportStepsFromContext Module Products.GenericSetup.tool, line 1316, in _doRunImportStep - __traceback_info__: typeinfo Module Products.CMFCore.exportimport.typeinfo, line 222, in importTypesTool Module Products.GenericSetup.utils, line 926, in importObjects - __traceback_info__: portal_types Module Products.GenericSetup.utils, line 922, in importObjects - __traceback_info__: types/Discussion_Item Module Products.GenericSetup.utils, line 525, in _importBody Module Products.CMFCore.exportimport.typeinfo, line 61, in _importNode Module Products.GenericSetup.utils, line 757, in _initProperties ValueError: undefined property 'content_icon' ``` So let's keep the old-style properties, although I am not sure they are actually used anywhere in current Plone.
The `view` action of comments had no icon on Plone 6.
Update the profile version to 3000. This leaves room for upgrades on the 4.x branch (Plone 6.0).
I merged all PRs, except this one... Oops. :-) Doing so now. |
sync with CMFPlone, make installable and remove old files.
(to be) Merged on its own:
Need to be merged together
Jenkins paste to test together: