localgovdrupal / localgov_events

Events for LocalGov Drupal.
GNU General Public License v2.0
1 stars 0 forks source link

Embed list of events in another page - page editor configured #23

Open ekes opened 3 years ago

ekes commented 3 years ago

The original request was from Lambeth: to be able to embed filtered lists of events onto specific subsite pages.

Technical solution using viewsreference and viewsreference_filter allows creating a paragraph type where the administrator can select using a configured events list view view filters which events to show:-

ekes commented 3 years ago

Adding a subsite page

Screenshot_2021-02-02 Create Subsite page Lambeth Council

Select the paragraph type that has been made to allow selection of events

screenshot2

Choose which events to show

screenshot3

And they are added as a paragraph to the page.

Screenshot_2021-02-02 Create Subsite page Lambeth Council(2)

ekes commented 3 years ago

Suggestion:-

The underlying code for this should be in a common module. Then events, directories etc. offer embedded views configured to be used in a specific paragraph type so the user just chooses 'events list' and configures them. These views, and paragraph types, are in the specific module (events, directories...)

ekes commented 3 years ago

Issues to work on:-

The upstream modules don't have tests and this shows:- The schema for viewsreference which is a patch we supply doesn't account for the additional data that viewsreference_filter stores. So either the schema needs to be more flexible, or can it use a third party. The widget for viewsreference_filter is buggy. It doesn't save defaults. This is made even worse for the UX of the admin. A step (needed at the moment) and missed out above is that the view name and display mode must be set (even if only one is allowed - no defaulting) then the paragraph needs to be saved and re-opened before the filters appear as a folder up 'advanced option'.

So it wants minimal tests, schema fixing to include filters, allows saving and defaulting the view and display mode, and directly loading the filters for someone to select.

willguv commented 3 years ago

@ekes lots of interest in this at the Product Group - events list to begin with, and news list to follow

melanie-WF commented 3 years ago

Waltham Forest would be interested in this, can we get an invite to the technical sessions please?

willguv commented 3 years ago

@ekes what's the latest on this?