Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes: Allow saving SP page with an existing collapsible section. Closes #6462 #6540

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mkm17
Copy link
Contributor

@mkm17 mkm17 commented Dec 29, 2024

Closes #6462
Changes in page clientsidewebpart add and page text add commands to handle existing collapsible sections when saving an SP page.

In this PR, I have also updated the page text add test file to align with the latest recommendations.

Just one comment, I believe we also need to add some handlers for the controlType":0,"pageSettingsSlice... element, which is also visible in the page context.

@milanholemans
Copy link
Contributor

Thanks @mkm17! We'll try to review it ASAP.

Just one comment, I believe we also need to add some handlers for the controlType":0,"pageSettingsSlice... element, which is also visible in the page context.

Could you clarify this a bit more, please?

@mkm17
Copy link
Contributor Author

mkm17 commented Dec 31, 2024

hi @milanholemans, I noticed that on a page, there is an additional element with controlType: 0 and some page settings. In the page text add command, during the changes to the command, this setting is omitted (during updates in clientsidepage.ts and Page.ts). In the page clientsidewebpart add command, as far as I remember, it is handled better, but the method used to add new parts to the page is implemented differently.

To be honest, I am not sure what we can do with it. I noticed that the clientsidepage.ts and Page.ts are also used in different commands. We could use a similar approach to page clientsidewebpart add and implement it in the page text add and other commands, or simply update page text add (and possibly other commands) to handle controlType:0.

@milanholemans
Copy link
Contributor

To be honest, I have no idea why we have Page.ts and clientsidepage.ts. It feels like it should be one util file.
Do you have more info about this @pnp/cli-for-microsoft-365-maintainers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Allow adding text to an existing collapsible section using spo page text add
2 participants