Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Template #173

Comments

@srenault-meeds
Copy link
Member

srenault-meeds commented Jan 7, 2025

Rationale

Currently, the Meeds software provide to users templates of page and section.
However, to create a site, the template provided cannot be edited, updated, selected.
In order to gain productivity for building sites, we aim to provide a new option to manage site templates.

What's following describes exactly what we will implement to provide such feature.

1. Functional Requirements

Top User Stories

Site Templates Management

As admin, I can manage site templates from the platform settings site

Development > Templates > Sites

From there, I will find the default site templates already available: Internal Site, Public Site, Space Public Site.
For each site, I can see an icon, a name, a description, the status and actions.
image

Actions proposed for Site Templates are:

  • edit navigation
  • edit properties
  • duplicate
  • delete (disabled for default templates)

image

  1. Edition of template properties
    When I edit the properties, then I have only following infos to update:
  • Name
  • Description
  • Icon
  • Preview image

Precision: A mention is done so admins can easily understand changes will only affect new sites created using this template.

image

  1. Duplication of a template
    Same infos are requested when requesting to duplicate the template

image

Once the duplication is done, then the navigation drawer opens so the admin can update it at its convenience (Same UX like when creating/duplicating a space template)
image

  1. Edition of the navigation
    As the site can include different pages, the navigation drawer is opened when willing to edit navigation and/or pages
    image

Site Templates Addition

When adding a template from the template management page
Then I have to detail characteristics of it:

  • name
  • description
  • icon
  • preview image (to be added manually)

image

Once the template is created, the admin will be invited to update the navigation
Default navigation will be one page called "Home"
Default layout of this page will be composed of:

  • Section 1:
    • Dynamic
    • One column
    • With one image content
  • Section 2:
    • Dynamic
    • 2 columns (8 + 4)
      • Column 1 including a text block
      • Column 2 including a links portlet

image

Sites Management

For UX consistency with other items management, the sites management page will be reviewed to list sites in a list (not with cards)

Each site provides following infos and options:

  • Icon
  • Name
  • Description
  • Navigation option to edit navigation
  • Permissions option to edit permissions
  • Actions

image

Following options will be proposed for each site:
Options provided currently

  • Edit navigation
  • Edit properties
  • Update permissions
  • Delete (if product site, then the option is disabled)

New Options to provide

  • Duplicate
  • Save as template

image

1. Edit properties of a site

For each site, I can edit properties as currently with a new UX, consistent with other UX (like spaces):

  • Update Name
  • Update Description
  • Update Icon
  • Update banner

image

2. Edit permissions of a site

For each site, I can edit permissions as currently with a new UX, consistent with other UX (like spaces):

  • Site edition
  • Site view

image

3. Duplicate a site
To ease the process of creating a site, I can decide to duplicate it.
When requesting so, the admin will have to update the name, description, icon and banner as well as permissions.

image

4. Save a site as a template

When a site is identified as probably good enough to be created again, then the admin can decide to save it as a template
When requesting so, then it will be required to set the name, description, icon and preview.

Of course, navigation, pages and data of pages will be reproduced to ease the process of reusing it.

Site Creation Process

When adding a site, then I have to follow steps:

  • Choosing a template
  • Setting properties: name, description, icon, banner
  • Setting permissions: site edition and site view

Once created, I can update the navigation as provided by the UX Journey

image

When I want to preview the site template before selecting it
Then I can choose to preview it thanks to the option proposed on hover
And it provides me a full screen preview of the site preview image with reminder of the name and description of the site
image

Impacts

Gamification

NA

Notifications

NA

Analytics

NA

Unified Search

NA

2. Technical Requirements

To summarize the functional requirements, there will be two data entities to consider:

  • Site template:
    • Properties
      • Icon
      • Name
      • Description
      • Navigation
      • Preview
      • Enabled
    • Actions
      • Edit navigation
      • Edit properties
      • Duplicate
      • Delete
    • Default navigation on creation:
      • Home page
        • Section 1: Image
        • Section 2:
          • SNV (8 cols)
          • Links (4 cols)
    • Default site templates:
      • Internal Site
      • Public Site
      • Space Public Site.
  • Site:
    • Properties
      • Icon (Inherited from Site Template)
      • Name (Inherited from Site Template)
      • Description (Inherited from Site Template)
      • Navigation (Inherited from Site Template)
      • Banner
      • Access Permissions
      • Edit Permission
    • Actions
      • Edit navigation (Exists)
      • Edit properties (Exists)
      • Update permissions (Exists)
      • Delete (Exists)
      • Duplicate
      • Save as template

