@atlaskit/app-provider 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/app-provider
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#105257](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105257)
8
+ [`16af4057ef04e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/16af4057ef04e) -
9
+ Fixes a race condition with setting the theme. This change is no longer behind a feature flag.
10
+
3
11
  ## 1.6.1
4
12
 
5
13
  ### Patch Changes
@@ -144,20 +144,8 @@ function ThemeProvider(_ref) {
144
144
  return _objectSpread(_objectSpread({}, theme), nextTheme);
145
145
  });
146
146
  }, []);
147
- (0, _react.useEffect)(function () {
148
- if ((0, _platformFeatureFlags.fg)('platform_dst_fix_set_theme_race')) {
149
- return;
150
- }
151
- (0, _tokens.setGlobalTheme)(_objectSpread(_objectSpread({}, theme), {}, {
152
- colorMode: reconciledColorMode
153
- }));
154
- }, [theme, reconciledColorMode]);
155
147
  var lastSetGlobalThemePromiseRef = (0, _react.useRef)(null);
156
148
  (0, _react.useEffect)(function () {
157
- if (!(0, _platformFeatureFlags.fg)('platform_dst_fix_set_theme_race')) {
158
- return;
159
- }
160
-
161
149
  /**
162
150
  * We need to wait for any previous `setGlobalTheme` calls to finish before calling it again.
163
151
  * This is to prevent race conditions as `setGlobalTheme` is async and mutates the DOM (e.g. sets the
@@ -115,21 +115,8 @@ function ThemeProvider({
115
115
  ...nextTheme
116
116
  }));
117
117
  }, []);
118
- useEffect(() => {
119
- if (fg('platform_dst_fix_set_theme_race')) {
120
- return;
121
- }
122
- setGlobalTheme({
123
- ...theme,
124
- colorMode: reconciledColorMode
125
- });
126
- }, [theme, reconciledColorMode]);
127
118
  const lastSetGlobalThemePromiseRef = useRef(null);
128
119
  useEffect(() => {
129
- if (!fg('platform_dst_fix_set_theme_race')) {
130
- return;
131
- }
132
-
133
120
  /**
134
121
  * We need to wait for any previous `setGlobalTheme` calls to finish before calling it again.
135
122
  * This is to prevent race conditions as `setGlobalTheme` is async and mutates the DOM (e.g. sets the
@@ -129,20 +129,8 @@ function ThemeProvider(_ref) {
129
129
  return _objectSpread(_objectSpread({}, theme), nextTheme);
130
130
  });
131
131
  }, []);
132
- useEffect(function () {
133
- if (fg('platform_dst_fix_set_theme_race')) {
134
- return;
135
- }
136
- setGlobalTheme(_objectSpread(_objectSpread({}, theme), {}, {
137
- colorMode: reconciledColorMode
138
- }));
139
- }, [theme, reconciledColorMode]);
140
132
  var lastSetGlobalThemePromiseRef = useRef(null);
141
133
  useEffect(function () {
142
- if (!fg('platform_dst_fix_set_theme_race')) {
143
- return;
144
- }
145
-
146
134
  /**
147
135
  * We need to wait for any previous `setGlobalTheme` calls to finish before calling it again.
148
136
  * This is to prevent race conditions as `setGlobalTheme` is async and mutates the DOM (e.g. sets the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/app-provider",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "A top level provider for the Design System.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@atlaskit/platform-feature-flags": "^0.3.0",
43
- "@atlaskit/tokens": "^3.1.0",
43
+ "@atlaskit/tokens": "^3.2.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "bind-event-listener": "^3.0.0"
46
46
  },
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@af/visual-regression": "*",
52
- "@atlaskit/dropdown-menu": "^12.24.1",
52
+ "@atlaskit/dropdown-menu": "^12.25.0",
53
53
  "@atlaskit/ds-lib": "^3.3.0",
54
54
  "@atlaskit/primitives": "^13.3.7",
55
55
  "@atlaskit/ssr": "*",
@@ -93,9 +93,6 @@
93
93
  },
94
94
  "homepage": "https://atlassian.design/components/app-provider",
95
95
  "platform-feature-flags": {
96
- "platform_dst_fix_set_theme_race": {
97
- "type": "boolean"
98
- },
99
96
  "platform-default-typography-modernized": {
100
97
  "type": "boolean"
101
98
  }