sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Is it possible to have the "Applying site design" message displayed during the whole process (Site Design > Flow > Azure function)?

Open DaniCorretja opened this issue 7 years ago • 7 comments

Category

  • [x] Question
  • [ ] Typo
  • [ ] Bug
  • [ ] Additional article idea

When creating a site in SharePoint using a custom site design, a status bar appears on the top saying "Applying site design. We're updating your site based on the design you chose.". When the site design finishes it changes to "Site design applied. Refresh this site to see the changes.".

I have a site design which is essentially triggering a flow, which trigger an azure function that performs all the configuration in the site. I've noticed that the message on the top informing the user that the site is being configured it disappears right after triggering the flow, and it doesn't wait for the flow to finish...Is there any way to change this behavior and have the message displaying during the whole process? What does tell the site to display one message, the other, or none at all?

Thanks!

DaniCorretja avatar Sep 23 '19 15:09 DaniCorretja

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Sep 23 '19 15:09 msft-github-bot

Not at the moment as there's no clear indication when the full end-to-end story is completed. There has been high level thinking on potentially supporting this in the future, but no locked actions for now and no ETA for this potential work.

VesaJuvonen avatar Sep 23 '19 17:09 VesaJuvonen

As Vesa mentioned, there isn't a way to achieve this.

I have been able to achieve a similar functionality, but it required a bit of development work and required setting "waitForReply" on the TriggerFlow action. (This sets the Site Design as in-process while the Flow is running)

  1. I created a replica of the message using SPFx Application Customizer
  2. Deployed SPFx Application Customizer with the the Site Design
  3. App Customizer queries the current status of the task using GetSiteDesignRunStatus
  4. If Outcome of TriggerFlow is still processing, show the app customizer.
  5. When Azure Function is complete, I set the outcome using SetSiteScriptStageOutcome and then uninstall the App Customizer from the site.

bcameron1231 avatar Sep 23 '19 17:09 bcameron1231

Thanks, @bcameron1231, I was thinking on the same approach you suggest but I really want to avoid any custom dev if possible.

Thanks, @VesaJuvonen for the quick response. But I was wondering, there should be something that tells the page if it needs to render the message or not, right? Maybe a property bag or something similar that gets updated at some point when the site design finishes? Would be really useful to understand what is happening behind the scenes, if possible, to see if I can tweak it somehow.

DaniCorretja avatar Sep 23 '19 19:09 DaniCorretja

As mentioned, the message bar will goes away after first load. When it loads, it will check the status of the site design task. It will repeatedly check the status of the site design until it's complete. However, any subsequent refreshes of the page, the message bar will not appear because it was already loaded once.

There is no property bag values for this because property bag doesn't exist in modern sites (no script).

Unfortunately, there isn't much we can do to tweak or hack into the process to keep the message bar up there.

bcameron1231 avatar Sep 24 '19 14:09 bcameron1231

Ok, thanks for your input @bcameron1231. I'm closing this and hopefully, this will be supported in the future without custom dev required.

DaniCorretja avatar Sep 25 '19 11:09 DaniCorretja

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 23 '20 12:01 msft-github-bot