Skip to content

Commit

Permalink
allows to render widgets in published mode (for non localized with pu… (
Browse files Browse the repository at this point in the history
#4709)

* allows to render widgets in published mode (for non localized with published related)

* adds changelog

---------

Co-authored-by: Tom Boutell <[email protected]>
  • Loading branch information
ValJed and boutell authored Sep 5, 2024
1 parent 20ea911 commit ade88ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Add option `skipReplace` for `apos.doc.changeDocIds` method to skip the replacing of the "old" document in the database.
* The `@apostrophecms/i18n` module now exposes a `locales` HTTP GET API to aid in implementation of native apps for localized sites.
* Context menus can be supplied a `menuId` so that interested components can listen to their opening/closing.
* Allow to set mode in `AposWidget` component through props.
* Add batch operations to pages.
* Add shortcuts to pages manager.
* Add `replaces` (boolean, `false` by default) option to the context operation definition (registered via `apos.doc.addContextOperation()`) to allow the operation to require a replace confirmation before being executed. The user confirmation results in the Editor modal being closed and the operation being executed. The operation is not executed if the user cancels the confirmation.
Expand All @@ -23,9 +24,6 @@
* Fix link to pages in rich-text not showing UI to select page during edit.
* Bumps `uploadfs` dependency to ensure `.tar.gz`, `.tgz` and `.gz` files uploaded to S3 download without double-gzipping.
This resolves the issue for new uploads.

### Fixes

* Registering duplicate icon is no longer breaking the build.
* Fix widget focus state so that the in-context Add Content menu stays visible during animation
* Fix UI of areas in schemas so that their context menus are layered overtop sibling schema fields UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export default {
type: String,
areaFieldId: String,
modelValue: Object,
mode: {
type: String,
default: 'draft'
},
meta: {
type: Object,
default() {
Expand Down Expand Up @@ -59,7 +63,7 @@ export default {
this.rendered = this.rendering.html;
} else {
this.rendered = '...';
this.rendered = await apos.http.post(`${apos.area.action}/render-widget?aposEdit=1&aposMode=draft`, {
this.rendered = await apos.http.post(`${apos.area.action}/render-widget?aposEdit=1&aposMode=${this.mode}`, {
busy: true,
body: parameters
});
Expand Down

0 comments on commit ade88ab

Please sign in to comment.