Skip to content

Commit

Permalink
[fc] Repository: plone.volto
Browse files Browse the repository at this point in the history
Branch: refs/heads/main
Date: 2022-01-15T21:06:31+01:00
Author: Tiberiu Ichim (tiberiuichim) <tiberiuichim@users.noreply.github.com>
Commit: plone/plone.volto@02aafb0

New field with huge vocabulary defined in the widget options (#38)

* new field with huge vocabulary not tied to it, but in defined in the widget

* Remove the include for .coresandbox in zcml

* Add changelog

Co-authored-by: Victor Fernandez de Alba &lt;sneridagh@gmail.com&gt;

Files changed:
M CHANGES.rst
M src/plone/volto/coresandbox/example.py
  • Loading branch information
tisto committed Jan 15, 2022
1 parent 3085759 commit f1837f6
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
Repository: documentation
Repository: plone.volto


Branch: refs/heads/classic-ui
Date: 2022-01-15T16:37:58+01:00
Author: ksuess (ksuess) <k.suess@rohberg.ch>
Commit: https://github.com/plone/documentation/commit/0992a23d59d8a6fc830ba93c5a2a66635619f29b
Branch: refs/heads/main
Date: 2022-01-15T21:06:31+01:00
Author: Tiberiu Ichim (tiberiuichim) <tiberiuichim@users.noreply.github.com>
Commit: https://github.com/plone/plone.volto/commit/02aafb0e1f7f641cd181b6b94949165daa5ec7b7

Merged in branch "6-dev"
New field with huge vocabulary defined in the widget options (#38)

* new field with huge vocabulary not tied to it, but in defined in the widget

* Remove the include for .coresandbox in zcml

* Add changelog

Co-authored-by: Victor Fernandez de Alba &lt;sneridagh@gmail.com&gt;

Files changed:
M README.md
D bodyclasses.md
D icons.md
D index.md
D registry/index.md
D theming/barceloneta/index.md
D theming/diazo/index.md
D theming/from-scratch/index.md
D theming/index.md
D theming/theme-package/index.md
D theming/ttw/index.md
D whatsnew.md
M CHANGES.rst
M src/plone/volto/coresandbox/example.py

b'diff --git a/README.md b/README.md\nindex 1f97f0a2..aab98abd 100644\n--- a/README.md\n+++ b/README.md\n@@ -1,25 +1 @@\n-# Plone Classic UI Docs\n-\n-- All documentation should be written in [CommonMark](https://commonmark.org/) Markdown.\n-- If possible, please structure into dirs, this will make it easier to build a structure later.\n-\n-See the following example\n-\n-```markdown\n-/docs\n-\xe2\x9e\x9c tree\n-.\n-\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 deploy.md\n-\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 index.md\n-\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 install.md\n-```\n-Use a file called `index.md` for creating a index (if needed)\n-\n-```shell\n-\xe2\x9e\x9c cat index.md\n-install.md\n-deploy.md\n-```\n-\n-Thank you!!\n-\n+Merged in branch "6-dev"\n\\ No newline at end of file\ndiff --git a/bodyclasses.md b/bodyclasses.md\ndeleted file mode 100644\nindex 9161ed34..00000000\n--- a/bodyclasses.md\n+++ /dev/null\n@@ -1,31 +0,0 @@\n-# Add custom classes to the `body` element\n-\n-Body classes are generated in the `LayoutPolicy.bodyClass` method in module `plone.app.layout.globals.layout`.\n-Contained is a feature to plugin in own body-classes using named adapters.\n-\n-Create a class like so:\n-\n-```Python\n-from plone.app.layout.globals.interfaces import IBodyClassAdapter\n-\n-@implementer(IBodyClassAdapter)\n-class CustomBodyClasses(object):\n- """Additional body classes adapter."""\n- def __init__(self, context, request):\n- self.context = context\n- self.request = request\n-\n- def get_classes(self, template, view):\n- return ["additional-class", "another-css-class"]\n-\n-```\n-\n-Then register the adapter in ZCML:\n-\n-```XML\n-<adapter\n- factory=".custombodyclasses.CustomBodyClasses"\n- for="* *"\n- name="myproject-customclasses"\n-/>\n-```\ndiff --git a/icons.md b/icons.md\ndeleted file mode 100644\nindex ce572e5a..00000000\n--- a/icons.md\n+++ /dev/null\n@@ -1,81 +0,0 @@\n-# Icons in Plone 6 Classic UI\n-\n-- Bootstrap Icons\n-- SVG Inline Icons\n-- Iconresolver\n-\n-## Bootstrap Icons\n-\n-Bootstrap is the default CSS Framework in Plone 6.\n-We decided to use it\'s icons as well.\n-Check out all available Icons at [icons.getbootstrap.com](https://icons.getbootstrap.com/).\n-\n-Icons are shipped via plone.staticresources.\n-Check out the [package.json](https://github.com/plone/plone.staticresources/blob/master/package.json) of the package to get the actual version of the icons in Plone.\n-\n-## Registration\n-\n-- Icons are registered in Plone\'s registry\n-- Registrered to override of icons via xml\n-- Option to customize UI and contenttype icons\n-- [Bootstrap Icons](https://github.com/plone/plone.staticresources/blob/master/src/plone/staticresources/profiles/default/registry/icons_bootstrap.xml)\n-- [Contenttypes](https://github.com/plone/plone.staticresources/blob/master/src/plone/staticresources/profiles/default/registry/icons_contenttype.xml)\n-- [Plone UI](https://github.com/plone/plone.staticresources/blob/master/src/plone/staticresources/profiles/default/registry/icons_plone.xml)\n-\n-## Contextual Icons\n-\n-We definde contextual icons. If you don\'t like e.g. the share icon - override it without touching the share icon used by the system.\n-\n-- Icons like copy, cut, paste\n-- Identical function all over the site\n-- That\'s why we reuse those icons\n-- Specific icon name is based on the usage in the system\n-\n-## Icon expression\n-\n-- `icon_expression` field is used again to define icons (e.g. for actions, contenttypes)\n-- Use icon name for icon expressions\n-\n-## Customization\n-\n-- Add custom icons\n-- Override some of the icons\n-- TODO\n-\n-## Icon Font\n-\n-- Setup profile to install icon font\n-- Usage as known from e.g. Font Awesome\n-- TODO\n-\n-## Iconresolver\n-\n-### Get Icon URL\n-\n-URL method of @@icons view returns the actual URL to the SVG icon. This can be used e.g. in an img tag.\n-\n-```HTML\n-<img src="" tal:attributes="src python:icons.url(\'alarm\')" class="custom-class" alt="foo" />\n-```\n-\n-### Get Icon Tag\n-\n-Tag method is used with `tal:replace` and returns an entire inline SVG image.\n-Inline icons can be styled via CSS.\n-`tag_class` and `tag_alt` is used to pass in custom classes and an alt text.\n-\n-```HTML\n-<tal:icon tal:replace="structure python:icons.tag(\'archive\', tag_class=\'custom-class\', tag_alt=\'foobar\')" />\n-```\n-\n-### Resource Path\n-\n-SVG Files are avaiblae as resource: `++plone++bootstrap-icons/lightning.svg`\n-\n-### Fallback\n-\n-- There is a Plone icon defined as fallback if icon name is not found\n-- There are fallback groups e.g. for [mimetype icons](https://github.com/plone/plone.staticresources/blob/master/src/plone/staticresources/profiles/default/registry/icons_mimetype.xml)\n-- JPEG icon is e.g. `mimetype-image/jpeg`\n-- You can register specific icons\n-- If there is no specific icon mimetype-image is used as fallback\ndiff --git a/index.md b/index.md\ndeleted file mode 100644\nindex b64a0bfb..00000000\n--- a/index.md\n+++ /dev/null\n@@ -1,10 +0,0 @@\n-# Plone Classic UI\n-\n-The all-new default frontend of Plone 6 is aka Volto. Plone 6 is still shipped with a bunch of modernized templates based on Bootstrap. This is now Classic UI.\n-\n-# Contents\n-\n-* What\'s new\n-* Theming\n-* Registry\n-* Icons\n\\ No newline at end of file\ndiff --git a/registry/index.md b/registry/index.md\ndeleted file mode 100644\nindex b23fcab7..00000000\n--- a/registry/index.md\n+++ /dev/null\n@@ -1,15 +0,0 @@\n-# Registry and Plone 6 Classic UI\n-\n-* All-new resource registry\n-* No more separation between anonymous and logged in\n-* No more resources\n-* Just regular bundles\n-* Available attributes (TODO)\n-\n-\n-# Loading order of resources\n-\n-* All registered bundles\n-* Diazo stuff\n-* custom.css\n-\ndiff --git a/theming/barceloneta/index.md b/theming/barceloneta/index.md\ndeleted file mode 100644\nindex 0f2e0579..00000000\n--- a/theming/barceloneta/index.md\n+++ /dev/null\n@@ -1,49 +0,0 @@\n-# Plone Classic UI Theming based on Barceloneta\n-\n-* Use of SCSS\n-* Colors, fonts and sizes via variable changable\n-* Properties for shadows, rounded corners, gradients, etc.\n-* plonetheme.barceloneta npm package for includes\n-* bobtemplates.plone template\n-* Theming is based on Bootstrap 5\n-* We used Bootstrap markup in templates\n-* We used Bootstrap components wherever possible\n-* Most of look and feel can be touched via Bootstrap\'s variables\n-* Hint: order is important in SCSS\n-\n-\n-# Theme Package\n-\n-* Generated theme package can be uploaded as ZIP-file\n-\n-\n-# Theme Structure\n-\n-## base.scss\n-\n-* Basices required for backend\n-\n-## barceloneta.scss\n-\n-* Barceloneta Theme basis\n-\n-\n-# npm Package\n-\n-* npm package with files required for Plone\n-* dependencies required by theme to compile\n-\n-\n-# Bootstrap Components\n-\n-* Default components are extended with some custom components (e.g. dropdown menu)\n-* We use Boostrap variables in this cases\n-\n-\n-# Add-Ons and Templates\n-\n-Make live easy with...\n-\n-* use Bootstrap markup\n-* use Bootstrap components\n-* use Bootsrap variables\n\\ No newline at end of file\ndiff --git a/theming/diazo/index.md b/theming/diazo/index.md\ndeleted file mode 100644\nindex 54f1b0ad..00000000\n--- a/theming/diazo/index.md\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-# Plone Classic UI Theming with Diazo\n-\n-Theming based on Diazo.\ndiff --git a/theming/from-scratch/index.md b/theming/from-scratch/index.md\ndeleted file mode 100644\nindex efb7a34b..00000000\n--- a/theming/from-scratch/index.md\n+++ /dev/null\n@@ -1,121 +0,0 @@\n-# Plone Classic UI Theming based on Barceloneta\n-\n-Theming based on a filesystem package without any dependency.\n-\n-* Theming for Plone 6 Classic UI\n-* Theme stored in a filesystem package\n-* Built from scratch\n-* No dependencies to Barceloneta\n-* No Diazo needed\n-\n-\n-# Theme Package\n-\n-* Create a theme package as explained here.\n-* Temove what you do not need\n-* Add [package.json](https://github.com/collective/plonetheme.munich/blob/master/package.json)\n-* Overrides\n-* Static files\n-\n-\n-# Static Files\n-\n-Register directory to keep static files\n-\n-File: src/plonetheme/munich/browser/configure.zcml\n-Directory: src/plonetheme/munich/browser/static\n-\n-```\n-<!-- Publish static files -->\n-<plone:static\n- name="plonetheme.munich"\n- type="plone"\n- directory="static"\n- />\n-```\n-\n-# Theme\n-\n-## Manifest\n-\n-* Manifest for your theme\n-* Keep rules empty to disable Diazo\n-\n-```\n-[theme]\n-title = Munich Theme\n-description = A modernized Plone 6 theme\n-preview = preview.png\n-rules =\n-prefix = /++theme++plonetheme.munich\n-doctype = <!DOCTYPE html>\n-```\n-\n-## Bundle Registration\n-\n-```\n-<?xml version="1.0"?>\n-<registry\n- xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n- i18n:domain="plonetheme.munich">\n-\n- <records interface="Products.CMFPlone.interfaces.IBundleRegistry" prefix="plone.bundles/munich">\n- <value key="jscompilation">++theme++munich/js/munich.min.js</value>\n- <value key="csscompilation">++theme++munich/css/munich.min.css</value>\n- <value key="enabled">True</value>\n- <value key="compile">False</value>\n- <value key="last_compilation">2020-12-06 12:00:00</value>\n- </records>\n-\n-</registry>\n-```\n-\n-## Theme Registration\n-\n-Register your theme via theme.xml\n-\n-```\n-<?xml version="1.0" encoding="UTF-8"?>\n-<theme>\n- <name>munich</name>\n- <enabled>true</enabled>\n-</theme>\n-```\n-\n-## Compile the bundle\n-\n-* Compile SASS to SCSS\n-\n-Install all requirements and dependencies from package.json:\n-\n-```\n-yarn install\n-```\n-\n-Build the actual bundle:\n-\n-```\n-yarn dist\n-```\n-\n-\n-# Theming\n-\n-* Make use of Bootstrap [variables](https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss)\n-* Tweak basic settings like rounded corners, shadows, etc.\n-* Set custom fonts\n-* Define your own stuff\n-* Import Boostrap (as basis)\n-\n-## Templates\n-\n-* Add z3c.jbot overrides\n-* Copy Templates to customize\n-* Add custom views for your story\n-\n-\n-# Available Themes\n-\n-* plonetheme.tokyo (mobile first, onw column)\n-* plonetheme.munic (minimalistic)\n-* plonetheme.berlin (based on Barceloneta)\ndiff --git a/theming/index.md b/theming/index.md\ndeleted file mode 100644\nindex 18201edf..00000000\n--- a/theming/index.md\n+++ /dev/null\n@@ -1,11 +0,0 @@\n-# Plone Classic UI Theming\n-\n-TODO\n-\n-# Contents\n-\n-* Basics and Requirements\n-* Minor CSS changes via controlpanel (TTW)\n-* Theming based on Barceloneta\n-* Theming from scratch (without dependencies)\n-* Theming with Diazo\n\\ No newline at end of file\ndiff --git a/theming/theme-package/index.md b/theming/theme-package/index.md\ndeleted file mode 100644\nindex c06d9e19..00000000\n--- a/theming/theme-package/index.md\n+++ /dev/null\n@@ -1,10 +0,0 @@\n-# Plone Classic UI Theme Add-On\n-\n-Create a filesystem package to keep an installable theme for Plone 6 Classic UI.\n-\n-# bobtemplates.plone\n-\n-* Boilerplate\n-* package.json\n-* Fertige basis\n-* Plone CLI\ndiff --git a/theming/ttw/index.md b/theming/ttw/index.md\ndeleted file mode 100644\nindex 113cb9a3..00000000\n--- a/theming/ttw/index.md\n+++ /dev/null\n@@ -1,21 +0,0 @@\n-# TTW Customizations in Plone 6 Classic UI\n-\n-Small CSS changes via control panel in Plone 6 Classic UI\'s custom.css.\n-\n-* Logo change control panel\n-* Favicon change via control panel\n-* Custom CSS (controlpanel)\n-\n-# Custom CSS\n-\n-Available via controlpanel\n-\n-* Custom styles without compilation\n-* Shipped as last resource after all other CSS files\n-* Ovierride default CSS\n-\n-## CSS Variables\n-\n-* CSS variables are available\n-* Bootstrap\'s CSS variables are used\n-* Use it to tweak colors, fonts, etc.\ndiff --git a/whatsnew.md b/whatsnew.md\ndeleted file mode 100644\nindex 9f4a8947..00000000\n--- a/whatsnew.md\n+++ /dev/null\n@@ -1,8 +0,0 @@\n-# What\'s new in Plone 6 Classic UI\n-\n-- Markup is based on [Bootstrap](https://getbootstrap.com/)\n-- TTW theming has been removed\n-- Bootstrap Icons\n-- Modernized JavaScript\n-- RequireJS has been removed\n-- jQuery has been removed\n'
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 1307733..6062d81 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -4,8 +4,8 @@ Changelog\n 3.1.0a9 (unreleased)\n --------------------\n \n-- Nothing changed yet.\n-\n+- Add new field in the coresandbox: not constrained by vocabulary field but the vocabulary defined in the widget.\n+ [sneridagh]\n \n 3.1.0a8 (2022-01-12)\n --------------------\ndiff --git a/src/plone/volto/coresandbox/example.py b/src/plone/volto/coresandbox/example.py\nindex ff94c0f..33a0d9e 100644\n--- a/src/plone/volto/coresandbox/example.py\n+++ b/src/plone/volto/coresandbox/example.py\n@@ -68,6 +68,7 @@ class IExample(model.Schema):\n "list_field_select",\n "list_field_voc_unconstrained",\n "list_field_voc_huge",\n+ "list_field_voc_huge_unconstrained",\n "tuple_field",\n "set_field",\n "set_field_checkbox",\n@@ -261,6 +262,20 @@ class IExample(model.Schema):\n frontendOptions={"widget": "autocomplete", "widgetProps": {"prop1": "text"}},\n )\n \n+ list_field_voc_huge_unconstrained = schema.List(\n+ title=u"List field with values from a huge vocabulary but unconstrained",\n+ description=u"zope.schema.List",\n+ value_type=schema.TextLine(),\n+ required=False,\n+ missing_value=[],\n+ default=[],\n+ )\n+ directives.widget(\n+ "list_field_voc_huge_unconstrained",\n+ vocabulary="plone.volto.coresandbox.vocabularies.huge",\n+ frontendOptions={"widget": "autocomplete", "widgetProps": {"prop1": "text"}},\n+ )\n+\n tuple_field = schema.Tuple(\n title=u"Tuple field",\n description=u"zope.schema.Tuple",\n'

0 comments on commit f1837f6

Please sign in to comment.