Skip to content

Commit 702fae3

Browse files
authored
Merge pull request #7734 from MicrosoftDocs/u/vilesyk/17224795_loadTheme
Add: doc for the check to include loadTheme API
2 parents b0fe2c3 + a41d7a6 commit 702fae3

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

powerapps-docs/maker/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,6 +2552,8 @@
25522552
href: "./data-platform/powerapps-checker/rules/web/avoid-dom-form-event.md"
25532553
- name: "avoid-isactivitytype"
25542554
href: "./data-platform/powerapps-checker/rules/web/avoid-isactivitytype.md"
2555+
- name: "avoid-loadtheme"
2556+
href: "./data-platform/powerapps-checker/rules/web/avoid-loadtheme.md"
25552557
- name: "avoid-modals"
25562558
href: "./data-platform/powerapps-checker/rules/web/avoid-modals.md"
25572559
- name: "avoid-ui-refreshribbon"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: avoid-loadtheme Power Apps checker reference | Microsoft Docs
3+
description: Power Apps checker rule reference for avoid-loadtheme.
4+
author: lesyk
5+
manager: tapanm-msft
6+
ms.topic: reference
7+
ms.date: 02/17/2023
8+
ms.service: "powerapps"
9+
ms.subservice: dataverse-maker
10+
ms.author: vilesyk
11+
search.audienceType:
12+
- maker
13+
search.app:
14+
- PowerApps
15+
---
16+
17+
# `avoid-loadtheme`
18+
19+
`loadTheme` is a way to provide a theme in global (and only global) scope, which will affect your entire application. We recommend that you replace `loadTheme` with `ThemeProvider`. That way, your application consistently has one way of providing a theme.
20+
21+
## Recommendation
22+
23+
For details on the correct `ThemeProvider` usage go to the [ThemeProvider](https://github.com/microsoft/fluentui/wiki/How-to-apply-theme-to-Fluent-UI-React-components#themeprovider-in-preview) documentation.

powerapps-docs/maker/data-platform/use-powerapps-checker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ The following table lists the component type, rule description, severity, and wh
137137
|Web Resources | [avoid-dom-form-event](./powerapps-checker/rules/web/avoid-dom-form-event.md) | | High | Yes |
138138
|Web Resources | [avoid-crm2011-service-odata](./powerapps-checker/rules/web/avoid-crm2011-service-odata.md) | Don't target the Microsoft Dynamics CRM 2011 OData 2.0 endpoint. | Critical | Yes |
139139
|Web Resources | [avoid-crm2011-service-soap](./powerapps-checker/rules/web/avoid-crm2011-service-soap.md) | Don't target the Microsoft Dynamics CRM 2011 SOAP services. | Critical | Yes |
140+
|Web Resources | [avoid-loadtheme](./powerapps-checker/rules/web/avoid-loadtheme.md) | Don't use `loadTheme` Fluent v8 API. | Low | No |
140141
|Web Resources | [avoid-browser-specific-api](./powerapps-checker/rules/web/avoid-browser-specific-api.md) | Don't use Internet Explorer legacy APIs or browser plug-ins. | Critical | Yes |
141142
|Web Resources | [avoid-unpub-api](./powerapps-checker/rules/web/avoid-unpub-api.md) | | High | Yes |
142143
|Web Resources | [avoid-window-top](./powerapps-checker/rules/web/avoid-window-top.md) | | High | Yes |

0 commit comments

Comments
 (0)