@atlaskit/editor-plugin-synced-block 8.4.14 → 8.5.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,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 8.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`608189fcbdca7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/608189fcbdca7) -
|
|
8
|
+
Harden synced block cache deletion lifecycle: replace the legacy 1-second eager deletion with a
|
|
9
|
+
guard-checked 30-second grace period that protects against premature cache invalidation when
|
|
10
|
+
blocks unmount/remount during editor open, block moves, or other React subscribe/unsubscribe
|
|
11
|
+
churn. Fixes an intermittent issue where the 'Edit at source' button could become disabled and the
|
|
12
|
+
source link could disappear from the synced locations dropdown. Gated behind
|
|
13
|
+
platform_synced_block_patch_14.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 8.4.14
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
11
|
var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
14
15
|
var _editorActions = require("./editor-actions");
|
|
@@ -187,6 +188,13 @@ var syncedBlockPlugin = exports.syncedBlockPlugin = function syncedBlockPlugin(_
|
|
|
187
188
|
};
|
|
188
189
|
cachedSharedState = nextSharedState;
|
|
189
190
|
return nextSharedState;
|
|
191
|
+
},
|
|
192
|
+
// Destroy the SyncBlockStoreManager on editor unmount to cancel
|
|
193
|
+
// pending timers, subscriptions, and in-flight fetches.
|
|
194
|
+
destroy: function destroy() {
|
|
195
|
+
if ((0, _platformFeatureFlags.fg)('platform_synced_block_patch_14')) {
|
|
196
|
+
syncBlockStore.destroy();
|
|
197
|
+
}
|
|
190
198
|
}
|
|
191
199
|
};
|
|
192
200
|
};
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
8
|
import { flushBodiedSyncBlocks, flushSyncBlocks, discardUnpublishedSyncBlocks } from './editor-actions';
|
|
@@ -179,6 +180,13 @@ export const syncedBlockPlugin = ({
|
|
|
179
180
|
};
|
|
180
181
|
cachedSharedState = nextSharedState;
|
|
181
182
|
return nextSharedState;
|
|
183
|
+
},
|
|
184
|
+
// Destroy the SyncBlockStoreManager on editor unmount to cancel
|
|
185
|
+
// pending timers, subscriptions, and in-flight fetches.
|
|
186
|
+
destroy() {
|
|
187
|
+
if (fg('platform_synced_block_patch_14')) {
|
|
188
|
+
syncBlockStore.destroy();
|
|
189
|
+
}
|
|
182
190
|
}
|
|
183
191
|
};
|
|
184
192
|
};
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
8
|
import { flushBodiedSyncBlocks as _flushBodiedSyncBlocks, flushSyncBlocks, discardUnpublishedSyncBlocks as _discardUnpublishedSyncBlocks } from './editor-actions';
|
|
@@ -181,6 +182,13 @@ export var syncedBlockPlugin = function syncedBlockPlugin(_ref2) {
|
|
|
181
182
|
};
|
|
182
183
|
cachedSharedState = nextSharedState;
|
|
183
184
|
return nextSharedState;
|
|
185
|
+
},
|
|
186
|
+
// Destroy the SyncBlockStoreManager on editor unmount to cancel
|
|
187
|
+
// pending timers, subscriptions, and in-flight fetches.
|
|
188
|
+
destroy: function destroy() {
|
|
189
|
+
if (fg('platform_synced_block_patch_14')) {
|
|
190
|
+
syncBlockStore.destroy();
|
|
191
|
+
}
|
|
184
192
|
}
|
|
185
193
|
};
|
|
186
194
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-plugin-user-intent": "^8.2.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
45
45
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
46
|
-
"@atlaskit/editor-synced-block-provider": "^6.
|
|
46
|
+
"@atlaskit/editor-synced-block-provider": "^6.7.0",
|
|
47
47
|
"@atlaskit/editor-toolbar": "^1.9.0",
|
|
48
48
|
"@atlaskit/flag": "^17.12.0",
|
|
49
49
|
"@atlaskit/icon": "35.3.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"date-fns": "^2.17.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^114.
|
|
67
|
+
"@atlaskit/editor-common": "^114.54.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
70
70
|
},
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
},
|
|
116
116
|
"platform_synced_block_patch_13": {
|
|
117
117
|
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"platform_synced_block_patch_14": {
|
|
120
|
+
"type": "boolean"
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
}
|