Expected Volume & Performance

The Site Templates data will generate a relative small volume since its volumetry doesn't depend on users count nor spaces count. Thus, the volumetry should be negligible.
The Site Templates will be used only when creating a site, thus no performances impact should be observed in simple user use cases.
The sites creation performance can be impacted by increasing the operation duration, thus a good UX has to be made to inform the user about this by displaying loading effects only.

Security

The site template will have its own access and edit permissions which will not be inherited in Site Creation properties. Thus, the site template permissions has to be used to secure the R/W access of it only and will not be used as default permissions when creating a site instance based on a selected template.

Extensibility

The current possibility of Site Template definition has to be removed in favor of a new extensibility mechanism of Persistent Site Template Definition.

Configurability

The configuration of Default Site Template will be removed to make the choice of a site template optional using its id.

Upgradability

N/A

Existing Features

N/A

Feature Flags

N/A

Other Non Functional Requirements

N/A

3. Software Architecture

Security

The site template access permissions has to be set to Everyone (same for its pages) in order to allow to anyone to access the site template content and pages layout.
The site template edit permission has to be set all time to /platform/administrators (same for its pages).
Once a site is created using a designated template, the created site and pages has to use the permissions chosen by the user in Site Creation step. Once the site pages are created, each page permissions will be managed individually as for now.

Access

  • A new Portlet Site Templates Management will be added in order to allow managing Site Templates. Thus a new REST endpoint will be added with the path /layout/rest/site/templates.
  • The Site Management Portlet will be updated in order to change sites presentation from a list of cards into a list of rows. In addition, some additional actions will be added inside this UI to allow interacting with site templates (such as in site creation steps and creating site templates from existing sites). Thus the REST with path /layout/rest/sites will be amended to alow those operations.

Services & processing

Site Template

A similar behavior of site templates exists already using Space Templates as implemented in #150 and #165. Thus the same technical design will be used to store a Portal Site template.
The current existing behavior of Site template declaration will be improved to import the portal site template rather than reading it from configuration when being instantiated. This will allow to manage the site layout, navigation and pages layout using UI. The import mode strategy on startup has to be preserved as well as any type of sites.

In fact, a new PortalConfig (PORTAL_TEMPLATE) has been already added in #165 and it will be used to store the Site Template Layout.
To store the other information about the site template, the PortalConig.properties Map will be used.
Consequently, the properties will be sored this way:

  • Icon: PortalConig.properties.SITE_TEMPLATE_ICON
  • Name: TranslationService will be used with:
    • Object type: siteTemplate
    • Object id: SiteTemplate PortalConig.id
    • Field name: name
  • Description: TranslationService will be used with:
    • Object type: siteTemplate
    • Object id: SiteTemplate PortalConig.id
    • Field name: description
  • Preview: AttachmentService will be used with:
    • Object type: siteTemplate
    • Object id: SiteTemplate PortalConig.id
    • Field name: illustration
  • Enabled: PortalConig.properties.SITE_ENABLED

In contrary to what was made in Space Templates, the Site Template data will be stored in the existing PortalConig data model. Thus, we will not need a dedicated entity to store special properties which will be used when displaying the site instance.

Site

Currently the site icon field doesn't exist. In fact, it's simulated to have an associated icon for each site by searching for navigation of each site and then return the first page icon. Thus we will need to store the icon inside PortalConig.properties.SITE_ICON since there will ba a specific field to select icon in reviewed Site Properties Form.

Data and persistence

No specific Table will be necessary in order to store Site Templates entity.

@srenault-meeds
Copy link
Member Author

Ready for review @margondicco

@srenault-meeds srenault-meeds moved this from Open to Submitted in MIP Board Jan 7, 2025
@margondicco
Copy link

Hello good work

Go Fonc

@boubaker
Copy link
Member

Ready for tech review by DAO Members (eXo : @rdenarie )

boubaker added a commit to Meeds-io/meeds that referenced this issue Jan 13, 2025
This change will add the Sites Management application in a dedicated administration site page.
@rdenarie
Copy link
Member

Go tech

