@atlaskit/navigation-system 11.8.2 → 11.8.4

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,23 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 11.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b900d18f5dd93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b900d18f5dd93) -
8
+ Fix local panels to remember inline and overlay resize preferences separately when
9
+ platform-dst-chat-panel-layout is enabled. Preserve explicit controlled widths and prevent the
10
+ Panel System adapter from sharing uncontrolled resizes across modes.
11
+
12
+ Restore saved widths through the existing default-width API, matching ChatPanel. Restored widths
13
+ supply the starting defaults, including default-based overlay bounds.
14
+
15
+ ## 11.8.3
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 11.8.2
4
22
 
5
23
  ### Patch Changes
@@ -129,6 +129,15 @@ space can still compress the panel. Chat retains its 400px desktop default. Use
129
129
  captured on mount; controlled and user-resized widths take precedence. `LayoutWithPanel` also
130
130
  accepts `xlDefaultPanelWidth`, with saved provider widths taking precedence.
131
131
 
132
+ With chat layout enabled, user-resized inline and overlay widths are remembered separately. Resizing
133
+ an overlay does not replace the inline preference, or vice versa. Automatic compression does not
134
+ replace either preference. A controlled `panelWidth` takes precedence in both modes; `onResizeEnd`
135
+ includes the resized `mode` for callers that manage their own persistence.
136
+
137
+ To restore a saved width on mount, pass it as `defaultPanelWidth`, like ChatPanel’s `defaultWidth`.
138
+ It becomes the starting default, including for default-based overlay bounds. `LayoutWithPanel`
139
+ restores its saved provider width this way. Subsequent resizes remain independent in each mode.
140
+
132
141
  `PanelLayout` contains the layout and resizing responsibilities extracted from
133
142
  `@atlassian/panel-system`. That package's `LayoutWithPanel` remains an adapter that connects panel
134
143
  state and routed content to `PanelLayout`.
