@atlaskit/page-layout 3.11.5 → 3.11.7

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,20 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 3.11.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#103752](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103752)
8
+ [`4b581a9ac4abd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4b581a9ac4abd) -
9
+ Testing behind an internal feature gate, a React 18 concurrent safe way to initialize the
10
+ LeftSidebar to avoid animation on hydration or initial client-side rendering.
11
+
12
+ ## 3.11.6
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 3.11.5
4
19
 
5
20
  ### Patch Changes
@@ -15,7 +15,7 @@ import {
15
15
  Search,
16
16
  Settings,
17
17
  } from '@atlaskit/atlassian-navigation';
18
- import Drawer from '@atlaskit/drawer';
18
+ import { Drawer, DrawerCloseButton, DrawerContent, DrawerSidebar } from '@atlaskit/drawer/compiled';
19
19
  import { JiraIcon, JiraLogo } from '@atlaskit/logo';
20
20
 
21
21
  import { DefaultCreate } from './create';
@@ -55,7 +55,12 @@ const SearchDrawer = () => {
55
55
  label="Search"
56
56
  />
57
57
  <Drawer label={search} isOpen={isOpen} onClose={onClose}>
58
- <div>{search}</div>
58
+ <DrawerSidebar>
59
+ <DrawerCloseButton />
60
+ </DrawerSidebar>
61
+ <DrawerContent>
62
+ <div>{search}</div>
63
+ </DrawerContent>
59
64
  </Drawer>
60
65
  </Fragment>
61
66
  );
@@ -10,6 +10,7 @@ var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _useCloseOnEscapePress = _interopRequireDefault(require("@atlaskit/ds-lib/use-close-on-escape-press"));
12
12
  var _motion = require("@atlaskit/motion");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _responsive = require("@atlaskit/primitives/responsive");
14
15
  var _colors = require("@atlaskit/theme/colors");
15
16
  var _constants = require("../../common/constants");
@@ -79,7 +80,8 @@ var LeftSidebar = function LeftSidebar(props) {
79
80
  flyoutLockCount = leftSidebarState.flyoutLockCount,
80
81
  isLeftSidebarCollapsed = leftSidebarState.isLeftSidebarCollapsed,
81
82
  leftSidebarWidth = leftSidebarState.leftSidebarWidth,
82
- lastLeftSidebarWidth = leftSidebarState.lastLeftSidebarWidth;
83
+ lastLeftSidebarWidth = leftSidebarState.lastLeftSidebarWidth,
84
+ hasInit = leftSidebarState.hasInit;
83
85
  var isLocked = flyoutLockCount > 0;
84
86
  var isLockedRef = (0, _react.useRef)(isLocked);
85
87
  var mouseXRef = (0, _react.useRef)(0);
@@ -144,7 +146,8 @@ var LeftSidebar = function LeftSidebar(props) {
144
146
  leftSidebarWidth: leftSidebarWidth,
145
147
  lastLeftSidebarWidth: lastLeftSidebarWidth,
146
148
  flyoutLockCount: 0,
147
- isFixed: isFixed
149
+ isFixed: isFixed,
150
+ hasInit: true
148
151
  });
149
152
  // eslint-disable-next-line react-hooks/exhaustive-deps
150
153
  }, []);
@@ -282,6 +285,9 @@ var LeftSidebar = function LeftSidebar(props) {
282
285
  onClose: closeMobileFlyout,
283
286
  isDisabled: !isFlyoutOpen
284
287
  });
288
+
289
+ // We use both the state and our effect-based ref to protect animation until initialized fully
290
+ var isReady = (0, _platformFeatureFlags.fg)('platform_dst_concurrent_left_sidebar_width') ? hasInit && notFirstRun.current : notFirstRun.current;
285
291
  return (0, _react2.jsx)(_react.Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) &&
286
292
  /**
287
293
  * On desktop, the `onClick` handlers controls the temporary flyout behavior.
@@ -304,7 +310,7 @@ var LeftSidebar = function LeftSidebar(props) {
304
310
  isFixed: isFixed
305
311
  }, (0, _react2.jsx)(_slotDimensions.default, {
306
312
  variableName: _constants.VAR_LEFT_SIDEBAR_WIDTH,
307
- value: notFirstRun.current ? leftSidebarWidth : leftSidebarWidthOnMount,
313
+ value: isReady ? leftSidebarWidth : leftSidebarWidthOnMount,
308
314
  mobileValue: _constants.MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH
309
315
  }), (0, _react2.jsx)(_leftSidebarInner.default, {
310
316
  isFixed: isFixed,
@@ -312,7 +318,7 @@ var LeftSidebar = function LeftSidebar(props) {
312
318
  }, (0, _react2.jsx)(_resizableChildrenWrapper.default, {
313
319
  isFlyoutOpen: isFlyoutOpen,
314
320
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
315
- hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed',
321
+ hasCollapsedState: !isReady && collapsedState === 'collapsed',
316
322
  testId: testId && "".concat(testId, "-resize-children-wrapper")
317
323
  }, children), (0, _react2.jsx)(_resizeControl.default, {
318
324
  testId: testId,
@@ -19,7 +19,8 @@ var leftSidebarState = {
19
19
  leftSidebarWidth: 0,
20
20
  lastLeftSidebarWidth: 0,
21
21
  flyoutLockCount: 0,
22
- isFixed: true
22
+ isFixed: true,
23
+ hasInit: false
23
24
  };
24
25
 
25
26
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -36,7 +36,8 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
36
36
  leftSidebarWidth: 0,
37
37
  lastLeftSidebarWidth: 0,
38
38
  flyoutLockCount: 0,
39
- isFixed: true
39
+ isFixed: true,
40
+ hasInit: false
40
41
  }),
41
42
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
42
43
  leftSidebarState = _useState2[0],
@@ -47,7 +48,8 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
47
48
  flyoutLockCount = leftSidebarState.flyoutLockCount,
48
49
  isFixed = leftSidebarState.isFixed,
49
50
  isLeftSidebarCollapsed = leftSidebarState.isLeftSidebarCollapsed,
50
- isFlyoutOpen = leftSidebarState.isFlyoutOpen;
51
+ isFlyoutOpen = leftSidebarState.isFlyoutOpen,
52
+ hasInit = leftSidebarState.hasInit;
51
53
 
52
54
  // We put the latest callbacks into a ref so we can always have the latest
53
55
  // functions in our transitionend listeners
@@ -81,7 +83,8 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
81
83
  lastLeftSidebarWidth: leftSidebarWidth,
82
84
  isFlyoutOpen: true,
83
85
  flyoutLockCount: 0,
84
- isFixed: isFixed
86
+ isFixed: isFixed,
87
+ hasInit: hasInit
85
88
  };
86
89
  setLeftSidebarState(flyoutOpenSidebarState);
87
90
 
@@ -106,7 +109,8 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
106
109
  lastLeftSidebarWidth: lastLeftSidebarWidth,
107
110
  isResizing: isResizing,
108
111
  flyoutLockCount: flyoutLockCount,
109
- isFixed: isFixed
112
+ isFixed: isFixed,
113
+ hasInit: hasInit
110
114
  };
111
115
  setLeftSidebarState(updatedLeftSidebarState);
112
116
  function finish() {
@@ -139,7 +143,7 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
139
143
  }
140
144
  };
141
145
  transition.current = value;
142
- }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, lastLeftSidebarWidth, flyoutLockCount, isFixed, leftSidebarWidth]);
146
+ }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, lastLeftSidebarWidth, flyoutLockCount, isFixed, leftSidebarWidth, hasInit]);
143
147
  var collapseLeftSidebar = (0, _react.useCallback)(function (event, collapseWithoutTransition) {
144
148
  var _transition$current6, _transition$current7;
145
149
  if (!isOpen) {
@@ -157,7 +161,8 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
157
161
  lastLeftSidebarWidth: lastLeftSidebarWidth,
158
162
  isFlyoutOpen: false,
159
163
  flyoutLockCount: 0,
160
- isFixed: isFixed
164
+ isFixed: isFixed,
165
+ hasInit: hasInit
161
166
  };
162
167
  setLeftSidebarState(flyoutCloseSidebarState);
163
168
 
@@ -185,7 +190,8 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
185
190
  lastLeftSidebarWidth: leftSidebarWidth,
186
191
  isResizing: isResizing,
187
192
  flyoutLockCount: flyoutLockCount,
188
- isFixed: isFixed
193
+ isFixed: isFixed,
194
+ hasInit: hasInit
189
195
  };
190
196
  setLeftSidebarState(updatedLeftSidebarState);
191
197
  function finish() {
@@ -219,7 +225,7 @@ var SidebarResizeController = exports.SidebarResizeController = function Sidebar
219
225
  }
220
226
  };
221
227
  transition.current = value;
222
- }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, leftSidebarWidth, flyoutLockCount, isFixed, lastLeftSidebarWidth]);
228
+ }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, leftSidebarWidth, flyoutLockCount, isFixed, lastLeftSidebarWidth, hasInit]);
223
229
 
224
230
  /**
225
231
  * Conditionally toggle the expanding or collapsing the sidebars.
@@ -9,6 +9,7 @@ import { Fragment, useCallback, useContext, useEffect, useRef } from 'react';
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import useCloseOnEscapePress from '@atlaskit/ds-lib/use-close-on-escape-press';
11
11
  import { easeOut } from '@atlaskit/motion';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/responsive';
13
14
  import { N100A } from '@atlaskit/theme/colors';
14
15
  import { COLLAPSED_LEFT_SIDEBAR_WIDTH, DEFAULT_LEFT_SIDEBAR_WIDTH, FLYOUT_DELAY, MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH, RESIZE_BUTTON_SELECTOR, TRANSITION_DURATION, VAR_LEFT_SIDEBAR_FLYOUT, VAR_LEFT_SIDEBAR_WIDTH } from '../../common/constants';
@@ -76,7 +77,8 @@ const LeftSidebar = props => {
76
77
  flyoutLockCount,
77
78
  isLeftSidebarCollapsed,
78
79
  leftSidebarWidth,
79
- lastLeftSidebarWidth
80
+ lastLeftSidebarWidth,
81
+ hasInit
80
82
  } = leftSidebarState;
81
83
  const isLocked = flyoutLockCount > 0;
82
84
  const isLockedRef = useRef(isLocked);
@@ -141,7 +143,8 @@ const LeftSidebar = props => {
141
143
  leftSidebarWidth,
142
144
  lastLeftSidebarWidth,
143
145
  flyoutLockCount: 0,
144
- isFixed
146
+ isFixed,
147
+ hasInit: true
145
148
  });
146
149
  // eslint-disable-next-line react-hooks/exhaustive-deps
147
150
  }, []);
@@ -283,6 +286,9 @@ const LeftSidebar = props => {
283
286
  onClose: closeMobileFlyout,
284
287
  isDisabled: !isFlyoutOpen
285
288
  });
289
+
290
+ // We use both the state and our effect-based ref to protect animation until initialized fully
291
+ const isReady = fg('platform_dst_concurrent_left_sidebar_width') ? hasInit && notFirstRun.current : notFirstRun.current;
286
292
  return jsx(Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) &&
287
293
  /**
288
294
  * On desktop, the `onClick` handlers controls the temporary flyout behavior.
@@ -305,7 +311,7 @@ const LeftSidebar = props => {
305
311
  isFixed: isFixed
306
312
  }, jsx(SlotDimensions, {
307
313
  variableName: VAR_LEFT_SIDEBAR_WIDTH,
308
- value: notFirstRun.current ? leftSidebarWidth : leftSidebarWidthOnMount,
314
+ value: isReady ? leftSidebarWidth : leftSidebarWidthOnMount,
309
315
  mobileValue: MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH
310
316
  }), jsx(LeftSidebarInner, {
311
317
  isFixed: isFixed,
@@ -313,7 +319,7 @@ const LeftSidebar = props => {
313
319
  }, jsx(ResizableChildrenWrapper, {
314
320
  isFlyoutOpen: isFlyoutOpen,
315
321
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
316
- hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed',
322
+ hasCollapsedState: !isReady && collapsedState === 'collapsed',
317
323
  testId: testId && `${testId}-resize-children-wrapper`
318
324
  }, children), jsx(ResizeControl, {
319
325
  testId: testId,
@@ -7,7 +7,8 @@ const leftSidebarState = {
7
7
  leftSidebarWidth: 0,
8
8
  lastLeftSidebarWidth: 0,
9
9
  flyoutLockCount: 0,
10
- isFixed: true
10
+ isFixed: true,
11
+ hasInit: false
11
12
  };
12
13
 
13
14
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -24,7 +24,8 @@ export const SidebarResizeController = ({
24
24
  leftSidebarWidth: 0,
25
25
  lastLeftSidebarWidth: 0,
26
26
  flyoutLockCount: 0,
27
- isFixed: true
27
+ isFixed: true,
28
+ hasInit: false
28
29
  });
29
30
  const {
30
31
  leftSidebarWidth,
@@ -33,7 +34,8 @@ export const SidebarResizeController = ({
33
34
  flyoutLockCount,
34
35
  isFixed,
35
36
  isLeftSidebarCollapsed,
36
- isFlyoutOpen
37
+ isFlyoutOpen,
38
+ hasInit
37
39
  } = leftSidebarState;
38
40
 
39
41
  // We put the latest callbacks into a ref so we can always have the latest
@@ -68,7 +70,8 @@ export const SidebarResizeController = ({
68
70
  lastLeftSidebarWidth: leftSidebarWidth,
69
71
  isFlyoutOpen: true,
70
72
  flyoutLockCount: 0,
71
- isFixed
73
+ isFixed,
74
+ hasInit
72
75
  };
73
76
  setLeftSidebarState(flyoutOpenSidebarState);
74
77
 
@@ -93,7 +96,8 @@ export const SidebarResizeController = ({
93
96
  lastLeftSidebarWidth,
94
97
  isResizing,
95
98
  flyoutLockCount,
96
- isFixed
99
+ isFixed,
100
+ hasInit
97
101
  };
98
102
  setLeftSidebarState(updatedLeftSidebarState);
99
103
  function finish() {
@@ -126,7 +130,7 @@ export const SidebarResizeController = ({
126
130
  }
127
131
  };
128
132
  transition.current = value;
129
- }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, lastLeftSidebarWidth, flyoutLockCount, isFixed, leftSidebarWidth]);
133
+ }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, lastLeftSidebarWidth, flyoutLockCount, isFixed, leftSidebarWidth, hasInit]);
130
134
  const collapseLeftSidebar = useCallback((event, collapseWithoutTransition) => {
131
135
  var _transition$current6, _transition$current7;
132
136
  if (!isOpen) {
@@ -144,7 +148,8 @@ export const SidebarResizeController = ({
144
148
  lastLeftSidebarWidth,
145
149
  isFlyoutOpen: false,
146
150
  flyoutLockCount: 0,
147
- isFixed
151
+ isFixed,
152
+ hasInit
148
153
  };
149
154
  setLeftSidebarState(flyoutCloseSidebarState);
150
155
 
@@ -172,7 +177,8 @@ export const SidebarResizeController = ({
172
177
  lastLeftSidebarWidth: leftSidebarWidth,
173
178
  isResizing,
174
179
  flyoutLockCount,
175
- isFixed
180
+ isFixed,
181
+ hasInit
176
182
  };
177
183
  setLeftSidebarState(updatedLeftSidebarState);
178
184
  function finish() {
@@ -206,7 +212,7 @@ export const SidebarResizeController = ({
206
212
  }
207
213
  };
208
214
  transition.current = value;
209
- }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, leftSidebarWidth, flyoutLockCount, isFixed, lastLeftSidebarWidth]);
215
+ }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, leftSidebarWidth, flyoutLockCount, isFixed, lastLeftSidebarWidth, hasInit]);
210
216
 
211
217
  /**
212
218
  * Conditionally toggle the expanding or collapsing the sidebars.
@@ -12,6 +12,7 @@ import { Fragment, useCallback, useContext, useEffect, useRef } from 'react';
12
12
  import { css, jsx } from '@emotion/react';
13
13
  import useCloseOnEscapePress from '@atlaskit/ds-lib/use-close-on-escape-press';
14
14
  import { easeOut } from '@atlaskit/motion';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/responsive';
16
17
  import { N100A } from '@atlaskit/theme/colors';
17
18
  import { COLLAPSED_LEFT_SIDEBAR_WIDTH, DEFAULT_LEFT_SIDEBAR_WIDTH, FLYOUT_DELAY, MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH, RESIZE_BUTTON_SELECTOR, TRANSITION_DURATION, VAR_LEFT_SIDEBAR_FLYOUT, VAR_LEFT_SIDEBAR_WIDTH } from '../../common/constants';
@@ -76,7 +77,8 @@ var LeftSidebar = function LeftSidebar(props) {
76
77
  flyoutLockCount = leftSidebarState.flyoutLockCount,
77
78
  isLeftSidebarCollapsed = leftSidebarState.isLeftSidebarCollapsed,
78
79
  leftSidebarWidth = leftSidebarState.leftSidebarWidth,
79
- lastLeftSidebarWidth = leftSidebarState.lastLeftSidebarWidth;
80
+ lastLeftSidebarWidth = leftSidebarState.lastLeftSidebarWidth,
81
+ hasInit = leftSidebarState.hasInit;
80
82
  var isLocked = flyoutLockCount > 0;
81
83
  var isLockedRef = useRef(isLocked);
82
84
  var mouseXRef = useRef(0);
@@ -141,7 +143,8 @@ var LeftSidebar = function LeftSidebar(props) {
141
143
  leftSidebarWidth: leftSidebarWidth,
142
144
  lastLeftSidebarWidth: lastLeftSidebarWidth,
143
145
  flyoutLockCount: 0,
144
- isFixed: isFixed
146
+ isFixed: isFixed,
147
+ hasInit: true
145
148
  });
146
149
  // eslint-disable-next-line react-hooks/exhaustive-deps
147
150
  }, []);
@@ -279,6 +282,9 @@ var LeftSidebar = function LeftSidebar(props) {
279
282
  onClose: closeMobileFlyout,
280
283
  isDisabled: !isFlyoutOpen
281
284
  });
285
+
286
+ // We use both the state and our effect-based ref to protect animation until initialized fully
287
+ var isReady = fg('platform_dst_concurrent_left_sidebar_width') ? hasInit && notFirstRun.current : notFirstRun.current;
282
288
  return jsx(Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) &&
283
289
  /**
284
290
  * On desktop, the `onClick` handlers controls the temporary flyout behavior.
@@ -301,7 +307,7 @@ var LeftSidebar = function LeftSidebar(props) {
301
307
  isFixed: isFixed
302
308
  }, jsx(SlotDimensions, {
303
309
  variableName: VAR_LEFT_SIDEBAR_WIDTH,
304
- value: notFirstRun.current ? leftSidebarWidth : leftSidebarWidthOnMount,
310
+ value: isReady ? leftSidebarWidth : leftSidebarWidthOnMount,
305
311
  mobileValue: MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH
306
312
  }), jsx(LeftSidebarInner, {
307
313
  isFixed: isFixed,
@@ -309,7 +315,7 @@ var LeftSidebar = function LeftSidebar(props) {
309
315
  }, jsx(ResizableChildrenWrapper, {
310
316
  isFlyoutOpen: isFlyoutOpen,
311
317
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
312
- hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed',
318
+ hasCollapsedState: !isReady && collapsedState === 'collapsed',
313
319
  testId: testId && "".concat(testId, "-resize-children-wrapper")
314
320
  }, children), jsx(ResizeControl, {
315
321
  testId: testId,
@@ -12,7 +12,8 @@ var leftSidebarState = {
12
12
  leftSidebarWidth: 0,
13
13
  lastLeftSidebarWidth: 0,
14
14
  flyoutLockCount: 0,
15
- isFixed: true
15
+ isFixed: true,
16
+ hasInit: false
16
17
  };
17
18
 
18
19
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -26,7 +26,8 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
26
26
  leftSidebarWidth: 0,
27
27
  lastLeftSidebarWidth: 0,
28
28
  flyoutLockCount: 0,
29
- isFixed: true
29
+ isFixed: true,
30
+ hasInit: false
30
31
  }),
31
32
  _useState2 = _slicedToArray(_useState, 2),
32
33
  leftSidebarState = _useState2[0],
@@ -37,7 +38,8 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
37
38
  flyoutLockCount = leftSidebarState.flyoutLockCount,
38
39
  isFixed = leftSidebarState.isFixed,
39
40
  isLeftSidebarCollapsed = leftSidebarState.isLeftSidebarCollapsed,
40
- isFlyoutOpen = leftSidebarState.isFlyoutOpen;
41
+ isFlyoutOpen = leftSidebarState.isFlyoutOpen,
42
+ hasInit = leftSidebarState.hasInit;
41
43
 
42
44
  // We put the latest callbacks into a ref so we can always have the latest
43
45
  // functions in our transitionend listeners
@@ -71,7 +73,8 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
71
73
  lastLeftSidebarWidth: leftSidebarWidth,
72
74
  isFlyoutOpen: true,
73
75
  flyoutLockCount: 0,
74
- isFixed: isFixed
76
+ isFixed: isFixed,
77
+ hasInit: hasInit
75
78
  };
76
79
  setLeftSidebarState(flyoutOpenSidebarState);
77
80
 
@@ -96,7 +99,8 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
96
99
  lastLeftSidebarWidth: lastLeftSidebarWidth,
97
100
  isResizing: isResizing,
98
101
  flyoutLockCount: flyoutLockCount,
99
- isFixed: isFixed
102
+ isFixed: isFixed,
103
+ hasInit: hasInit
100
104
  };
101
105
  setLeftSidebarState(updatedLeftSidebarState);
102
106
  function finish() {
@@ -129,7 +133,7 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
129
133
  }
130
134
  };
131
135
  transition.current = value;
132
- }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, lastLeftSidebarWidth, flyoutLockCount, isFixed, leftSidebarWidth]);
136
+ }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, lastLeftSidebarWidth, flyoutLockCount, isFixed, leftSidebarWidth, hasInit]);
133
137
  var collapseLeftSidebar = useCallback(function (event, collapseWithoutTransition) {
134
138
  var _transition$current6, _transition$current7;
135
139
  if (!isOpen) {
@@ -147,7 +151,8 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
147
151
  lastLeftSidebarWidth: lastLeftSidebarWidth,
148
152
  isFlyoutOpen: false,
149
153
  flyoutLockCount: 0,
150
- isFixed: isFixed
154
+ isFixed: isFixed,
155
+ hasInit: hasInit
151
156
  };
152
157
  setLeftSidebarState(flyoutCloseSidebarState);
153
158
 
@@ -175,7 +180,8 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
175
180
  lastLeftSidebarWidth: leftSidebarWidth,
176
181
  isResizing: isResizing,
177
182
  flyoutLockCount: flyoutLockCount,
178
- isFixed: isFixed
183
+ isFixed: isFixed,
184
+ hasInit: hasInit
179
185
  };
180
186
  setLeftSidebarState(updatedLeftSidebarState);
181
187
  function finish() {
@@ -209,7 +215,7 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
209
215
  }
210
216
  };
211
217
  transition.current = value;
212
- }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, leftSidebarWidth, flyoutLockCount, isFixed, lastLeftSidebarWidth]);
218
+ }, [isOpen, mobileMediaQuery, isResizing, isLeftSidebarCollapsed, leftSidebarWidth, flyoutLockCount, isFixed, lastLeftSidebarWidth, hasInit]);
213
219
 
214
220
  /**
215
221
  * Conditionally toggle the expanding or collapsing the sidebars.
@@ -7,6 +7,7 @@ export type LeftSidebarState = {
7
7
  lastLeftSidebarWidth: number;
8
8
  flyoutLockCount: number;
9
9
  isFixed: boolean;
10
+ hasInit: boolean;
10
11
  };
11
12
  export type SidebarResizeContextValue = {
12
13
  isLeftSidebarCollapsed: boolean;
@@ -7,6 +7,7 @@ export type LeftSidebarState = {
7
7
  lastLeftSidebarWidth: number;
8
8
  flyoutLockCount: number;
9
9
  isFixed: boolean;
10
+ hasInit: boolean;
10
11
  };
11
12
  export type SidebarResizeContextValue = {
12
13
  isLeftSidebarCollapsed: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "3.11.5",
3
+ "version": "3.11.7",
4
4
  "description": "A collection of components which let you compose an application's page layout.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,12 +42,13 @@
42
42
  "homepage": "https://atlassian.design/components/page-layout/",
43
43
  "dependencies": {
44
44
  "@atlaskit/ds-lib": "^3.3.0",
45
- "@atlaskit/icon": "^23.1.0",
45
+ "@atlaskit/icon": "^23.4.0",
46
46
  "@atlaskit/link": "^2.0.0",
47
47
  "@atlaskit/motion": "^1.9.0",
48
+ "@atlaskit/platform-feature-flags": "^0.3.0",
48
49
  "@atlaskit/primitives": "^13.3.0",
49
50
  "@atlaskit/theme": "^14.0.0",
50
- "@atlaskit/tokens": "^2.5.0",
51
+ "@atlaskit/tokens": "^3.1.0",
51
52
  "@babel/runtime": "^7.0.0",
52
53
  "@emotion/react": "^11.7.1",
53
54
  "bind-event-listener": "^3.0.0",
@@ -62,7 +63,7 @@
62
63
  "@af/integration-testing": "*",
63
64
  "@atlaskit/atlassian-navigation": "^4.10.0",
64
65
  "@atlaskit/atlassian-notifications": "^0.5.0",
65
- "@atlaskit/drawer": "^9.2.0",
66
+ "@atlaskit/drawer": "^9.3.0",
66
67
  "@atlaskit/logo": "^15.1.0",
67
68
  "@atlaskit/menu": "^2.13.0",
68
69
  "@atlaskit/notification-indicator": "^9.4.0",
@@ -85,6 +86,9 @@
85
86
  "platform-feature-flags": {
86
87
  "platform_dst_popup-disable-focuslock": {
87
88
  "type": "boolean"
89
+ },
90
+ "platform_dst_concurrent_left_sidebar_width": {
91
+ "type": "boolean"
88
92
  }
89
93
  },
90
94
  "keywords": [