Conversation
| // interface regardless of whether `options.widgets` or `options.groups` | ||
| // was used. | ||
| getWidgets(options) { | ||
| // Keep in sync with client-side implementation |
There was a problem hiding this comment.
Not a new issue, but I avoided further duplication within the client side.
Right now we have some ESM/commonjs issues that prevent us from sharing code as well as I'd like between front and back end.
| @@ -0,0 +1,14 @@ | |||
| // Requires an area field's .options property | |||
|
|
|||
| export default function getWidgets(options) { | |||
There was a problem hiding this comment.
I didn't strictly have to factor this out today, but in the long run I'd like to have one implementation, so this is the right direction.
| origin: null, | ||
| preview: true | ||
| }, | ||
| handlers(self) { |
There was a problem hiding this comment.
Registering the widget operations late prevents the section template library from altering them cleanly if some modules are configured before and some after, which is likely because of our support for modules.js files with nestedModuleSubdirs. Yes this took me a while to figure out.
| }); | ||
| }, | ||
|
|
||
| composeWidgetOperations() { |
There was a problem hiding this comment.
no actual changes to the logic here.
|
changing reviewers to @myovchev and/or @ETLaurent , as I believe they have been dealing with this code more recently. |
|
OK fair. It'll be a minute but that makes sense.
…On Thu, Sep 4, 2025 at 9:52 AM Stuart Romanek ***@***.***> wrote:
*stuartromanek* left a comment (apostrophecms/apostrophe#5057)
<#5057 (comment)>
changing reviewers to @myovchev <https://github.com/myovchev> and/or
@ETLaurent <https://github.com/ETLaurent> , as I believe they have been
dealing with this code more recently.
—
Reply to this email directly, view it on GitHub
<#5057 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27LWWSD3TQ7FAWZXDKD3RA72XAVCNFSM6AAAAACFRXSO7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENJTHA2DCOJTHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
THOMAS BOUTELL | CHIEF EXECUTIVE OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
... So we don't offer "insert section" if none of the widget types allowed in this area are permitted to be the basis for a section.
This does NOT mean you can never hit "insert section" and find an empty list. That would require an expensive API call, so it's not worth it.