cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Enhancement: `spo page section add` extend *zoneEmphasis* option to handle images

Open mkm17 opened this issue 1 year ago • 4 comments

Hi, in the latest updates of SharePoint Online, there's a new feature allowing you to set different types of section backgrounds.

Here are the options that I can see in the page source when the background image option is used.

Option Values
--zoneEmphasis [zoneEmphasis] None, Neutral, Soft, Strong, Image,Gradient (the new ones)
--isCollapsibleSection Set section to be collapsible
--showDivider Show divider line between sections
--iconAlignment [iconAlignment] Expand/collapse icon alignment
--isExpanded Set default display of collapsible section
--gradientText [gradientText] Set gradient setting of a section
--imageUrl [imageUrl] Background image URL (if skipped, the default one will be set)
--imageHeight [imageHeight] Background image height
--imageWidth [imageWidth] Background image width
--fillMode [fillMode] Fill mode of an image. Possible values are ScaleToFill, ScaleToFit, Tile, OriginalSize
--useLightText Use light text parameter for background
--overlayColor [overlayColor] Overlay color for background
--overlayOpacity [overlayOpacity] Overlay opacity for background

Is it worth adding so many new parameters for this single option? Perhaps you have any recommendations regarding this matter. I will also explore the gradient option; maybe some parameters could be shared (like overlay ones).

And if you don't mind, I can take on this task, as I have already conducted some research.

mkm17 avatar May 08 '24 15:05 mkm17

That would be a great enhancement. We definitely need to validate gradients too. If we're adding background images, we should consider gradients as well. Adding all these options to spo page section add seems like the best approach. We could also use spo page section background set, but that feels a bit overkill. One more feature I'd like is setting a focus point for the image. It's not the easiest to define, but it's quite interesting.

Jwaegebaert avatar May 14 '24 06:05 Jwaegebaert

@mkm17 awesome suggestion:

  • I am also fine in adding those as additional/new options. We already have commands with a looot of options like spo site set
  • what should be the possible options for overlayColor? white/dark?
  • BTW I think we also don't have options to define it as collapsible and the following 😉. Why don't we try to tackle those as well? Also since those are not 'that new' 🙂 image

Adam-it avatar May 14 '24 23:05 Adam-it

@Jwaegebaert, thank you for the comment. I will then check the gradient option and extend the specification of the command. Regarding the focus, I believe it may need to be handled by the height and width parameters, but I am not sure how to handle it.

@Adam-it, ok, I will check how it is set and add it to the specification 😄 The overlayColor can be provided in #rrggbb format

mkm17 avatar May 15 '24 06:05 mkm17

Hi, I have updated the specification. The settings for the collapsible section and gradient background have been added. :)

mkm17 avatar May 27 '24 20:05 mkm17