Closed srenault-meeds closed 8 months ago
Ready for review @margondicco
Hello Go fonc
Hello Go fonc
Thanks, I 'll take it from here for Tech spec
Ready for spec Review by DAO Members ( eXo: @rdenarie )
@margondicco I have added the description of each format (landscape, portrait and square) as I have explained it to you yesterday
Go tech
ACCs & PRs ready to review by DAO members (eXo : @rdenarie )
all pr validated
all pr validated
Thanks, merged to develop.
Rationale
We have four different banners available:
We need another one for public site use case and for any page that would welcome this content. To avoid duplicating banner type, we need to merge at least overview and new banner for page.
In fine, one unique image component must be provided for consistency sake and for reusability purpose. This is already the case for profile, space and program banners.
1. Functional Requirements
Top User Stories
Default display
By default, the primary color of the current platform is used as the background color
Access to this image portlet:
Management permissions
Given I am admin or publisher of the site/page
Access to the image (view)
Given I have access to the page where this image is added Then I can see the image -> Same permission as the current page
Image edition When having right to edit it, Then I have the expected regular options:
In addition to this, I have options to change the display of the image with three options (landscape, portrait, square)
For any format, the width to apply is the one used in the container where the portlet is
Precisions
-> No change for profile, spaces and program banner Studied and conclusions are:
Impacts
Replace overview banner portlets and remove the "old" overview banner portlet In the app registry as well
Gamification
NA
Notifications
NA
Analytics
NA
Unified Search
NA
2. Technical Requirements
Security
The Image portlet (same as Links and SNV) content access has to follow the following ACL rules:
Who can Edit it
Who can Access it
Configurability
It must be possible to define the default image to display when configuring a portlet in
pages.xml
.Upgradability
(Same as Links and SNV Portlets) When the
merge
oroverwrite
import mode are applied to pages, the portlet settings has to remain as was set using UI.Feature Flags
No feature flag is needed
3. Software Architecture
Security
The
CMSPortlet
introduced in MIP #93 will be reused in order to rely on the same Permission settings of CMS portlets.Access
The Attachment REST endpoint introduced by MIP #53 will be used to add image attachments to portlet. To do this a new
AttachmentPlugin
will be added for a new object typeimagePortlet
which will manage object with ids the Setting name associated to each portlet.Services & processing
The portlet definition of
CMSImagePortlet
should allow to define a default image to import from sources through a local relative path using a portlet preference with nameimage-path
. When this parameter is added in portlet preferences, it should be imported the whole first time the portlet is displayed.Data and persistence
The additional portlet parameters will be stored using AttachmentService in associated MetadataService Type (inside
MetadataItem
properties).