@atlaskit/editor-plugin-block-controls 3.11.0 → 3.11.1
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 3.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#140969](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140969)
|
|
8
|
+
[`b4ac22e73d43c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4ac22e73d43c) -
|
|
9
|
+
[ux] [ED-27253] hide selection states until editor has been interacted with
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 3.11.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -278,6 +278,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
278
278
|
featureFlagsState = _useSharedPluginState.featureFlagsState;
|
|
279
279
|
var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
|
|
280
280
|
var isShiftDown = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockControls.isShiftDown');
|
|
281
|
+
var hasHadInteraction = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'interaction.hasHadInteraction') !== false;
|
|
281
282
|
var isLayoutColumn = nodeType === 'layoutColumn';
|
|
282
283
|
var isMultiSelect = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
|
|
283
284
|
(0, _react.useEffect)(function () {
|
|
@@ -753,7 +754,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
753
754
|
css: [(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_sticky_controls') ? dragHandleButtonStyles : dragHandleButtonStylesOld, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && dragHandleColor,
|
|
754
755
|
// ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
755
756
|
// See https://product-fabric.atlassian.net/browse/ED-26266
|
|
756
|
-
_browser.browser.gecko && (0, _platformFeatureFlags.fg)('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
|
|
757
|
+
_browser.browser.gecko && (0, _platformFeatureFlags.fg)('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && (!(0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction') || hasHadInteraction) && selectedStyles],
|
|
757
758
|
ref: buttonRef
|
|
758
759
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
759
760
|
,
|
|
@@ -262,6 +262,7 @@ export const DragHandle = ({
|
|
|
262
262
|
} = useSharedPluginState(api, ['featureFlags']);
|
|
263
263
|
const selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
264
264
|
const isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
|
|
265
|
+
const hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
|
|
265
266
|
const isLayoutColumn = nodeType === 'layoutColumn';
|
|
266
267
|
const isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
267
268
|
useEffect(() => {
|
|
@@ -740,7 +741,7 @@ export const DragHandle = ({
|
|
|
740
741
|
css: [editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_sticky_controls') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
|
|
741
742
|
// ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
742
743
|
// See https://product-fabric.atlassian.net/browse/ED-26266
|
|
743
|
-
browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
|
|
744
|
+
browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && (!fg('platform_editor_no_selection_until_interaction') || hasHadInteraction) && selectedStyles],
|
|
744
745
|
ref: buttonRef
|
|
745
746
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
746
747
|
,
|
|
@@ -275,6 +275,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
275
275
|
featureFlagsState = _useSharedPluginState.featureFlagsState;
|
|
276
276
|
var selection = useSharedPluginStateSelector(api, 'selection.selection');
|
|
277
277
|
var isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
|
|
278
|
+
var hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
|
|
278
279
|
var isLayoutColumn = nodeType === 'layoutColumn';
|
|
279
280
|
var isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
280
281
|
useEffect(function () {
|
|
@@ -750,7 +751,7 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
750
751
|
css: [editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_sticky_controls') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
|
|
751
752
|
// ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
752
753
|
// See https://product-fabric.atlassian.net/browse/ED-26266
|
|
753
|
-
browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
|
|
754
|
+
browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && (!fg('platform_editor_no_selection_until_interaction') || hasHadInteraction) && selectedStyles],
|
|
754
755
|
ref: buttonRef
|
|
755
756
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
756
757
|
,
|
|
@@ -5,6 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import { type AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
7
7
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
+
import { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
8
9
|
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
9
10
|
import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
10
11
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
@@ -79,6 +80,7 @@ export type BlockControlsPluginDependencies = [
|
|
|
79
80
|
OptionalPlugin<TypeAheadPlugin>,
|
|
80
81
|
OptionalPlugin<SelectionPlugin>,
|
|
81
82
|
OptionalPlugin<MetricsPlugin>,
|
|
83
|
+
OptionalPlugin<InteractionPlugin>,
|
|
82
84
|
OptionalPlugin<UserIntentPlugin>
|
|
83
85
|
];
|
|
84
86
|
export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
|
|
@@ -5,6 +5,7 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
|
|
|
5
5
|
import { type AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
6
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
7
7
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
+
import { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
8
9
|
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
9
10
|
import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
10
11
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
@@ -79,6 +80,7 @@ export type BlockControlsPluginDependencies = [
|
|
|
79
80
|
OptionalPlugin<TypeAheadPlugin>,
|
|
80
81
|
OptionalPlugin<SelectionPlugin>,
|
|
81
82
|
OptionalPlugin<MetricsPlugin>,
|
|
83
|
+
OptionalPlugin<InteractionPlugin>,
|
|
82
84
|
OptionalPlugin<UserIntentPlugin>
|
|
83
85
|
];
|
|
84
86
|
export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.1",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
41
|
+
"@atlaskit/editor-plugin-interaction": "^1.0.0",
|
|
41
42
|
"@atlaskit/editor-plugin-metrics": "^3.4.0",
|
|
42
43
|
"@atlaskit/editor-plugin-quick-insert": "^2.4.0",
|
|
43
44
|
"@atlaskit/editor-plugin-selection": "^2.1.0",
|
|
@@ -183,6 +184,9 @@
|
|
|
183
184
|
"platform_editor_controls_sticky_mask": {
|
|
184
185
|
"type": "boolean"
|
|
185
186
|
},
|
|
187
|
+
"platform_editor_no_selection_until_interaction": {
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
186
190
|
"platform_editor_fix_widget_destroy": {
|
|
187
191
|
"type": "boolean"
|
|
188
192
|
}
|