You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spfx/known-issues-and-common-questions.md
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,13 @@
1
1
---
2
2
title: SharePoint Framework known issues and frequently asked questions
3
3
description: Find answers to issues and FAQ about the SharePoint Framework.
4
-
ms.date: 01/12/2018
4
+
ms.date: 10/22/2019
5
5
ms.prod: sharepoint
6
6
localization_priority: Priority
7
7
---
8
-
9
-
10
8
# SharePoint Framework known issues and frequently asked questions
11
9
12
-
This page is for listing any known issues or to answer any frequently asked questions about SharePoint Framework.
10
+
This page is for listing any known issues or to answer any frequently asked questions about SharePoint Framework.
13
11
14
12
## Known issues
15
13
@@ -20,9 +18,9 @@ This page is for listing any known issues or to answer any frequently asked ques
20
18
21
19
If you are using Chrome as your development browser, you might have challenges with the developer certificate regardless of executing the `gulp trust-dev-cert` command. Chrome has changed its model for certificate validation starting from version 58, and you might see a "Your connection is not private" warning when you are accessing the local workbench.
22
20
23
-
You should update your Yeoman template packages. We have updated certification creation logic in the [*@microsoft/gulp-core-build-serve* package](https://www.npmjs.com/package/@microsoft/gulp-core-build-serve).
21
+
You should update your Yeoman template packages. We have updated certification creation logic in the [*\@microsoft/gulp-core-build-serve* package](https://www.npmjs.com/package/@microsoft/gulp-core-build-serve).
24
22
25
-
In existing solutions, you can simply delete this folder and run `npm install` to get the updated package. You also need to execute `untrust-dev-cert` and `trust-dev-cert` commands on your machine to address the certification creation logic issue.
23
+
In existing solutions, you can simply delete this folder and run `npm install` to get the updated package. You also need to execute `untrust-dev-cert` and `trust-dev-cert` commands on your machine to address the certification creation logic issue.
26
24
27
25
## Frequently asked questions
28
26
@@ -43,8 +41,7 @@ SharePoint Framework client-side web parts on classic pages were released to Sha
43
41
44
42
## See also
45
43
46
-
Please use following resources to provide feedback, comments, and questions to SharePoint engineering.
44
+
Please use following resources to provide feedback, comments, and questions to SharePoint engineering.
Copy file name to clipboardExpand all lines: docs/spfx/use-theme-colors-in-your-customizations.md
+31-41Lines changed: 31 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,15 @@
1
1
---
2
2
title: Use theme colors in your SharePoint Framework customizations
3
3
description: Use theme colors so that your customizations look like a part of the site by referring to the theme colors of the context site in your SharePoint Framework solution.
4
-
ms.date: 01/24/2018
4
+
ms.date: 10/22/2019
5
5
ms.prod: sharepoint
6
6
localization_priority: Priority
7
7
---
8
-
9
-
10
8
# Use theme colors in your SharePoint Framework customizations
11
9
12
10
When building SharePoint Framework customizations, you should use theme colors so that your customizations look like a part of the site. This article explains how can you refer to the theme colors of the context site in your SharePoint Framework solution.
13
11
14
-
> [!NOTE]
12
+
> [!NOTE]
15
13
> Although this article uses a SharePoint Framework client-side web part as an example, the described techniques apply to all types of SharePoint Framework customizations.
16
14
17
15
## Fixed colors vs. theme colors
@@ -30,49 +28,45 @@ When working with fixed colors, you specify them in CSS properties, for example:
30
28
31
29
```css
32
30
.button {
33
-
background-color: #0078d7;
31
+
background-color: #0078d7;
34
32
}
35
33
```
36
34
37
-
<br/>
38
-
39
35
To use a theme color instead, replace the fixed color with a theme token:
When your SharePoint Framework customization is loading on the page, the **@microsoft/load-themed-styles** package, which is a part of the SharePoint Framework, looks for theme tokens in CSS files and tries to replace them with the corresponding color from the current theme. If the value for the specified token is not available, SharePoint Framework uses the value specified by using the **default** parameter instead, which is why it's important that you always include it.
43
+
When your SharePoint Framework customization is loading on the page, the **\@microsoft/load-themed-styles** package, which is a part of the SharePoint Framework, looks for theme tokens in CSS files and tries to replace them with the corresponding color from the current theme. If the value for the specified token is not available, SharePoint Framework uses the value specified by using the **default** parameter instead, which is why it's important that you always include it.
50
44
51
45
The following theme tokens are available for you to use:
52
46
53
-
Token|Default value on a modern team site using the red palette|Remarks
|`themeDark`|`#b3030c`|Used for action icons in the command bar and as a hover color.|
52
+
|`themeDarkAlt`|`#b3030c`||
53
+
|`themeDarker`|`#770208`||
54
+
|`themeLight`|`#fd969b`||
55
+
|`themeLightAlt`|`#fd969b`||
56
+
|`themeLighter`|`#fecacd`||
57
+
|`themeLighterAlt`|`#fecacd`||
58
+
|`themePrimary`|`#ee0410`|Primary theme color. Used for icons and default buttons.|
59
+
|`themeSecondary`|`#fc6169`||
60
+
|`themeTertiary`|`#fd969b`||
61
+
62
+
> [!NOTE]
69
63
> There are more tokens registered with the SharePoint Framework. While all of them have values specified on classic sites, only the subset mentioned earlier has values on modern SharePoint sites. For the complete list of available tokens, see the value of the `window.__themeState__.theme` property by using the console in your web browser's developer tools.
70
64
71
65
## Use theme colors in your customizations
72
66
73
67
When you scaffold a new SharePoint Framework client-side web part, by default, it uses the fixed blue palette. The following steps describe the necessary adjustments to have the web part use theme colors instead.
74
68
75
-
> [!NOTE]
69
+
> [!NOTE]
76
70
> The following steps apply to a SharePoint Framework client-side web part named _HelloWorld_ built by using React. For web parts built using different libraries and other types of customizations, you might need to adjust the modifications accordingly.
77
71
78
72
### To use theme colors
@@ -81,35 +75,31 @@ When you scaffold a new SharePoint Framework client-side web part, by default, i
81
75
82
76

83
77
84
-
2. In the same folder, open the **HelloWorld.module.scss** file. Change the `.row` selector to:
78
+
1. In the same folder, open the **HelloWorld.module.scss** file. Change the `.row` selector to:

111
101
112
-
4. When you add the web part to a site, the colors used by the web part automatically adapt to the theme colors used by the current site.
102
+
1. When you add the web part to a site, the colors used by the web part automatically adapt to the theme colors used by the current site.
113
103
114
104

Copy file name to clipboardExpand all lines: docs/spfx/web-parts/basics/working-with-requestdigest.md
+33-35Lines changed: 33 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,13 @@
1
1
---
2
2
title: Work with __REQUESTDIGEST
3
-
description: Add a valid request digest to your request when executing non-GET REST requests to the SharePoint API.
4
-
ms.date: 01/09/2018
3
+
description: Add a valid request digest to your request when executing non-GET REST requests to the SharePoint API.
4
+
ms.date: 10/22/2019
5
5
ms.prod: sharepoint
6
6
localization_priority: Priority
7
7
---
8
-
9
-
10
8
# Work with __REQUESTDIGEST
11
9
12
-
When executing non-GET REST requests to the SharePoint API, you must add a valid request digest to your request. This digest proves validity of your request to SharePoint. Because this token is valid only for a limited period of time, you have to ensure that the token you have is valid before adding it to your request or the request fails.
10
+
When executing non-GET REST requests to the SharePoint API, you must add a valid request digest to your request. This digest proves validity of your request to SharePoint. Because this token is valid only for a limited period of time, you have to ensure that the token you have is valid before adding it to your request or the request fails.
13
11
14
12
In classic pages, SharePoint includes a request digest token on the page in a hidden field named **__REQUESTDIGEST**. One of the most common approaches to work with the request digest is to obtain it from that field and add it to the request, for example:
15
13
@@ -31,59 +29,59 @@ $.ajax({
31
29
});
32
30
```
33
31
34
-
Such a request would work initially, but if the user has the page open for a longer period of time, the request digest on the page expires and the request fails with a **403 FORBIDDEN** result. By default, a request digest token is valid for 30 minutes, so before using it, you have to ensure that it's still valid. In the past you had to do this manually, by comparing the timestamp from the request digest with the current time.
32
+
Such a request would work initially, but if the user has the page open for a longer period of time, the request digest on the page expires and the request fails with a **403 FORBIDDEN** result. By default, a request digest token is valid for 30 minutes, so before using it, you have to ensure that it's still valid. In the past you had to do this manually, by comparing the timestamp from the request digest with the current time.
35
33
36
34
SharePoint Framework simplifies this process by offering you two ways of ensuring that your request has a valid request digest token.
37
35
38
36
## Use the SPHttpClient to communicate with the SharePoint REST API
39
37
40
-
The recommended way to communicate with the SharePoint REST API is to use the SPHttpClient provided with the SharePoint Framework. This class wraps issuing REST requests to the SharePoint REST API with convenient logic that simplifies your code.
38
+
The recommended way to communicate with the SharePoint REST API is to use the SPHttpClient provided with the SharePoint Framework. This class wraps issuing REST requests to the SharePoint REST API with convenient logic that simplifies your code.
41
39
42
40
For example, whenever you issue a non-GET request using the SPHttpClient, it automatically obtains a valid request digest and adds it to the request. This significantly simplifies your solution because you don't need to build code to manage request digest tokens and ensure their validity.
43
41
44
-
If you're building new customizations on the SharePoint Framework, you should always use the SPHttpClient to communicate with the SharePoint REST API.
42
+
If you're building new customizations on the SharePoint Framework, you should always use the SPHttpClient to communicate with the SharePoint REST API.
45
43
46
44
Sometimes, however, you might not be able to use the SPHttpClient. This can be the case, for example, when you're migrating an existing customization to the SharePoint Framework and want to keep as much of the original code as possible, or you're building a customization by using a library such as Angular(JS) that has its own services for issuing web requests. In such cases you can obtain a valid request digest token from the **DigestCache**.
47
45
48
46
## Retrieve a valid request digest by using the DigestCache service
49
47
50
-
If you can't use the SPHttpClient for communicating with the SharePoint REST API, you can obtain a valid request digest token by using the **DigestCache** service provided with the SharePoint Framework.
48
+
If you can't use the SPHttpClient for communicating with the SharePoint REST API, you can obtain a valid request digest token by using the **DigestCache** service provided with the SharePoint Framework.
51
49
52
50
The benefit of using the DigestCache service over manually obtaining a valid request digest token is that the DigestCache automatically checks if the previously retrieved request digest is still valid. If it's expired, the DigestCache service automatically requests a new request digest token from SharePoint and stores it from subsequent requests. Using the DigestCache simplifies your code and makes your solution more robust.
53
51
54
52
### To use the DigestCache service in your code
55
53
56
-
1. Import the **DigestCache** and **IDigestCache** types from the **@microsoft/sp-http** package:
0 commit comments