@@ -29,7 +29,7 @@ function getTargetWidth(area, isSideNavOverlay, isXlViewport) {
29
29
  function getOverlayTargetWidth(area, isSideNavOverlay, isXlViewport, areaName) {
30
30
  var _area$liveResize2, _ref3, _area$requestedWidth2;
31
31
  var defaultWidth = getDefaultWidth(area, isSideNavOverlay, isXlViewport);
32
- return ((_area$liveResize2 = area.liveResize) === null || _area$liveResize2 === void 0 ? void 0 : _area$liveResize2.mode) === 'overlay' ? area.liveResize.width : (_ref3 = (_area$requestedWidth2 = area.requestedWidth) !== null && _area$requestedWidth2 !== void 0 ? _area$requestedWidth2 : areaName === 'panel' ? area.preferredWidth : area.preferredOverlayWidth) !== null && _ref3 !== void 0 ? _ref3 : defaultWidth;
32
+ return ((_area$liveResize2 = area.liveResize) === null || _area$liveResize2 === void 0 ? void 0 : _area$liveResize2.mode) === 'overlay' ? area.liveResize.width : (_ref3 = (_area$requestedWidth2 = area.requestedWidth) !== null && _area$requestedWidth2 !== void 0 ? _area$requestedWidth2 : areaName === 'panel' && !(0, _fg.fg)('platform-dst-chat-panel-layout') ? area.preferredWidth : area.preferredOverlayWidth) !== null && _ref3 !== void 0 ? _ref3 : defaultWidth;
33
33
  }
34
34
  function calculateLayoutAreaStates(_ref4) {
35
35
  var _ref5, _resizeSession$overla, _baselineWidths$chat, _panel$liveResize, _states$sideNav$widt, _states$sideNav, _states$chatPanel$wi, _states$chatPanel;
@@ -337,7 +337,7 @@ function LayoutAreaSizingRuntime(_ref2) {
337
337
  if (!existing) {
338
338
  return current;
339
339
  }
340
- if (mode === 'overlay' && area !== 'panel') {
340
+ if (mode === 'overlay' && (area !== 'panel' || (0, _fg.fg)('platform-dst-chat-panel-layout'))) {
341
341
  return _objectSpread(_objectSpread({}, current), {}, (0, _defineProperty2.default)({}, area, _objectSpread(_objectSpread({}, existing), {}, {
342
342
  liveResize: undefined,
343
343
  preferredOverlayWidth: width
@@ -345,7 +345,7 @@ function LayoutAreaSizingRuntime(_ref2) {
345
345
  }
346
346
  return _objectSpread(_objectSpread({}, current), {}, (0, _defineProperty2.default)({}, area, _objectSpread(_objectSpread({}, existing), {}, {
347
347
  liveResize: undefined,
348
- // Local panels have one preference, regardless of the resized mode.
348
+ // Gate-off local panels retain their shared preference.
349
349
  preferredWidth: width
350
350
  })));
351
351
  });
@@ -19,7 +19,7 @@ function getTargetWidth(area, isSideNavOverlay, isXlViewport) {
19
19
  function getOverlayTargetWidth(area, isSideNavOverlay, isXlViewport, areaName) {
20
20
  var _area$liveResize2, _ref2, _area$requestedWidth2;
21
21
  const defaultWidth = getDefaultWidth(area, isSideNavOverlay, isXlViewport);
22
- return ((_area$liveResize2 = area.liveResize) === null || _area$liveResize2 === void 0 ? void 0 : _area$liveResize2.mode) === 'overlay' ? area.liveResize.width : (_ref2 = (_area$requestedWidth2 = area.requestedWidth) !== null && _area$requestedWidth2 !== void 0 ? _area$requestedWidth2 : areaName === 'panel' ? area.preferredWidth : area.preferredOverlayWidth) !== null && _ref2 !== void 0 ? _ref2 : defaultWidth;
22
+ return ((_area$liveResize2 = area.liveResize) === null || _area$liveResize2 === void 0 ? void 0 : _area$liveResize2.mode) === 'overlay' ? area.liveResize.width : (_ref2 = (_area$requestedWidth2 = area.requestedWidth) !== null && _area$requestedWidth2 !== void 0 ? _area$requestedWidth2 : areaName === 'panel' && !fg('platform-dst-chat-panel-layout') ? area.preferredWidth : area.preferredOverlayWidth) !== null && _ref2 !== void 0 ? _ref2 : defaultWidth;
23
23
  }
24
24
  export function calculateLayoutAreaStates({
25
25
  viewportWidth,
@@ -300,7 +300,7 @@ export function LayoutAreaSizingRuntime({
300
300
  if (!existing) {
301
301
  return current;
302
302
  }
303
- if (mode === 'overlay' && area !== 'panel') {
303
+ if (mode === 'overlay' && (area !== 'panel' || fg('platform-dst-chat-panel-layout'))) {
304
304
  return {
305
305
  ...current,
306
306
  [area]: {
@@ -315,7 +315,7 @@ export function LayoutAreaSizingRuntime({
315
315
  [area]: {
316
316
  ...existing,
317
317
  liveResize: undefined,
318
- // Local panels have one preference, regardless of the resized mode.
318
+ // Gate-off local panels retain their shared preference.
319
319
  preferredWidth: width
320
320
  }
321
321
  };
@@ -22,7 +22,7 @@ function getTargetWidth(area, isSideNavOverlay, isXlViewport) {
22
22
  function getOverlayTargetWidth(area, isSideNavOverlay, isXlViewport, areaName) {
23
23
  var _area$liveResize2, _ref3, _area$requestedWidth2;
24
24
  var defaultWidth = getDefaultWidth(area, isSideNavOverlay, isXlViewport);
25
- return ((_area$liveResize2 = area.liveResize) === null || _area$liveResize2 === void 0 ? void 0 : _area$liveResize2.mode) === 'overlay' ? area.liveResize.width : (_ref3 = (_area$requestedWidth2 = area.requestedWidth) !== null && _area$requestedWidth2 !== void 0 ? _area$requestedWidth2 : areaName === 'panel' ? area.preferredWidth : area.preferredOverlayWidth) !== null && _ref3 !== void 0 ? _ref3 : defaultWidth;
25
+ return ((_area$liveResize2 = area.liveResize) === null || _area$liveResize2 === void 0 ? void 0 : _area$liveResize2.mode) === 'overlay' ? area.liveResize.width : (_ref3 = (_area$requestedWidth2 = area.requestedWidth) !== null && _area$requestedWidth2 !== void 0 ? _area$requestedWidth2 : areaName === 'panel' && !fg('platform-dst-chat-panel-layout') ? area.preferredWidth : area.preferredOverlayWidth) !== null && _ref3 !== void 0 ? _ref3 : defaultWidth;
26
26
  }
27
27
  export function calculateLayoutAreaStates(_ref4) {
28
28
  var _ref5, _resizeSession$overla, _baselineWidths$chat, _panel$liveResize, _states$sideNav$widt, _states$sideNav, _states$chatPanel$wi, _states$chatPanel;
@@ -328,7 +328,7 @@ export function LayoutAreaSizingRuntime(_ref2) {
328
328
  if (!existing) {
329
329
  return current;
330
330
  }
331
- if (mode === 'overlay' && area !== 'panel') {
331
+ if (mode === 'overlay' && (area !== 'panel' || fg('platform-dst-chat-panel-layout'))) {
332
332
  return _objectSpread(_objectSpread({}, current), {}, _defineProperty({}, area, _objectSpread(_objectSpread({}, existing), {}, {
333
333
  liveResize: undefined,
334
334
  preferredOverlayWidth: width
@@ -336,7 +336,7 @@ export function LayoutAreaSizingRuntime(_ref2) {
336
336
  }
337
337
  return _objectSpread(_objectSpread({}, current), {}, _defineProperty({}, area, _objectSpread(_objectSpread({}, existing), {}, {
338
338
  liveResize: undefined,
339
- // Local panels have one preference, regardless of the resized mode.
339
+ // Gate-off local panels retain their shared preference.
340
340
  preferredWidth: width
341
341
  })));
342
342
  });
@@ -18,8 +18,7 @@ export type LayoutAreaConfig = {
18
18
  };
19
19
  export type StoredLayoutArea = LayoutAreaConfig & {
20
20
  /**
21
- * Local panels share this preference across inline and overlay modes.
22
- * SideNav and ChatPanel retain separate overlay preferences.
21
+ * Preferred inline width. Local panels also use it for overlays when chat layout is disabled.
23
22
  */
24
23
  preferredWidth?: number;
25
24
  preferredOverlayWidth?: number;
@@ -20,20 +20,23 @@ export type PanelLayoutProps = {
20
20
  */
21
21
  panelKey?: Key;
22
22
  /**
23
- * Controlled preferred width in pixels. Allocation may constrain it without changing the request.
23
+ * Controlled preferred width in pixels, applied in both inline and overlay modes.
24
+ * Allocation may constrain it without changing the request.
24
25
  */
25
26
  panelWidth?: number;
26
27
  /**
27
28
  * Initial preferred width in pixels; subsequent changes are ignored.
28
29
  * Defaults to 365, or 400 with chat layout enabled (500 at XL and above).
30
+ * Pass a saved width here to restore it as the starting default.
29
31
  * An explicit value also supplies the compact and XL defaults unless separately overridden.
30
- * After a user resize, one preferred width is retained across inline and overlay modes.
32
+ * With chat layout enabled, user-resized inline and overlay widths are remembered separately.
33
+ * Without it, both modes retain one shared preference.
31
34
  * Available space can constrain the rendered width without overwriting that preference.
32
35
  */
33
36
  defaultPanelWidth?: number;
34
37
  /**
35
38
  * Default at compact viewport sizes. Defaults to 320, or an explicitly supplied defaultPanelWidth.
36
- * Used only until a controlled width or user resize supplies a preference.
39
+ * Used only until a controlled width or a user resize in the current mode supplies a preference.
37
40
  */
38
41
  compactDefaultPanelWidth?: number;
39
42
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "11.8.2",
3
+ "version": "11.8.4",
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",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/avatar": "^31.0.0",
63
63
  "@atlaskit/button": "^25.8.0",
64
64
  "@atlaskit/css": "^1.1.0",
65
- "@atlaskit/ds-lib": "^8.0.0",
65
+ "@atlaskit/ds-lib": "^9.0.0",
66
66
  "@atlaskit/icon": "^38.1.0",
67
67
  "@atlaskit/layering": "^6.1.0",
68
68
  "@atlaskit/logo": "^23.3.0",
@@ -71,10 +71,10 @@
71
71
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
72
72
  "@atlaskit/popup": "^10.2.0",
73
73
  "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
74
- "@atlaskit/primitives": "^22.7.0",
74
+ "@atlaskit/primitives": "^22.8.0",
75
75
  "@atlaskit/react-compiler-gating": "^0.2.0",
76
76
  "@atlaskit/side-nav-items": "^2.6.0",
77
- "@atlaskit/tokens": "^20.13.0",
77
+ "@atlaskit/tokens": "^20.14.0",
78
78
  "@atlaskit/tooltip": "^24.4.0",
79
79
  "@atlaskit/top-layer": "^8.1.0",
80
80
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -97,7 +97,7 @@
97
97
  "@atlaskit/banner": "^15.3.0",
98
98
  "@atlaskit/breadcrumbs": "^17.8.0",
99
99
  "@atlaskit/docs": "^12.3.0",
100
- "@atlaskit/dropdown-menu": "^21.3.0",
100
+ "@atlaskit/dropdown-menu": "^22.0.0",
101
101
  "@atlaskit/flag": "^19.0.0",
102
102
  "@atlaskit/form": "^18.3.0",
103
103
  "@atlaskit/heading": "^8.0.0",
@@ -122,7 +122,7 @@
122
122
  "@atlaskit/spotlight": "^4.2.0",
123
123
  "@atlaskit/tabs": "^21.3.0",
124
124
  "@atlaskit/tag": "^17.1.0",
125
- "@atlaskit/textarea": "^10.3.0",
125
+ "@atlaskit/textarea": "^11.0.0",
126
126
  "@atlaskit/textfield": "^11.0.0",
127
127
  "@atlassian/feature-flags-test-utils": "^2.0.0",
128
128
  "@atlassian/gemini": "^1.55.0",
@@ -130,7 +130,7 @@
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.39.0",
133
+ "@atlassian/search-dialog": "^10.40.0",
134
134
  "@atlassian/ssr-tests": "workspace:^",
135
135
  "@atlassian/test-utils": "^1.1.0",
136
136
  "@atlassian/testing-library": "^0.12.0",