Skip to content

Conversation

@gautamdsheth
Copy link
Collaborator

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #X, partially fixes #Y, mentioned in #Z, etc.

What is in this Pull Request ?

Please describe the changes in the PR.

Guidance

  • You can delete this section when you are submitting the pull request.*
  • Please update this PR information accordingly. We use this as part of our release notes in monthly communications.
  • Please target your PR to Dev branch. If you do not target the Dev branch we will not accept this PR.
Copilot AI review requested due to automatic review settings September 26, 2025 12:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the ZoneReflowStrategy parameter to the Add-PnPPageSection cmdlet, allowing users to control how zones are reflowed when rendering flexible layout sections.

  • Adds validation attributes for ZoneEmphasis and VerticalZoneEmphasis parameters
  • Introduces ZoneReflowStrategy parameter with conditional logic for flexible layout sections
  • Updates documentation with new parameter details and usage examples

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Commands/Pages/AddPageSection.cs Adds ZoneReflowStrategy parameter, validation attributes, and conditional logic for flexible layout sections
documentation/Add-PnPPageSection.md Documents the new ZoneReflowStrategy parameter with examples and parameter details

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 39 to +48
{
page.AddSection(SectionTemplate, Order, ZoneEmphasis, VerticalZoneEmphasis);
if (SectionTemplate == CanvasSectionTemplate.FlexibleLayoutSection || SectionTemplate == CanvasSectionTemplate.FlexibleLayoutVerticalSection)
{
// Use the user-supplied ZoneReflowStrategy when adding flexible layout sections
page.AddSection(SectionTemplate, Order, ZoneEmphasis, VerticalZoneEmphasis, ZoneReflowStrategy);
}
else
{
page.AddSection(SectionTemplate, Order, ZoneEmphasis, VerticalZoneEmphasis);
}
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The condition checking for flexible layout sections could be extracted into a helper method or property to improve readability and make it easier to maintain if more flexible layout section types are added in the future.

Copilot uses AI. Check for mistakes.
@gautamdsheth gautamdsheth merged commit 7461b0b into dev Sep 26, 2025
4 checks passed
@gautamdsheth gautamdsheth deleted the feat/zonereflow branch October 3, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant