@atlaskit/editor-plugin-block-controls 31.0.2 → 31.0.3

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/blockControlsPlugin.js +0 -1
  3. package/dist/cjs/pm-plugins/decorations-drag-handle.js +1 -4
  4. package/dist/cjs/pm-plugins/decorations-quick-insert-button.js +1 -4
  5. package/dist/cjs/pm-plugins/handle-mouse-over.js +2 -2
  6. package/dist/cjs/pm-plugins/interaction-tracking/handle-mouse-move.js +2 -2
  7. package/dist/cjs/pm-plugins/interaction-tracking/pm-plugin.js +0 -2
  8. package/dist/cjs/pm-plugins/main.js +3 -4
  9. package/dist/cjs/ui/block-controls-surface-drag-handle.js +1 -2
  10. package/dist/cjs/ui/drag-handle.js +1 -1
  11. package/dist/cjs/ui/visibility-container.js +0 -1
  12. package/dist/es2019/blockControlsPlugin.js +0 -1
  13. package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -4
  14. package/dist/es2019/pm-plugins/decorations-quick-insert-button.js +1 -4
  15. package/dist/es2019/pm-plugins/handle-mouse-over.js +2 -2
  16. package/dist/es2019/pm-plugins/interaction-tracking/handle-mouse-move.js +2 -2
  17. package/dist/es2019/pm-plugins/interaction-tracking/pm-plugin.js +0 -2
  18. package/dist/es2019/pm-plugins/main.js +3 -4
  19. package/dist/es2019/ui/block-controls-surface-drag-handle.js +1 -2
  20. package/dist/es2019/ui/drag-handle.js +1 -1
  21. package/dist/es2019/ui/visibility-container.js +0 -1
  22. package/dist/esm/blockControlsPlugin.js +0 -1
  23. package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -4
  24. package/dist/esm/pm-plugins/decorations-quick-insert-button.js +1 -4
  25. package/dist/esm/pm-plugins/handle-mouse-over.js +2 -2
  26. package/dist/esm/pm-plugins/interaction-tracking/handle-mouse-move.js +2 -2
  27. package/dist/esm/pm-plugins/interaction-tracking/pm-plugin.js +0 -2
  28. package/dist/esm/pm-plugins/main.js +3 -4
  29. package/dist/esm/ui/block-controls-surface-drag-handle.js +1 -2
  30. package/dist/esm/ui/drag-handle.js +1 -1
  31. package/dist/esm/ui/visibility-container.js +0 -1
  32. package/package.json +3 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 31.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`49c506ac95bb6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/49c506ac95bb6) -
8
+ Remove the fully rolled-out `confluence_remix_button_right_side_block_fg` gate; keep right-side
9
+ Remix controls enabled when their existing MAUI experiment and product configuration allow them.
10
+ - Updated dependencies
11
+
3
12
  ## 31.0.2
4
13
 
5
14
  ### Patch Changes
@@ -492,7 +492,6 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
492
492
  if ((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
493
493
  var _interactionTrackingP2, _interactionTrackingP3, _interactionTrackingP4;
494
494
  sharedState.isMouseOut = (_interactionTrackingP2 = (_interactionTrackingP3 = _pmPlugin.interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP3 === void 0 ? void 0 : _interactionTrackingP3.isMouseOut) !== null && _interactionTrackingP2 !== void 0 ? _interactionTrackingP2 : false;
495
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
496
495
  sharedState.rightSideControlsEnabled = rightSideControlsEnabled;
497
496
  sharedState.hoverSide = rightSideControlsEnabled ? (_interactionTrackingP4 = _pmPlugin.interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP4 === void 0 ? void 0 : _interactionTrackingP4.hoverSide : undefined;
498
497
  }
@@ -10,7 +10,6 @@ var _react = require("react");
10
10
  var _uuid = require("uuid");
11
11
  var _view = require("@atlaskit/editor-prosemirror/view");
12
12
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
13
- var _fg = require("@atlaskit/platform-feature-flags/fg");
14
13
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
15
14
  var _consts = require("../ui/consts");
16
15
  var _dragHandle = require("../ui/drag-handle");
@@ -94,9 +93,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
94
93
  var element = document.createElement('span');
95
94
  // inline decoration causes focus issues when refocusing Editor into first line
96
95
  element.style.display = 'block';
97
- if ((0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
98
- element.setAttribute('data-blocks-decorator-widget', 'true');
99
- }
96
+ element.setAttribute('data-blocks-decorator-widget', 'true');
100
97
  element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
101
98
  element.setAttribute('data-blocks-drag-handle-container', 'true');
102
99
  element.setAttribute('data-blocks-drag-handle-key', key);
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = require("react");
10
10
  var _uuid = require("uuid");
11
11
  var _view = require("@atlaskit/editor-prosemirror/view");
12
- var _fg = require("@atlaskit/platform-feature-flags/fg");
13
12
  var _consts = require("../ui/consts");
14
13
  var _quickInsertButton = require("../ui/quick-insert-button");
15
14
  var _marks = require("./utils/marks");
@@ -77,9 +76,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
77
76
  element.style.clear = 'unset';
78
77
  element.contentEditable = 'false';
79
78
  element.setAttribute('data-blocks-quick-insert-container', 'true');
80
- if ((0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
81
- element.setAttribute('data-blocks-quick-insert-button', 'true');
82
- }
79
+ element.setAttribute('data-blocks-quick-insert-button', 'true');
83
80
  element.setAttribute('data-testid', 'block-ctrl-quick-insert-button');
84
81
  nodeViewPortalProviderAPI.render(function () {
85
82
  return /*#__PURE__*/(0, _react.createElement)(_quickInsertButton.QuickInsertWithVisibility, {
@@ -122,7 +122,7 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
122
122
  // We shouldn't be firing mouse over transactions when the editor is disabled,
123
123
  // except in view mode when right-side controls are enabled (show controls on block hover)
124
124
  var rightSideControlsEnabled = (_api$blockControls$sh = api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || (_api$blockControls2 = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2 === void 0 ? void 0 : _api$blockControls2.rightSideControlsEnabled) !== null && _api$blockControls$sh !== void 0 ? _api$blockControls$sh : false;
125
- if (editorDisabled && (!isViewMode || !(rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')))) {
125
+ if (editorDisabled && (!isViewMode || !rightSideControlsEnabled)) {
126
126
  return false;
127
127
  }
128
128
 
@@ -161,7 +161,7 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
161
161
 
162
162
  // When hovering over the right-edge button (rendered in a portal outside the block), resolve the
163
163
  // block from the container's anchor so activeNode stays set and the button remains visible.
164
- if (!rootElement && rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
164
+ if (!rootElement && rightSideControlsEnabled) {
165
165
  var rightEdgeContainer = target === null || target === void 0 ? void 0 : target.closest('[data-blocks-right-edge-button-container]');
166
166
  if (rightEdgeContainer) {
167
167
  var anchor = rightEdgeContainer.getAttribute('data-blocks-right-edge-button-anchor');
@@ -97,7 +97,7 @@ var classifyRightMarginPosition = function classifyRightMarginPosition(view, eve
97
97
 
98
98
  /**
99
99
  * Process hover position and set left/right side. Only invoked when right-side controls are
100
- * enabled (confluence_remix_button_right_side_block_fg); handleMouseMove returns early otherwise.
100
+ * enabled; handleMouseMove returns early otherwise.
101
101
  */
102
102
  var processHoverSide = function processHoverSide(view, api) {
103
103
  var _api$userIntent, _api$showDiff$sharedS, _api$showDiff;
@@ -200,7 +200,7 @@ var handleMouseMove = exports.handleMouseMove = function handleMouseMove(view, e
200
200
  (0, _commands.stopEditing)(view);
201
201
  }
202
202
 
203
- // Only track hover side when right-side controls are enabled (single source: confluence_remix_button_right_side_block_fg via config)
203
+ // Only track hover side when right-side controls are enabled.
204
204
  if (!rightSideControlsEnabled) {
205
205
  return false;
206
206
  }
@@ -118,8 +118,6 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
118
118
  },
119
119
  view: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? function (view) {
120
120
  var editorContentArea = view.dom.closest('.ak-editor-content-area');
121
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
122
-
123
121
  var unbindMouseEnter;
124
122
  var unbindMouseLeave;
125
123
  var unbindDocumentMouseMove;
@@ -523,7 +523,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
523
523
  } finally {
524
524
  _iterator.f();
525
525
  }
526
- if (rightSideControlsEnabled && isViewMode && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
526
+ if (rightSideControlsEnabled && isViewMode) {
527
527
  var _iterator2 = _createForOfIteratorHelper(nodeDecorationRegistry),
528
528
  _step2;
529
529
  try {
@@ -779,7 +779,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
779
779
  } finally {
780
780
  _iterator5.f();
781
781
  }
782
- } else if (isViewMode && rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
782
+ } else if (isViewMode && rightSideControlsEnabled) {
783
783
  // Remove view-mode right-side decorations when no active node
784
784
  var _iterator6 = _createForOfIteratorHelper(nodeDecorationRegistry),
785
785
  _step6;
@@ -986,9 +986,8 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
986
986
  var isDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
987
987
  if (isDisabled) {
988
988
  var _api$editorViewMode2;
989
- var remixRightSideEnabled = rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg');
990
989
  // Hide decorations when disabled, except in view mode when right-side controls are enabled
991
- if (!remixRightSideEnabled || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
990
+ if (!rightSideControlsEnabled || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
992
991
  return;
993
992
  }
994
993
  }
@@ -22,7 +22,6 @@ var _blockControls = require("@atlaskit/editor-common/messages/block-controls");
22
22
  var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
23
23
  var _dragHandleVertical = _interopRequireDefault(require("@atlaskit/icon/core/drag-handle-vertical"));
24
24
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
25
- var _fg = require("@atlaskit/platform-feature-flags/fg");
26
25
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
27
26
  var _pluginKey = require("../pm-plugins/selection-preservation/plugin-key");
28
27
  var _collapsedHeading = require("../pm-plugins/utils/collapsed-heading");
@@ -279,7 +278,7 @@ var BlockControlsSurfaceDragHandle = exports.BlockControlsSurfaceDragHandle = fu
279
278
  return event.stopPropagation();
280
279
  },
281
280
  "data-editor-block-ctrl-drag-handle": true,
282
- "data-blocks-drag-handle": (0, _fg.fg)('confluence_remix_button_right_side_block_fg') || undefined,
281
+ "data-blocks-drag-handle": true,
283
282
  "data-testid": "block-controls-surface-drag-handle",
284
283
  className: (0, _runtime.ax)([dragHandleStyles.root, browser.gecko && dragHandleStyles.firefoxSelection, isLayoutColumn && dragHandleStyles.layoutColumn, dragHandleSelected && interactionState !== 'hasNotHadInteraction' && dragHandleStyles.selected, (handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused) && dragHandleStyles.keyboardFocused, dragHandleStyles.scaled])
285
284
  }, /*#__PURE__*/React.createElement("span", {
@@ -1041,7 +1041,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1041
1041
  ,
1042
1042
  onDrop: handleOnDrop,
1043
1043
  "data-editor-block-ctrl-drag-handle": true,
1044
- "data-blocks-drag-handle": (0, _fg.fg)('confluence_remix_button_right_side_block_fg') || undefined,
1044
+ "data-blocks-drag-handle": true,
1045
1045
  "data-testid": "block-ctrl-drag-handle",
1046
1046
  "aria-label": dragHandleAriaLabel,
1047
1047
  onBlur: function onBlur() {
@@ -91,7 +91,6 @@ var useBlockControlsVisibility = exports.useBlockControlsVisibility = function u
91
91
  isDisplayingDiff = _useSharedPluginState.isDisplayingDiff,
92
92
  rightSideControlsEnabled = _useSharedPluginState.rightSideControlsEnabled;
93
93
  var isViewMode = editorViewMode === 'view';
94
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
95
94
  // Both controls are restricted by side: the drag handle shows on the left half, the Remix button on
96
95
  // the right half (and the right margin), matching the midpoint split in handle-mouse-move.
97
96
  var shouldRestrictBySide = rightSideControlsEnabled && controlSide !== undefined && !isViewMode;
@@ -482,7 +482,6 @@ export const blockControlsPlugin = ({
482
482
  if (editorExperiment('platform_editor_controls', 'variant1')) {
483
483
  var _interactionTrackingP2, _interactionTrackingP3, _interactionTrackingP4;
484
484
  sharedState.isMouseOut = (_interactionTrackingP2 = (_interactionTrackingP3 = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP3 === void 0 ? void 0 : _interactionTrackingP3.isMouseOut) !== null && _interactionTrackingP2 !== void 0 ? _interactionTrackingP2 : false;
485
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
486
485
  sharedState.rightSideControlsEnabled = rightSideControlsEnabled;
487
486
  sharedState.hoverSide = rightSideControlsEnabled ? (_interactionTrackingP4 = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP4 === void 0 ? void 0 : _interactionTrackingP4.hoverSide : undefined;
488
487
  }
@@ -3,7 +3,6 @@ import { createElement } from 'react';
3
3
  import { v4 as uuid } from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
- import { fg } from '@atlaskit/platform-feature-flags/fg';
7
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
7
  import { ACTIVE_DRAG_HANDLE_ATTR } from '../ui/consts';
9
8
  import { DragHandle, DragHandleWithVisibility } from '../ui/drag-handle';
@@ -80,9 +79,7 @@ export const dragHandleDecoration = ({
80
79
  const element = document.createElement('span');
81
80
  // inline decoration causes focus issues when refocusing Editor into first line
82
81
  element.style.display = 'block';
83
- if (fg('confluence_remix_button_right_side_block_fg')) {
84
- element.setAttribute('data-blocks-decorator-widget', 'true');
85
- }
82
+ element.setAttribute('data-blocks-decorator-widget', 'true');
86
83
  element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
87
84
  element.setAttribute('data-blocks-drag-handle-container', 'true');
88
85
  element.setAttribute('data-blocks-drag-handle-key', key);
@@ -2,7 +2,6 @@ import { createElement } from 'react';
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
3
  import { v4 as uuid } from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { ACTIVE_QUICK_INSERT_ATTR } from '../ui/consts';
7
6
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
8
7
  import { getMatchingBlockMarks } from './utils/marks';
@@ -63,9 +62,7 @@ export const quickInsertButtonDecoration = ({
63
62
  element.style.clear = 'unset';
64
63
  element.contentEditable = 'false';
65
64
  element.setAttribute('data-blocks-quick-insert-container', 'true');
66
- if (fg('confluence_remix_button_right_side_block_fg')) {
67
- element.setAttribute('data-blocks-quick-insert-button', 'true');
68
- }
65
+ element.setAttribute('data-blocks-quick-insert-button', 'true');
69
66
  element.setAttribute('data-testid', 'block-ctrl-quick-insert-button');
70
67
  nodeViewPortalProviderAPI.render(() => /*#__PURE__*/createElement(QuickInsertWithVisibility, {
71
68
  api,
@@ -114,7 +114,7 @@ export const handleMouseOver = (view, event, api) => {
114
114
  // We shouldn't be firing mouse over transactions when the editor is disabled,
115
115
  // except in view mode when right-side controls are enabled (show controls on block hover)
116
116
  const rightSideControlsEnabled = (_api$blockControls$sh = api === null || api === void 0 ? void 0 : (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 ? void 0 : (_api$blockControls2$s = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2$s === void 0 ? void 0 : _api$blockControls2$s.rightSideControlsEnabled) !== null && _api$blockControls$sh !== void 0 ? _api$blockControls$sh : false;
117
- if (editorDisabled && (!isViewMode || !(rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg')))) {
117
+ if (editorDisabled && (!isViewMode || !rightSideControlsEnabled)) {
118
118
  return false;
119
119
  }
120
120
 
@@ -153,7 +153,7 @@ export const handleMouseOver = (view, event, api) => {
153
153
 
154
154
  // When hovering over the right-edge button (rendered in a portal outside the block), resolve the
155
155
  // block from the container's anchor so activeNode stays set and the button remains visible.
156
- if (!rootElement && rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg')) {
156
+ if (!rootElement && rightSideControlsEnabled) {
157
157
  const rightEdgeContainer = target === null || target === void 0 ? void 0 : target.closest('[data-blocks-right-edge-button-container]');
158
158
  if (rightEdgeContainer) {
159
159
  const anchor = rightEdgeContainer.getAttribute('data-blocks-right-edge-button-anchor');
@@ -74,7 +74,7 @@ const classifyRightMarginPosition = (view, event) => {
74
74
 
75
75
  /**
76
76
  * Process hover position and set left/right side. Only invoked when right-side controls are
77
- * enabled (confluence_remix_button_right_side_block_fg); handleMouseMove returns early otherwise.
77
+ * enabled; handleMouseMove returns early otherwise.
78
78
  */
79
79
  const processHoverSide = (view, api) => {
80
80
  var _api$userIntent, _api$userIntent$share, _api$showDiff$sharedS, _api$showDiff, _api$showDiff$sharedS2;
@@ -178,7 +178,7 @@ export const handleMouseMove = (view, event, rightSideControlsEnabled, api) => {
178
178
  stopEditing(view);
179
179
  }
180
180
 
181
- // Only track hover side when right-side controls are enabled (single source: confluence_remix_button_right_side_block_fg via config)
181
+ // Only track hover side when right-side controls are enabled.
182
182
  if (!rightSideControlsEnabled) {
183
183
  return false;
184
184
  }
@@ -104,8 +104,6 @@ export const createInteractionTrackingPlugin = (rightSideControlsEnabled = false
104
104
  },
105
105
  view: editorExperiment('platform_editor_controls', 'variant1') ? view => {
106
106
  const editorContentArea = view.dom.closest('.ak-editor-content-area');
107
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
108
-
109
107
  let unbindMouseEnter;
110
108
  let unbindMouseLeave;
111
109
  let unbindDocumentMouseMove;
@@ -500,7 +500,7 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
500
500
  const old = decorations.find((_activeNode9 = activeNode) === null || _activeNode9 === void 0 ? void 0 : _activeNode9.rootPos, (_activeNode0 = activeNode) === null || _activeNode0 === void 0 ? void 0 : _activeNode0.rootPos, spec => spec.type === factory.type);
501
501
  decorations = decorations.remove(old);
502
502
  }
503
- if (rightSideControlsEnabled && isViewMode && fg('confluence_remix_button_right_side_block_fg')) {
503
+ if (rightSideControlsEnabled && isViewMode) {
504
504
  for (const factory of nodeDecorationRegistry) {
505
505
  if (factory.showInViewMode) {
506
506
  var _activeNode1, _activeNode10;
@@ -694,7 +694,7 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
694
694
  decorations = decorations.add(newState.doc, [dec]);
695
695
  }
696
696
  }
697
- } else if (isViewMode && rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg')) {
697
+ } else if (isViewMode && rightSideControlsEnabled) {
698
698
  // Remove view-mode right-side decorations when no active node
699
699
  for (const factory of nodeDecorationRegistry) {
700
700
  if (factory.showInViewMode) {
@@ -886,9 +886,8 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI, nodeDecora
886
886
  const isDisabled = api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : (_api$editorDisabled$s = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled$s === void 0 ? void 0 : _api$editorDisabled$s.editorDisabled;
887
887
  if (isDisabled) {
888
888
  var _api$editorViewMode2, _api$editorViewMode2$;
889
- const remixRightSideEnabled = rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg');
890
889
  // Hide decorations when disabled, except in view mode when right-side controls are enabled
891
- if (!remixRightSideEnabled || (api === null || api === void 0 ? void 0 : (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 ? void 0 : (_api$editorViewMode2$ = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2$ === void 0 ? void 0 : _api$editorViewMode2$.mode) !== 'view') {
890
+ if (!rightSideControlsEnabled || (api === null || api === void 0 ? void 0 : (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 ? void 0 : (_api$editorViewMode2$ = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2$ === void 0 ? void 0 : _api$editorViewMode2$.mode) !== 'view') {
892
891
  return;
893
892
  }
894
893
  }
@@ -16,7 +16,6 @@ import { messages as blockControlsMessages } from '@atlaskit/editor-common/messa
16
16
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
17
17
  import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
18
18
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
19
- import { fg } from '@atlaskit/platform-feature-flags/fg';
20
19
  import Tooltip from '@atlaskit/tooltip/Tooltip';
21
20
  import { selectionPreservationPluginKey } from '../pm-plugins/selection-preservation/plugin-key';
22
21
  import { prepareCollapsedHeadingSelection } from '../pm-plugins/utils/collapsed-heading';
@@ -265,7 +264,7 @@ export const BlockControlsSurfaceDragHandle = ({
265
264
  ,
266
265
  onDrop: event => event.stopPropagation(),
267
266
  "data-editor-block-ctrl-drag-handle": true,
268
- "data-blocks-drag-handle": fg('confluence_remix_button_right_side_block_fg') || undefined,
267
+ "data-blocks-drag-handle": true,
269
268
  "data-testid": "block-controls-surface-drag-handle",
270
269
  className: ax([dragHandleStyles.root, browser.gecko && dragHandleStyles.firefoxSelection, isLayoutColumn && dragHandleStyles.layoutColumn, dragHandleSelected && interactionState !== 'hasNotHadInteraction' && dragHandleStyles.selected, (handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused) && dragHandleStyles.keyboardFocused, dragHandleStyles.scaled])
271
270
  }, /*#__PURE__*/React.createElement("span", {
@@ -1025,7 +1025,7 @@ export const DragHandle = ({
1025
1025
  ,
1026
1026
  onDrop: handleOnDrop,
1027
1027
  "data-editor-block-ctrl-drag-handle": true,
1028
- "data-blocks-drag-handle": fg('confluence_remix_button_right_side_block_fg') || undefined,
1028
+ "data-blocks-drag-handle": true,
1029
1029
  "data-testid": "block-ctrl-drag-handle",
1030
1030
  "aria-label": dragHandleAriaLabel,
1031
1031
  onBlur: () => {
@@ -81,7 +81,6 @@ export const useBlockControlsVisibility = ({
81
81
  };
82
82
  });
83
83
  const isViewMode = editorViewMode === 'view';
84
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
85
84
  // Both controls are restricted by side: the drag handle shows on the left half, the Remix button on
86
85
  // the right half (and the right margin), matching the midpoint split in handle-mouse-move.
87
86
  const shouldRestrictBySide = rightSideControlsEnabled && controlSide !== undefined && !isViewMode;
@@ -485,7 +485,6 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
485
485
  if (editorExperiment('platform_editor_controls', 'variant1')) {
486
486
  var _interactionTrackingP2, _interactionTrackingP3, _interactionTrackingP4;
487
487
  sharedState.isMouseOut = (_interactionTrackingP2 = (_interactionTrackingP3 = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP3 === void 0 ? void 0 : _interactionTrackingP3.isMouseOut) !== null && _interactionTrackingP2 !== void 0 ? _interactionTrackingP2 : false;
488
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
489
488
  sharedState.rightSideControlsEnabled = rightSideControlsEnabled;
490
489
  sharedState.hoverSide = rightSideControlsEnabled ? (_interactionTrackingP4 = interactionTrackingPluginKey.getState(editorState)) === null || _interactionTrackingP4 === void 0 ? void 0 : _interactionTrackingP4.hoverSide : undefined;
491
490
  }
@@ -6,7 +6,6 @@ import { createElement } from 'react';
6
6
  import { v4 as uuid } from 'uuid';
7
7
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
8
8
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
- import { fg } from '@atlaskit/platform-feature-flags/fg';
10
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
11
10
  import { ACTIVE_DRAG_HANDLE_ATTR } from '../ui/consts';
12
11
  import { DragHandle, DragHandleWithVisibility } from '../ui/drag-handle';
@@ -88,9 +87,7 @@ export var dragHandleDecoration = function dragHandleDecoration(_ref) {
88
87
  var element = document.createElement('span');
89
88
  // inline decoration causes focus issues when refocusing Editor into first line
90
89
  element.style.display = 'block';
91
- if (fg('confluence_remix_button_right_side_block_fg')) {
92
- element.setAttribute('data-blocks-decorator-widget', 'true');
93
- }
90
+ element.setAttribute('data-blocks-decorator-widget', 'true');
94
91
  element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
95
92
  element.setAttribute('data-blocks-drag-handle-container', 'true');
96
93
  element.setAttribute('data-blocks-drag-handle-key', key);
@@ -3,7 +3,6 @@ import { createElement } from 'react';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
4
  import { v4 as uuid } from 'uuid';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
- import { fg } from '@atlaskit/platform-feature-flags/fg';
7
6
  import { ACTIVE_QUICK_INSERT_ATTR } from '../ui/consts';
8
7
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
9
8
  import { getMatchingBlockMarks } from './utils/marks';
@@ -69,9 +68,7 @@ export var quickInsertButtonDecoration = function quickInsertButtonDecoration(_r
69
68
  element.style.clear = 'unset';
70
69
  element.contentEditable = 'false';
71
70
  element.setAttribute('data-blocks-quick-insert-container', 'true');
72
- if (fg('confluence_remix_button_right_side_block_fg')) {
73
- element.setAttribute('data-blocks-quick-insert-button', 'true');
74
- }
71
+ element.setAttribute('data-blocks-quick-insert-button', 'true');
75
72
  element.setAttribute('data-testid', 'block-ctrl-quick-insert-button');
76
73
  nodeViewPortalProviderAPI.render(function () {
77
74
  return /*#__PURE__*/createElement(QuickInsertWithVisibility, {
@@ -115,7 +115,7 @@ export var handleMouseOver = function handleMouseOver(view, event, api) {
115
115
  // We shouldn't be firing mouse over transactions when the editor is disabled,
116
116
  // except in view mode when right-side controls are enabled (show controls on block hover)
117
117
  var rightSideControlsEnabled = (_api$blockControls$sh = api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || (_api$blockControls2 = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2 === void 0 ? void 0 : _api$blockControls2.rightSideControlsEnabled) !== null && _api$blockControls$sh !== void 0 ? _api$blockControls$sh : false;
118
- if (editorDisabled && (!isViewMode || !(rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg')))) {
118
+ if (editorDisabled && (!isViewMode || !rightSideControlsEnabled)) {
119
119
  return false;
120
120
  }
121
121
 
@@ -154,7 +154,7 @@ export var handleMouseOver = function handleMouseOver(view, event, api) {
154
154
 
155
155
  // When hovering over the right-edge button (rendered in a portal outside the block), resolve the
156
156
  // block from the container's anchor so activeNode stays set and the button remains visible.
157
- if (!rootElement && rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg')) {
157
+ if (!rootElement && rightSideControlsEnabled) {
158
158
  var rightEdgeContainer = target === null || target === void 0 ? void 0 : target.closest('[data-blocks-right-edge-button-container]');
159
159
  if (rightEdgeContainer) {
160
160
  var anchor = rightEdgeContainer.getAttribute('data-blocks-right-edge-button-anchor');
@@ -92,7 +92,7 @@ var classifyRightMarginPosition = function classifyRightMarginPosition(view, eve
92
92
 
93
93
  /**
94
94
  * Process hover position and set left/right side. Only invoked when right-side controls are
95
- * enabled (confluence_remix_button_right_side_block_fg); handleMouseMove returns early otherwise.
95
+ * enabled; handleMouseMove returns early otherwise.
96
96
  */
97
97
  var processHoverSide = function processHoverSide(view, api) {
98
98
  var _api$userIntent, _api$showDiff$sharedS, _api$showDiff;
@@ -195,7 +195,7 @@ export var handleMouseMove = function handleMouseMove(view, event, rightSideCont
195
195
  stopEditing(view);
196
196
  }
197
197
 
198
- // Only track hover side when right-side controls are enabled (single source: confluence_remix_button_right_side_block_fg via config)
198
+ // Only track hover side when right-side controls are enabled.
199
199
  if (!rightSideControlsEnabled) {
200
200
  return false;
201
201
  }
@@ -112,8 +112,6 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
112
112
  },
113
113
  view: editorExperiment('platform_editor_controls', 'variant1') ? function (view) {
114
114
  var editorContentArea = view.dom.closest('.ak-editor-content-area');
115
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
116
-
117
115
  var unbindMouseEnter;
118
116
  var unbindMouseLeave;
119
117
  var unbindDocumentMouseMove;
@@ -516,7 +516,7 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
516
516
  } finally {
517
517
  _iterator.f();
518
518
  }
519
- if (rightSideControlsEnabled && isViewMode && fg('confluence_remix_button_right_side_block_fg')) {
519
+ if (rightSideControlsEnabled && isViewMode) {
520
520
  var _iterator2 = _createForOfIteratorHelper(nodeDecorationRegistry),
521
521
  _step2;
522
522
  try {
@@ -772,7 +772,7 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
772
772
  } finally {
773
773
  _iterator5.f();
774
774
  }
775
- } else if (isViewMode && rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg')) {
775
+ } else if (isViewMode && rightSideControlsEnabled) {
776
776
  // Remove view-mode right-side decorations when no active node
777
777
  var _iterator6 = _createForOfIteratorHelper(nodeDecorationRegistry),
778
778
  _step6;
@@ -980,9 +980,8 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
980
980
  var isDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
981
981
  if (isDisabled) {
982
982
  var _api$editorViewMode2;
983
- var remixRightSideEnabled = rightSideControlsEnabled && fg('confluence_remix_button_right_side_block_fg');
984
983
  // Hide decorations when disabled, except in view mode when right-side controls are enabled
985
- if (!remixRightSideEnabled || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
984
+ if (!rightSideControlsEnabled || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
986
985
  return;
987
986
  }
988
987
  }
@@ -17,7 +17,6 @@ import { messages as blockControlsMessages } from '@atlaskit/editor-common/messa
17
17
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
18
18
  import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
19
19
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
20
- import { fg } from '@atlaskit/platform-feature-flags/fg';
21
20
  import Tooltip from '@atlaskit/tooltip/Tooltip';
22
21
  import { selectionPreservationPluginKey } from '../pm-plugins/selection-preservation/plugin-key';
23
22
  import { prepareCollapsedHeadingSelection } from '../pm-plugins/utils/collapsed-heading';
@@ -273,7 +272,7 @@ export var BlockControlsSurfaceDragHandle = function BlockControlsSurfaceDragHan
273
272
  return event.stopPropagation();
274
273
  },
275
274
  "data-editor-block-ctrl-drag-handle": true,
276
- "data-blocks-drag-handle": fg('confluence_remix_button_right_side_block_fg') || undefined,
275
+ "data-blocks-drag-handle": true,
277
276
  "data-testid": "block-controls-surface-drag-handle",
278
277
  className: ax([dragHandleStyles.root, browser.gecko && dragHandleStyles.firefoxSelection, isLayoutColumn && dragHandleStyles.layoutColumn, dragHandleSelected && interactionState !== 'hasNotHadInteraction' && dragHandleStyles.selected, (handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused) && dragHandleStyles.keyboardFocused, dragHandleStyles.scaled])
279
278
  }, /*#__PURE__*/React.createElement("span", {
@@ -1037,7 +1037,7 @@ export var DragHandle = function DragHandle(_ref2) {
1037
1037
  ,
1038
1038
  onDrop: handleOnDrop,
1039
1039
  "data-editor-block-ctrl-drag-handle": true,
1040
- "data-blocks-drag-handle": fg('confluence_remix_button_right_side_block_fg') || undefined,
1040
+ "data-blocks-drag-handle": true,
1041
1041
  "data-testid": "block-ctrl-drag-handle",
1042
1042
  "aria-label": dragHandleAriaLabel,
1043
1043
  onBlur: function onBlur() {
@@ -79,7 +79,6 @@ export var useBlockControlsVisibility = function useBlockControlsVisibility(_ref
79
79
  isDisplayingDiff = _useSharedPluginState.isDisplayingDiff,
80
80
  rightSideControlsEnabled = _useSharedPluginState.rightSideControlsEnabled;
81
81
  var isViewMode = editorViewMode === 'view';
82
- // rightSideControlsEnabled is the single source of truth (confluence_remix_button_right_side_block_fg from preset)
83
82
  // Both controls are restricted by side: the drag handle shows on the left half, the Remix button on
84
83
  // the right half (and the right margin), matching the midpoint split in handle-mouse-move.
85
84
  var shouldRestrictBySide = rightSideControlsEnabled && controlSide !== undefined && !isViewMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "31.0.2",
3
+ "version": "31.0.3",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/primitives": "^22.6.0",
62
62
  "@atlaskit/section-message": "^10.2.0",
63
63
  "@atlaskit/theme": "^28.2.0",
64
- "@atlaskit/tmp-editor-statsig": "^247.0.0",
64
+ "@atlaskit/tmp-editor-statsig": "^248.0.0",
65
65
  "@atlaskit/tokens": "^20.8.0",
66
66
  "@atlaskit/tooltip": "^24.4.0",
67
67
  "@babel/runtime": "^7.0.0",
@@ -73,7 +73,7 @@
73
73
  "uuid": "^11.1.1"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^134.0.0",
76
+ "@atlaskit/editor-common": "^134.1.0",
77
77
  "react": "^18.2.0 || ^19.2.0",
78
78
  "react-dom": "^18.2.0 || ^19.2.0",
79
79
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -85,9 +85,6 @@
85
85
  "platform_editor_maui_jira_updates": {
86
86
  "type": "boolean"
87
87
  },
88
- "confluence_remix_button_right_side_block_fg": {
89
- "type": "boolean"
90
- },
91
88
  "platform_editor_controls_reliable_anchor_patch_1": {
92
89
  "type": "boolean"
93
90
  },