An add-on to make patternslib patterns available within Plone 5.
Project description
An add-on to make patternslib patterns available within Plone 5. It has some limitations (see below).
Features
Plone 5’s Mockup patterns have been relying on the Patternslib core (scanner, registry, base class etc.) for quite some time already.
Because of this it’s possible to use Patternslib patterns (as opposed to the Mockup patterns in Plone 5).
This package makes a selection of those patterns available in Plone 5.
Known Issues
There are still a few patterns that both Plone 5 and Patternslib have. They either conflict, because they use the same name or they conflict, because they attempt to do the same or similar things. For now we chose to explicitly exclude them here.
The Patternslib patterns that are currently disabled (for various reasons) are:
pat-colour-picker
pat-date-picker
pat-gallery
pat-image-crop
pat-legend: It conflicts with pat-autotoc
pat-notification
pat-sortable: Naming conflict with pat-sortable in Mockup.
pat-subform
pat-tabs: New, unreleased Patternslib pattern. Not aware of any conflicts.
pat-toggle: Naming conflict with pat-toggle in Mockup.
pat-tooltip: Naming conflict with pat-tooltip in Mockup.
pat-validation
Examples
There are example browser views for four patterns in the browser directory. If all went well, you can test the following patterns by calling their browser view examples on your plone site:
@@pat-depends
@@pat-inject
@@pat-masonry
@@pat-switch
Development
This package is built similarly to how the mockup sources are pulled into the Plone egg. There is a Makefile which clones patternslib. Similarly to how it is done in Plone5, Patternslib is cloned and built, but only the necessary parts of it are checked in to plone.patternslib.
Make sure that when you update Patternslib that the newer version or files are compatible with the version of pat-utils that are in Mockup/Plone 5.0.x. We are able to override the version of pat-parser, but not pat-utils, because it’s included in the plone-compiled.js bundle (“baked into the cake” so to speak). This means that we have to rely on the version of pat-utils in Mockup/Plone 5.x. If no new methods have been added to pat-utils in later versions of Patternslib, then it shouldn’t be an issue.
If you make some changes to the pattern or the bundle, you need to re-compile the bundle.
You can use plone-compile-resources script on a Plone site where this plugin is installed:
./bin/plone-compile-resources –site-id=Plone -b bundle-leaflet
./bin/plone-compile-resources –site-id=Plone -b patterns
Installation
Install plone.patternslib by adding it to your buildout:
[buildout] ... eggs = plone.patternslib
and then running bin/buildout.
Install the plone.patternslib package into your site. It will register a patternslib resource bundle in addition to the existing plone mockup bundles.
Contribute
Issue Tracker: https://github.com/plone/plone.patternslib/issues
Source Code: https://github.com/plone/plone.patternslib
Support
If you are having issues, please put them into the issue tracker.
License
The project is licensed under the GPLv2.
jcopkode, jc@opkode.com
Syslab.com, pilz@syslab.com
Changelog
1.3.0 (2023-02-02)
Update jQuery to 1.12.4 and Patternslib to 2.1.5. Fixes: https://github.com/plone/plone.patternslib/issues/73 [thet]
pat-leaflet AJAX geoJSON feature [petschki]
1.2.1 (2020-11-23)
Bugfix: Register upgrade step for the correct profile [frapell]
1.2.0 (2020-08-07)
Register pat-datetime-picker in the resource registry. [thet]
Restructure upgrades to follow bobtemplates.plone recommendations. [thet]
1.1.1 (2020-07-10)
Do not autoinclude ZCML (this was not needed here). [jensens]
Fix dependecy chain, depend on Products.CMFPlone in setup.py. [jensens]
Upgrade to pat-leaflet 1.4.0. [thet]
1.1.0 (2019-04-11)
Upgrade pat-leaflet to 1.3.0. [thet]
Remove 2nd CSS resource from Leaflet Markercluster as Plone doesn’t compile it properly. [thet]
Register pat-date-picker. [thet]
Update dependencies, deped on Patterns 2.1.x. [thet]
Update to latest Patterns. [thet]
Remove registry initialization in bundles. [cekk]
Declare support for python 3. [vincero]
1.0 (2017-02-28)
Git-un-exclude dist directory within the static folder. [thet]
Fix font-awesome web font path. [thet]
Fix Leaflet icon integration. [thet]
Register resources with their uncompressed files, whereever they are available. This helps debugging and the resource registry itself can handle compression on it’s own. [thet]
Upgrade Patternslib to latest version. [thet]
Better pat-gallery integration. [thet]
Add pat-leaflet resources. [thet]
Use bower to manage resources instead of Makefile script. [thet]
Remove browserlayer and add upgrade step for removal from component registry. [thet]
Cleanup. [thet]
0.2 (2016-04-27)
Polyfill removeDuplicateObjects so that we can use version 2.0.13 of Patternslib with Plone/Mockup which still uses Patternslib 2.0.11.
0.1 (2016-04-27)
Initial release.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for plone.patternslib-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c663c625c9441d153dae279e2de707cf13c4a024a4e369fd961f66b8e42cc8f |
|
MD5 | 5e680cb70b818b78142b0af0e79af7f8 |
|
BLAKE2b-256 | 1a9e1ff23f987c4da7a4229713f9ab90c646dfa9fe324c4969075f2442132fcf |