@boubaker boubaker moved this from Submitted to Accepted in MIP Board Jan 13, 2025
boubaker added a commit to Meeds-io/social that referenced this issue Jan 13, 2025
Prior to this change, when having two navigations with the same name but with different parents, both navigations are considered as active and selected rather than the real selected one only. This is due to the fact that the Navigation tree identifier was the navigation name which isn't a unique identifier for all navigation items. This change will use the navigation uri as the tree items identifier in order to allow select the current navigation only independently from whether its name is duplicated in another tree branch or not.
boubaker added a commit to Meeds-io/gatein-portal that referenced this issue Jan 13, 2025
…ds-io/MIPs#173

This change will allow to define a portlet template of type 'PORTAL_TEMPLATE' the same way to manage 'GROUP_TEMPLATE' as introduced in Space Template Features.
boubaker added a commit to Meeds-io/gatein-portal that referenced this issue Jan 13, 2025
…ds-io/MIPs#173 (#1028)

This change will allow to define a portlet template of type
'PORTAL_TEMPLATE' the same way to manage 'GROUP_TEMPLATE' as introduced
in Space Template Features.
boubaker added a commit to Meeds-io/social that referenced this issue Jan 13, 2025
This change will add ACL algorithm for Sites of type 'PORTAL_TEMPLATE'.
boubaker added a commit to Meeds-io/social that referenced this issue Jan 13, 2025
)

This change will add ACL algorithm for Sites of type 'PORTAL_TEMPLATE'.
boubaker added a commit to Meeds-io/layout that referenced this issue Jan 13, 2025
This change will introduce a new Portlet with its associated Backend to manage site templates.
boubaker added a commit to Meeds-io/layout that referenced this issue Jan 13, 2025
This change will introduce a new Portlet with its associated Backend to manage site templates.
boubaker added a commit to Meeds-io/layout that referenced this issue Jan 13, 2025
…#283)

This change will introduce a new Portlet with its associated Backend to
manage site templates.
boubaker added a commit to Meeds-io/layout that referenced this issue Jan 13, 2025
…#283)

This change will introduce a new Portlet with its associated Backend to
manage site templates.
boubaker added a commit to Meeds-io/social that referenced this issue Jan 13, 2025
…eeds-io/MIPs#173

Prior to this change, the Site Publication button was possible to use on 'public' site only. This change will allow to use it on any site based on 'public' site template.
boubaker added a commit to Meeds-io/social that referenced this issue Jan 13, 2025
…eeds-io/MIPs#173

Prior to this change, the Site Publication button was possible to use on 'public' site only. This change will allow to use it on any site based on 'public' site template.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
)

This change will add ACL algorithm for Sites of type 'PORTAL_TEMPLATE'.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
…eeds-io/MIPs#173 (#4335)

Prior to this change, the Site Publication button was possible to use on
'public' site only. This change will allow to use it on any site based
on 'public' site template.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
Meeds-io/MIPs#173

This change will allow to create a space public site from the Site Templates stored in DB instead of static pages and navigation coming from source files.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
…MIPs#173

This change will avoid replacing '_' character in default value in Translation Field which had to be made on language code instead.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
…o/MIPs#173

Prior to this change, a full mapping is systematically made on Site permissions entity when retrieving it through REST endpoint. This change simplifies it by retrieving the expression and let the UI map the Permission expression when needed through adequate REST endpoint for Page administration purpose only.
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/social that referenced this issue Jan 17, 2025
Prior to this change, when computing the ETag of a Site Rest Response, the child nodes aren't considered in hashcode computing. This change ensures to include the subnodes for hashcode computing of the site entity in order to ensure to refresh the UI when moving up and down the nodes.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
…#283)

This change will introduce a new Portlet with its associated Backend to
manage site templates.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
#284)

This change will implement the process which will import the predefined
site templates.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
…IPs#173 (#286)

This change will allow to edit site template navigation and pages.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
… (#287)

This change will allow to duplicate Site Template including its pages
and navigation.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
…8088 - Meeds-io/MIPs#173 (#288)

This change will modify the Sites presentation from Cards into list of
items to unify with other UIs.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
…IPs#173

This change will allow to display the Site Label on top of Navigation Drawer instead of the site technical name. In addition, this will allow to refresh the selected site name rather than making it static.
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
exo-swf pushed a commit to Meeds-io/layout that referenced this issue Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment