@atlaskit/navigation-system 11.7.7 → 11.7.9

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,19 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 11.7.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7b64c4a16f148`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b64c4a16f148) -
8
+ Prevent controlled PanelLayout widths from briefly reverting to an obsolete width when a resize
9
+ completes. Preserve consumer overrides and existing caller feature gates.
10
+
11
+ ## 11.7.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 11.7.7
4
18
 
5
19
  ### Patch Changes
@@ -37,6 +37,7 @@ function useStableAreaState(state) {
37
37
  }, [mode, width, minWidth]);
38
38
  }
39
39
  function LayoutAreaSizingRuntime(_ref2) {
40
+ var _areas$panel2;
40
41
  var children = _ref2.children,
41
42
  layoutRef = _ref2.layoutRef,
42
43
  onReady = _ref2.onReady,
@@ -455,18 +456,25 @@ function LayoutAreaSizingRuntime(_ref2) {
455
456
  };
456
457
  }, [onReady, value]);
457
458
  (0, _react.useEffect)(function () {
459
+ var _configsRef$current$p, _areas$panel;
458
460
  if (!adoptedConstraints.current && (sideNavState || panelState || chatPanelState)) {
459
461
  adoptedConstraints.current = {
460
462
  occupiedWidth: occupiedWidth,
461
463
  mainMinWidth: mainMinWidth
462
464
  };
463
465
  }
466
+ // A controlled panel can acknowledge a resize in this same commit. Its
467
+ // registration queues the new allocation before this effect runs; avoid
468
+ // publishing an allocation calculated from the previous requested width.
469
+ if (((_configsRef$current$p = configsRef.current.panel) === null || _configsRef$current$p === void 0 ? void 0 : _configsRef$current$p.requestedWidth) !== ((_areas$panel = areas.panel) === null || _areas$panel === void 0 ? void 0 : _areas$panel.requestedWidth)) {
470
+ return;
471
+ }
464
472
  onUpdate === null || onUpdate === void 0 || onUpdate({
465
473
  'side-nav': sideNavState,
466
474
  panel: panelState,
467
475
  'chat-panel': chatPanelState
468
476
  });
469
- }, [onUpdate, sideNavState, panelState, chatPanelState, occupiedWidth, mainMinWidth]);
477
+ }, [onUpdate, sideNavState, panelState, chatPanelState, occupiedWidth, mainMinWidth, (_areas$panel2 = areas.panel) === null || _areas$panel2 === void 0 ? void 0 : _areas$panel2.requestedWidth]);
470
478
  return /*#__PURE__*/_react.default.createElement(_layoutAreaSizingContext.LayoutAreaSizingContext.Provider, {
471
479
  value: value
472
480
  }, /*#__PURE__*/_react.default.createElement(SideNavStateProvider, {
@@ -25,6 +25,7 @@ export function LayoutAreaSizingRuntime({
25
25
  onReady,
26
26
  onUpdate
27
27
  }) {
28
+ var _areas$panel2;
28
29
  const occupiedWidth = useOccupiedLayoutWidth(layoutRef);
29
30
  const [dimensions, setDimensions] = useState(null);
30
31
  const [mainMinWidth, setMainMinWidth] = useState(defaultMainMinWidth);
@@ -410,18 +411,25 @@ export function LayoutAreaSizingRuntime({
410
411
  return () => onReady === null || onReady === void 0 ? void 0 : onReady(null);
411
412
  }, [onReady, value]);
412
413
  useEffect(() => {
414
+ var _configsRef$current$p, _areas$panel;
413
415
  if (!adoptedConstraints.current && (sideNavState || panelState || chatPanelState)) {
414
416
  adoptedConstraints.current = {
415
417
  occupiedWidth,
416
418
  mainMinWidth
417
419
  };
418
420
  }
421
+ // A controlled panel can acknowledge a resize in this same commit. Its
422
+ // registration queues the new allocation before this effect runs; avoid
423
+ // publishing an allocation calculated from the previous requested width.
424
+ if (((_configsRef$current$p = configsRef.current.panel) === null || _configsRef$current$p === void 0 ? void 0 : _configsRef$current$p.requestedWidth) !== ((_areas$panel = areas.panel) === null || _areas$panel === void 0 ? void 0 : _areas$panel.requestedWidth)) {
425
+ return;
426
+ }
419
427
  onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate({
420
428
  'side-nav': sideNavState,
421
429
  panel: panelState,
422
430
  'chat-panel': chatPanelState
423
431
  });
424
- }, [onUpdate, sideNavState, panelState, chatPanelState, occupiedWidth, mainMinWidth]);
432
+ }, [onUpdate, sideNavState, panelState, chatPanelState, occupiedWidth, mainMinWidth, (_areas$panel2 = areas.panel) === null || _areas$panel2 === void 0 ? void 0 : _areas$panel2.requestedWidth]);
425
433
  return /*#__PURE__*/React.createElement(LayoutAreaSizingContext.Provider, {
426
434
  value: value
427
435
  }, /*#__PURE__*/React.createElement(SideNavStateProvider, {
@@ -28,6 +28,7 @@ function useStableAreaState(state) {
28
28
  }, [mode, width, minWidth]);
29
29
  }
30
30
  export function LayoutAreaSizingRuntime(_ref2) {
31
+ var _areas$panel2;
31
32
  var children = _ref2.children,
32
33
  layoutRef = _ref2.layoutRef,
33
34
  onReady = _ref2.onReady,
@@ -446,18 +447,25 @@ export function LayoutAreaSizingRuntime(_ref2) {
446
447
  };
447
448
  }, [onReady, value]);
448
449
  useEffect(function () {
450
+ var _configsRef$current$p, _areas$panel;
449
451
  if (!adoptedConstraints.current && (sideNavState || panelState || chatPanelState)) {
450
452
  adoptedConstraints.current = {
451
453
  occupiedWidth: occupiedWidth,
452
454
  mainMinWidth: mainMinWidth
453
455
  };
454
456
  }
457
+ // A controlled panel can acknowledge a resize in this same commit. Its
458
+ // registration queues the new allocation before this effect runs; avoid
459
+ // publishing an allocation calculated from the previous requested width.
460
+ if (((_configsRef$current$p = configsRef.current.panel) === null || _configsRef$current$p === void 0 ? void 0 : _configsRef$current$p.requestedWidth) !== ((_areas$panel = areas.panel) === null || _areas$panel === void 0 ? void 0 : _areas$panel.requestedWidth)) {
461
+ return;
462
+ }
455
463
  onUpdate === null || onUpdate === void 0 || onUpdate({
456
464
  'side-nav': sideNavState,
457
465
  panel: panelState,
458
466
  'chat-panel': chatPanelState
459
467
  });
460
- }, [onUpdate, sideNavState, panelState, chatPanelState, occupiedWidth, mainMinWidth]);
468
+ }, [onUpdate, sideNavState, panelState, chatPanelState, occupiedWidth, mainMinWidth, (_areas$panel2 = areas.panel) === null || _areas$panel2 === void 0 ? void 0 : _areas$panel2.requestedWidth]);
461
469
  return /*#__PURE__*/React.createElement(LayoutAreaSizingContext.Provider, {
462
470
  value: value
463
471
  }, /*#__PURE__*/React.createElement(SideNavStateProvider, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "11.7.7",
3
+ "version": "11.7.9",
4
4
  "description": "The latest navigation system for Atlassian apps.",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
6
6
  "license": "Apache-2.0",
@@ -76,7 +76,7 @@
76
76
  "@atlaskit/side-nav-items": "^2.6.0",
77
77
  "@atlaskit/tokens": "^20.12.0",
78
78
  "@atlaskit/tooltip": "^24.4.0",
79
- "@atlaskit/top-layer": "^7.2.0",
79
+ "@atlaskit/top-layer": "^8.0.0",
80
80
  "@atlaskit/visually-hidden": "^4.4.0",
81
81
  "@babel/runtime": "^7.0.0",
82
82
  "@compiled/react": "^1.0.2",
@@ -126,15 +126,15 @@
126
126
  "@atlaskit/textfield": "^10.3.0",
127
127
  "@atlassian/feature-flags-test-utils": "^1.3.0",
128
128
  "@atlassian/gemini": "^1.55.0",
129
- "@atlassian/panel-system": "^2.0.0",
129
+ "@atlassian/panel-system": "^2.2.0",
130
130
  "@atlassian/react-async": "^0.23.0",
131
131
  "@atlassian/react-entrypoint": "^1.1.0",
132
132
  "@atlassian/relay-test-utils": "workspace:^",
133
- "@atlassian/search-dialog": "^10.36.0",
133
+ "@atlassian/search-dialog": "^10.39.0",
134
134
  "@atlassian/ssr-tests": "workspace:^",
135
135
  "@atlassian/test-utils": "^1.1.0",
136
136
  "@atlassian/testing-library": "^0.12.0",
137
- "@atlassian/universal-create": "^8.7.0",
137
+ "@atlassian/universal-create": "^8.8.0",
138
138
  "@atlassian/workbench": "workspace:^",
139
139
  "@axe-core/playwright": "^4.11.1",
140
140
  "raf-stub": "^2.0.1",