From 45c546e4cbeb52ad4f120dae25812af76c0ccc18 Mon Sep 17 00:00:00 2001 From: Bert Jansen Date: Mon, 18 Nov 2024 13:49:25 +0100 Subject: [PATCH] Ensure that for first party web parts that support full bleed we set the SupportsFullBleed flag #1554 --- src/sdk/CHANGELOG.md | 1 + .../Model/SharePoint/Pages/Internal/PageWebPart.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sdk/CHANGELOG.md b/src/sdk/CHANGELOG.md index 1c8abd3927..962b18c676 100644 --- a/src/sdk/CHANGELOG.md +++ b/src/sdk/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Pages that removed the full width section and the banner web part and therefore have no page title anymore do not get a page title when being updated #1550 [jansenbe - Bert Jansen] - Fixed regression introduced by https://github.com/pnp/pnpcore/commit/29a64bef0cfedbb3a0f7b64386b64d54793d7d71 and was partly fixed by #1577 [jansenbe - Bert Jansen] - Improved page parsing robustness by allowing zone and section index values to be not defined #1552 [jansenbe - Bert Jansen] +- Ensure that for first party web parts that support full bleed we set the SupportsFullBleed flag #1554 [jansenbe - Bert Jansen] ## [1.14] diff --git a/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/PageWebPart.cs b/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/PageWebPart.cs index 9e242267cc..0846aa1e70 100644 --- a/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/PageWebPart.cs +++ b/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/PageWebPart.cs @@ -617,9 +617,13 @@ internal override void FromHtml(IElement element, bool isHeader) { SupportsFullBleed = isFullWidth.GetBoolean(); } - else if (Page.IdToDefaultWebPart(WebPartId) == DefaultWebPart.PageTitle) + // Ensure that for first party web parts that support full bleed we set the SupportsFullBleed flag + else if (Page.IdToDefaultWebPart(WebPartId) == DefaultWebPart.PageTitle || //Message ID: MC791596 / Roadmap ID: 386904 + Page.IdToDefaultWebPart(WebPartId) == DefaultWebPart.Image || + Page.IdToDefaultWebPart(WebPartId) == DefaultWebPart.Hero || + Page.IdToDefaultWebPart(WebPartId) == DefaultWebPart.CountDown) { - SupportsFullBleed = true; //Message ID: MC791596 / Roadmap ID: 386904 + SupportsFullBleed = true; } }