@atlaskit/editor-plugin-selection-toolbar 3.2.0 → 3.3.0
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#138841](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138841)
|
|
8
|
+
[`d71cc65fae381`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d71cc65fae381) -
|
|
9
|
+
ED-27489 fix toolbar docking pref
|
|
10
|
+
|
|
3
11
|
## 3.2.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -112,7 +112,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
112
112
|
|
|
113
113
|
// if the toolbarDockingInitialPosition preference has changed
|
|
114
114
|
// update the toolbarDocking state
|
|
115
|
-
if (!previousToolbarDocking &&
|
|
115
|
+
if (!previousToolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
|
|
116
116
|
// we currently only check for the initial value
|
|
117
117
|
var toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
118
118
|
if (toolbarDockingPreference && toolbarDockingPreference !== previousToolbarDocking) {
|
|
@@ -166,9 +166,12 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
|
|
|
166
166
|
var _api$analytics2;
|
|
167
167
|
isPreferenceInitialized = true;
|
|
168
168
|
var userToolbarDockingPref = getInitialToolbarDocking(contextualFormattingEnabled, userPreferencesProvider);
|
|
169
|
-
var tr = newState.tr
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
var tr = newState.tr;
|
|
170
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
|
|
171
|
+
tr.setMeta(_pluginKey.selectionToolbarPluginKey, {
|
|
172
|
+
toolbarDocking: userToolbarDockingPref
|
|
173
|
+
});
|
|
174
|
+
}
|
|
172
175
|
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
|
173
176
|
action: _analytics.ACTION.INITIALISED,
|
|
174
177
|
actionSubject: _analytics.ACTION_SUBJECT.USER_PREFERENCES,
|
|
@@ -106,7 +106,7 @@ export const selectionToolbarPlugin = ({
|
|
|
106
106
|
|
|
107
107
|
// if the toolbarDockingInitialPosition preference has changed
|
|
108
108
|
// update the toolbarDocking state
|
|
109
|
-
if (!previousToolbarDocking &&
|
|
109
|
+
if (!previousToolbarDocking && fg('platform_editor_controls_patch_4')) {
|
|
110
110
|
// we currently only check for the initial value
|
|
111
111
|
const toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
112
112
|
if (toolbarDockingPreference && toolbarDockingPreference !== previousToolbarDocking) {
|
|
@@ -161,9 +161,12 @@ export const selectionToolbarPlugin = ({
|
|
|
161
161
|
var _api$analytics2;
|
|
162
162
|
isPreferenceInitialized = true;
|
|
163
163
|
const userToolbarDockingPref = getInitialToolbarDocking(contextualFormattingEnabled, userPreferencesProvider);
|
|
164
|
-
const tr = newState.tr
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
const tr = newState.tr;
|
|
165
|
+
if (!fg('platform_editor_controls_patch_4')) {
|
|
166
|
+
tr.setMeta(selectionToolbarPluginKey, {
|
|
167
|
+
toolbarDocking: userToolbarDockingPref
|
|
168
|
+
});
|
|
169
|
+
}
|
|
167
170
|
api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
|
|
168
171
|
action: ACTION.INITIALISED,
|
|
169
172
|
actionSubject: ACTION_SUBJECT.USER_PREFERENCES,
|
|
@@ -105,7 +105,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
105
105
|
|
|
106
106
|
// if the toolbarDockingInitialPosition preference has changed
|
|
107
107
|
// update the toolbarDocking state
|
|
108
|
-
if (!previousToolbarDocking &&
|
|
108
|
+
if (!previousToolbarDocking && fg('platform_editor_controls_patch_4')) {
|
|
109
109
|
// we currently only check for the initial value
|
|
110
110
|
var toolbarDockingPreference = userPreferencesProvider === null || userPreferencesProvider === void 0 ? void 0 : userPreferencesProvider.getPreference('toolbarDockingInitialPosition');
|
|
111
111
|
if (toolbarDockingPreference && toolbarDockingPreference !== previousToolbarDocking) {
|
|
@@ -159,9 +159,12 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
|
|
|
159
159
|
var _api$analytics2;
|
|
160
160
|
isPreferenceInitialized = true;
|
|
161
161
|
var userToolbarDockingPref = getInitialToolbarDocking(contextualFormattingEnabled, userPreferencesProvider);
|
|
162
|
-
var tr = newState.tr
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
var tr = newState.tr;
|
|
163
|
+
if (!fg('platform_editor_controls_patch_4')) {
|
|
164
|
+
tr.setMeta(selectionToolbarPluginKey, {
|
|
165
|
+
toolbarDocking: userToolbarDockingPref
|
|
166
|
+
});
|
|
167
|
+
}
|
|
165
168
|
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
|
|
166
169
|
action: ACTION.INITIALISED,
|
|
167
170
|
actionSubject: ACTION_SUBJECT.USER_PREFERENCES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-toolbar",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/css": "^0.10.0",
|
|
37
|
-
"@atlaskit/editor-common": "^103.
|
|
37
|
+
"@atlaskit/editor-common": "^103.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.1.0",
|
|
@@ -96,6 +96,9 @@
|
|
|
96
96
|
"platform-feature-flags": {
|
|
97
97
|
"platform_editor_controls_patch_2": {
|
|
98
98
|
"type": "boolean"
|
|
99
|
+
},
|
|
100
|
+
"platform_editor_controls_patch_4": {
|
|
101
|
+
"type": "boolean"
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
}
|