@atlaskit/editor-toolbar 2.6.40 → 2.6.42

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
  # @atlaskit/editor-toolbar
2
2
 
3
+ ## 2.6.42
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3dd0c115a3c95`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3dd0c115a3c95) -
8
+ Gate absolute positioning of inline toolbar dropdowns behind
9
+ platform_editor_return_focus_after_text_styles_2.
10
+
11
+ ## 2.6.41
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 2.6.40
4
18
 
5
19
  ### Patch Changes
@@ -296,7 +310,7 @@
296
310
  The Text styles dropdown now renders inline via `shouldRenderToParent`, which stops the popup
297
311
  focus-trap from returning focus to the trigger on close. `ToolbarDropdownMenu` gains an opt-in
298
312
  `shouldRenderToParent` prop so only the Text styles menu is affected. Gated behind the
299
- `platform_editor_return_focus_after_text_styles` feature flag.
313
+ `platform_editor_return_focus_after_text_styles_2` feature flag.
300
314
 
301
315
  ## 2.4.17
302
316
 
@@ -12,6 +12,7 @@ var _runtime = require("@compiled/react/runtime");
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _react2 = require("@compiled/react");
14
14
  var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu/dropdown-menu"));
15
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
15
16
  var _compiled = require("@atlaskit/primitives/compiled");
16
17
  var _uiContext = require("../hooks/ui-context");
17
18
  var _ToolbarButton = require("./ToolbarButton");
@@ -81,7 +82,8 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
81
82
  },
82
83
  onOpenChange: handleOpenChange,
83
84
  isOpen: menuContext === null || menuContext === void 0 ? void 0 : menuContext.isOpen,
84
- shouldRenderToParent: shouldRenderToParent ? true : undefined
85
+ shouldRenderToParent: shouldRenderToParent ? true : undefined,
86
+ strategy: shouldRenderToParent && (0, _fg.fg)('platform_editor_return_focus_after_text_styles_2') ? 'absolute' : undefined
85
87
  }, children);
86
88
  };
87
89
  var ToolbarDropdownMenu = exports.ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref2) {
@@ -4,6 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
5
  import { cx } from '@compiled/react';
6
6
  import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
7
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
8
9
  import { useToolbarUI } from '../hooks/ui-context';
9
10
  import { ToolbarButton } from './ToolbarButton';
@@ -74,7 +75,8 @@ const ToolbarDropdownMenuContent = ({
74
75
  },
75
76
  onOpenChange: handleOpenChange,
76
77
  isOpen: menuContext === null || menuContext === void 0 ? void 0 : menuContext.isOpen,
77
- shouldRenderToParent: shouldRenderToParent ? true : undefined
78
+ shouldRenderToParent: shouldRenderToParent ? true : undefined,
79
+ strategy: shouldRenderToParent && fg('platform_editor_return_focus_after_text_styles_2') ? 'absolute' : undefined
78
80
  }, children);
79
81
  };
80
82
  export const ToolbarDropdownMenu = ({
@@ -4,6 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback } from 'react';
5
5
  import { cx } from '@compiled/react';
6
6
  import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
7
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
8
9
  import { useToolbarUI } from '../hooks/ui-context';
9
10
  import { ToolbarButton } from './ToolbarButton';
@@ -72,7 +73,8 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
72
73
  },
73
74
  onOpenChange: handleOpenChange,
74
75
  isOpen: menuContext === null || menuContext === void 0 ? void 0 : menuContext.isOpen,
75
- shouldRenderToParent: shouldRenderToParent ? true : undefined
76
+ shouldRenderToParent: shouldRenderToParent ? true : undefined,
77
+ strategy: shouldRenderToParent && fg('platform_editor_return_focus_after_text_styles_2') ? 'absolute' : undefined
76
78
  }, children);
77
79
  };
78
80
  export var ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref2) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org/"
5
5
  },
6
- "version": "2.6.40",
6
+ "version": "2.6.42",
7
7
  "description": "Common UI for Toolbars across the platform",
8
8
  "atlassian": {
9
9
  "react-compiler": {
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/popup": "^6.3.0",
41
41
  "@atlaskit/primitives": "^22.5.0",
42
42
  "@atlaskit/react-compiler-gating": "^0.2.0",
43
- "@atlaskit/tmp-editor-statsig": "^196.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^197.0.0",
44
44
  "@atlaskit/tokens": "^17.0.0",
45
45
  "@atlaskit/tooltip": "^24.3.0",
46
46
  "@babel/runtime": "^7.0.0",
@@ -65,6 +65,9 @@
65
65
  },
66
66
  "platform_editor_lovability_text_bg_color_patch_1": {
67
67
  "type": "boolean"
68
+ },
69
+ "platform_editor_return_focus_after_text_styles_2": {
70
+ "type": "boolean"
68
71
  }
69
72
  }
70
73
  }