Will background sections be supported in domain isolated webparts (feature available for spfx 1.8.2 on wards) ?
Category
- [x] Question
- [ ] Typo
- [ ] Bug
- [ ] Additional article idea
Will background sections be supported in domain isolated webparts (feature available for spfx 1.8.2 on wards) ?
Expected or Desired Behavior
I have created simple helloworld webpart. Then followed instructions/code sample to use section Backgrounds to webparts using below link https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/section-backgrounds The webpart worked when it was deployed as "isDomainIsolated": false. When I Edit the page, add the webpart and check the background section to "strong", it will trigger _handleThemeChangedEvent function and apply the theme colors to my webpart title and content. But when webpart is deployed with "isDomainIsolated": true. The webpart fails to render
Observed Behavior
I checked the developer tools. It throws error Cannot read property 'semanticColors' of undefined.
Steps to Reproduce
We can create simple hello world webpart, but make sure to answer "Will webpart require permssions to access web APIs as Yes". Then follow the steps mentioned in https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/supporting-section-backgrounds
Or take code sample from https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/section-backgrounds Upgrade webpart to spfx 1.8.2 Then set "isDomainIsolated": true in package-solution.json
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
The same error occurs when deployed to a Singe Part App Page .
v1.10.0
ThemeProvider.tryGetTheme() returns null
This should now be rolled out fully
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