Skip to content

#2179 - Added metadata only mode for retrieving a modern page#2184

Closed
estruyf wants to merge 2 commits intopnp:mainfrom
estruyf:issue/2179
Closed

#2179 - Added metadata only mode for retrieving a modern page#2184
estruyf wants to merge 2 commits intopnp:mainfrom
estruyf:issue/2179

Conversation

@estruyf
Copy link
Copy Markdown
Member

@estruyf estruyf commented Feb 17, 2021

Added an extra flag --metadataOnly flag to skip the control and section parsing which fails to depend on the contents of the web parts and sections.

Here is an example:

Screenshot 2021-02-17 at 20 48 38

Top is when using the --metadataOnly flag, bottom without it.

@waldekmastykarz
Copy link
Copy Markdown
Member

That seems to me like a workaround though. If there is an issue with parsing * we should address that rather than introducing a new flag that works around the problem. It seems like only a matter of time before we'll need to handle * in the content, so let's fix it right away.

@waldekmastykarz
Copy link
Copy Markdown
Member

We discussed it separately in more detail and arrived to the conclusion that this addition has its place, and we still need to fix the issue with parsing content with * which will be done separately.

@estruyf
Copy link
Copy Markdown
Member Author

estruyf commented Feb 19, 2021

Ok @waldekmastykarz, like discussed, I updated the spo page get command with the extra API call. I also updated all tests to make them easier readable by using mock references only.

@waldekmastykarz
Copy link
Copy Markdown
Member

Awesome! Thank you! Let's get this in 👏

@waldekmastykarz waldekmastykarz self-assigned this Feb 19, 2021
Copy link
Copy Markdown
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

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

Awesome! It's in 👏

request
.get(requestOptions)
.then((res: any): void => {
.then((res: any): Promise<any> => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's avoid using any and instead specify the type we're expecting {CanvasContent1:string} | void

@waldekmastykarz
Copy link
Copy Markdown
Member

Merged manually. Thank you! 👏

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.

2 participants