Skip to content

Commit

Permalink
Merge branch 'master' into typescript-support-in-core
Browse files Browse the repository at this point in the history
* master:
  Release changelog for 16.20.7 (#4816)
  Release 17.0.0-alpha.8
  Add supported languages (#4811)
  Fix html tag lang attribute in SSR (#4803)
  Finnish translation forwardport (#4084) (#4810)
  Control panel for relations (#3382)
  Add guard in case of malformed blocks are present (at least id and title should be present) (#4802)
  fixed the issue #4660 - shouldn't use a hook like function name for a variable (#4693)
  Fix HMR of @plone/volto (#4799)
  • Loading branch information
sneridagh committed May 26, 2023
2 parents 55e3421 + 7ad9098 commit 54236f4
Show file tree
Hide file tree
Showing 57 changed files with 9,397 additions and 925 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@

<!-- towncrier release notes start -->

## 17.0.0-alpha.8 (2023-05-24)

### Feature

- Add Finnish translation (contributed by @rioksane) @erral [#4084](https://github.com/plone/volto/issues/4084)

### Bugfix

- Fixed the issue "shouldn't use a hook like function name for a variable" @Kaku-g [#4693](https://github.com/plone/volto/issues/4693)
- Fix to not update breadrumbs, navigation, actions, and types when content is fetched as a subrequest and apiExpanders includes these components. @davisagli [#4760](https://github.com/plone/volto/issues/4760)
- Fix bug where editors could not see their own content in the Contents view if it was expired or has a future effective date. @davisagli [#4764](https://github.com/plone/volto/issues/4764)
- Fix bug showing logs at the browsers when richtext widget is use @claytonc [#4780](https://github.com/plone/volto/issues/4780)
- Update relations control panel layout @danalvrz [#4794](https://github.com/plone/volto/issues/4794)
- Fix hot module reloading of changes to `@plone/volto`. @davisagli [#4799](https://github.com/plone/volto/issues/4799)
- Add guard in case of malformed blocks are present (at least id and title should be present) @sneridagh [#4802](https://github.com/plone/volto/issues/4802)
- Fix html tag lang attribute in SSR @sneridagh [#4803](https://github.com/plone/volto/issues/4803)
- Add newest supported languages to `Language` constants list @sneridagh [#4811](https://github.com/plone/volto/issues/4811)

### Internal

- Remove max_line_length from .editorconfig @pnicolli [#4776](https://github.com/plone/volto/issues/4776)
- Fix unannounced breaking change in cypress-io/github-action @sneridagh [#4795](https://github.com/plone/volto/issues/4795)


## 17.0.0-alpha.7 (2023-05-11)

### Bugfix
Expand Down Expand Up @@ -201,6 +225,24 @@
- Use a universal static path for both documentation and volto repos. @stevepiercy [#4376](https://github.com/plone/volto/issues/4376)


## 16.20.7 (2023-05-24)

### Bugfix

- Fixed the issue "shouldn't use a hook like function name for a variable" @Kaku-g [#4693](https://github.com/plone/volto/issues/4693)
- Fix to not update breadrumbs, navigation, actions, and types when content is fetched as a subrequest and apiExpanders includes these components. @davisagli [#4760](https://github.com/plone/volto/issues/4760)
- Fix bug where editors could not see their own content in the Contents view if it was expired or has a future effective date. @davisagli [#4764](https://github.com/plone/volto/issues/4764)
- Fix bug showing logs at the browsers when richtext widget is use @claytonc [#4780](https://github.com/plone/volto/issues/4780)
- Add guard in case of malformed blocks are present (at least id and title should be present) @sneridagh [#4802](https://github.com/plone/volto/issues/4802)
- Fix html tag lang attribute in SSR @sneridagh [#4803](https://github.com/plone/volto/issues/4803)
- Add newest supported languages to `Language` constants list @sneridagh [#4811](https://github.com/plone/volto/issues/4811)

### Internal

- Remove max_line_length from .editorconfig @pnicolli [#4776](https://github.com/plone/volto/issues/4776)
- Fix unannounced breaking change in cypress-io/github-action @sneridagh [#4795](https://github.com/plone/volto/issues/4795)


## 16.20.6 (2023-05-12)

### Bugfix
Expand Down Expand Up @@ -1277,6 +1319,7 @@ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information
- Object browser: image search should only show images @reebalazs
- Updated spanish translation @macagua
- Add Dutch translation @spereverde
- Add control panel for relations. @ksuess

### Bugfix

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ clean:

.PHONY: docs-clean
docs-clean: ## Clean current and legacy docs build directories, and Python virtual environment
cd $(DOCS_DIR) && rm -rf $(BUILDDIR)/
rm -rf bin include lib
rm -rf docs/_build
cd $(DOCS_DIR) && rm -rf $(BUILDDIR)/

.PHONY: docs-html
docs-html: bin/python ## Build html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ describe('User Group Membership Control Panel test for NOT many users and many g
if ($segmentUsergroupmembership.hasClass('upgrade-info')) {
// Panel not supported.
} else {
cy.get('input[name="member_-_max_-_cooks"]').check({
cy.get('#source-row-max div.checkbox_cooks input').check({
force: true,
});
cy.reload();
cy.get('input[name="member_-_max_-_cooks"]').should('be.checked');
cy.get('#source-row-max div.checkbox_cooks input').should('be.checked');
}
});
});
Expand Down
19 changes: 8 additions & 11 deletions docs/source/recipes/widget.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
myst:
html_meta:
"description": "Volto forms and widgets"
"property=og:description": "Volto forms and widgets"
"property=og:title": "Forms and widgets"
"keywords": "Volto, Plone, frontend, React, Blocks, Edit, components, Forms, widgets"
'description': 'Volto forms and widgets'
'property=og:description': 'Volto forms and widgets'
'property=og:title': 'Forms and widgets'
'keywords': 'Volto, Plone, frontend, React, Blocks, Edit, components, Forms, widgets'
---

# Forms and widgets
Expand All @@ -30,7 +30,7 @@ import { MySpecialWidget } from './components';
const applyConfig = (config) => {
config.widgets.widget.specialwidget = MySpecialWidget;
return config;
}
};
```

You can also pass additional props to the frontend widget using the `widgetProps` key:
Expand Down Expand Up @@ -139,13 +139,11 @@ import TokenWidget from '@plone/volto/components/manage/Widgets/TokenWidget';
const applyConfig = (config) => {
config.widgets.id.category = TokenWidget;
return config;
}

};
```

Based on this setup, Volto will render this field with the `TokenWidget`.


(widget-relation-field-label)=

## Relation fields
Expand Down Expand Up @@ -182,6 +180,7 @@ It is recommended to define the vocabulary as a named `StaticCatalogVocabulary`
This allows the {guilabel}`relations` control panel to respect the defined restrictions to potential relation targets.

{file}`vocabularies.py`

```python
from plone.app.vocabularies.catalog import StaticCatalogVocabulary
from zope.interface import provider
Expand All @@ -199,6 +198,7 @@ def ExamplesVocabularyFactory(context=None):
```

{file}`configure.zcml`

```xml
<utility
name="relationchoice_field_named_staticcatalogvocabulary"
Expand Down Expand Up @@ -241,17 +241,14 @@ directives.widget(
)
```


## Widget `isDisabled` Props

We can disable the input of a widget by passing props `isDisabled: true`.


## Available widgets

See [Storybook](https://6.docs.plone.org/storybook) with available widgets.


## Write a new widget

```{note}
Expand Down
Loading

0 comments on commit 54236f4

Please sign in to comment.