pnp / pnp/pnpframework

Client side page sections not collecting/applying name, collapsible, expanded propeties

Open
#780 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

When getting and applying templates, some of the newer properties on page sections are ignored. This includes DisplayName, Collapsible, and Expanded, possibly among others.

I believe this will handle extracting the properties and writing them to the template, but I'm not sure about the template -> SP part. I've also not been able to test the below due to some bizarre (unrelated) environment issues.

Index: src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs b/src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs
--- a/src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs	(revision a9084ee09b904e67a54630fd7ae67386e9945517)
+++ b/src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs	(date 1666877243533)
@@ -208,6 +208,9 @@
                         {
                             Order = section.Order,
                             BackgroundEmphasis = (Emphasis)section.ZoneEmphasis,
+                            DisplayName = section.DisplayName,
+                            Collapsible = section.Collapsible,
+                            IsExpanded = section.IsExpanded
                         };
                         if (section.VerticalSectionColumn != null)
                         {

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/lib/PnP.Framework/Provisioning/ObjectHandlers/Utilities/ClientSidePageContentsHelper.cs and inspect how client-side page section properties are extracted into templates. Verify the template-to-SharePoint direction as well, including DisplayName, Collapsible, and Expanded/IsExpanded, and add or run coverage for the round trip. Done means these properties are preserved when getting and applying templates.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.