@atlaskit/editor-plugin-media 1.40.1 → 1.41.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,18 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 1.41.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#161814](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161814)
8
+ [`6ff956fe6b784`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6ff956fe6b784) -
9
+ [ux] Add a new property to annotation state to know whether or not we're opening the comment box
10
+ from the media toolbar so we can scroll it into view from Confluence side
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 1.40.1
4
17
 
5
18
  ### Patch Changes
@@ -11,6 +11,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
11
11
  var _media = require("@atlaskit/editor-common/media");
12
12
  var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
13
13
  var _comment2 = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _commentWithDotIcon = require("./assets/commentWithDotIcon");
15
16
  var _utils = require("./utils");
16
17
  var commentButton = exports.commentButton = function commentButton(intl, state, api) {
@@ -29,11 +30,12 @@ var commentButton = exports.commentButton = function commentButton(intl, state,
29
30
  var _api$annotation$actio = api.annotation.actions,
30
31
  showCommentForBlockNode = _api$annotation$actio.showCommentForBlockNode,
31
32
  setInlineCommentDraftState = _api$annotation$actio.setInlineCommentDraftState;
32
- if (!showCommentForBlockNode(selectMediaNode, _analytics.VIEW_METHOD.COMMENT_BUTTON)(state, dispatch)) {
33
+ var isOpeningMediaCommentFromToolbar = (0, _platformFeatureFlags.fg)('confluence_frontend_media_scroll_fix') ? true : false;
34
+ if (!showCommentForBlockNode(selectMediaNode, _analytics.VIEW_METHOD.COMMENT_BUTTON, isOpeningMediaCommentFromToolbar)(state, dispatch)) {
33
35
  var _selectMediaNode$attr;
34
36
  setInlineCommentDraftState(true,
35
37
  // TODO: might need to update to reflect it's from media floating toolbar
36
- _analytics.INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id)(state, dispatch);
38
+ _analytics.INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id, isOpeningMediaCommentFromToolbar)(state, dispatch);
37
39
  }
38
40
  }
39
41
  return true;
@@ -4,6 +4,7 @@ import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
4
4
  import { commentMessages as messages } from '@atlaskit/editor-common/media';
5
5
  import CommentIcon from '@atlaskit/icon/core/comment';
6
6
  import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { CommentWithDotIcon } from './assets/commentWithDotIcon';
8
9
  import { getSelectedMediaSingle } from './utils';
9
10
  export const commentButton = (intl, state, api) => {
@@ -21,11 +22,12 @@ export const commentButton = (intl, state, api) => {
21
22
  showCommentForBlockNode,
22
23
  setInlineCommentDraftState
23
24
  } = api.annotation.actions;
24
- if (!showCommentForBlockNode(selectMediaNode, VIEW_METHOD.COMMENT_BUTTON)(state, dispatch)) {
25
+ const isOpeningMediaCommentFromToolbar = fg('confluence_frontend_media_scroll_fix') ? true : false;
26
+ if (!showCommentForBlockNode(selectMediaNode, VIEW_METHOD.COMMENT_BUTTON, isOpeningMediaCommentFromToolbar)(state, dispatch)) {
25
27
  var _selectMediaNode$attr;
26
28
  setInlineCommentDraftState(true,
27
29
  // TODO: might need to update to reflect it's from media floating toolbar
28
- INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id)(state, dispatch);
30
+ INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id, isOpeningMediaCommentFromToolbar)(state, dispatch);
29
31
  }
30
32
  }
31
33
  return true;
@@ -4,6 +4,7 @@ import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
4
4
  import { commentMessages as messages } from '@atlaskit/editor-common/media';
5
5
  import CommentIcon from '@atlaskit/icon/core/comment';
6
6
  import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { CommentWithDotIcon } from './assets/commentWithDotIcon';
8
9
  import { getSelectedMediaSingle } from './utils';
9
10
  export var commentButton = function commentButton(intl, state, api) {
@@ -22,11 +23,12 @@ export var commentButton = function commentButton(intl, state, api) {
22
23
  var _api$annotation$actio = api.annotation.actions,
23
24
  showCommentForBlockNode = _api$annotation$actio.showCommentForBlockNode,
24
25
  setInlineCommentDraftState = _api$annotation$actio.setInlineCommentDraftState;
25
- if (!showCommentForBlockNode(selectMediaNode, VIEW_METHOD.COMMENT_BUTTON)(state, dispatch)) {
26
+ var isOpeningMediaCommentFromToolbar = fg('confluence_frontend_media_scroll_fix') ? true : false;
27
+ if (!showCommentForBlockNode(selectMediaNode, VIEW_METHOD.COMMENT_BUTTON, isOpeningMediaCommentFromToolbar)(state, dispatch)) {
26
28
  var _selectMediaNode$attr;
27
29
  setInlineCommentDraftState(true,
28
30
  // TODO: might need to update to reflect it's from media floating toolbar
29
- INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id)(state, dispatch);
31
+ INPUT_METHOD.FLOATING_TB, 'block', (_selectMediaNode$attr = selectMediaNode.attrs) === null || _selectMediaNode$attr === void 0 ? void 0 : _selectMediaNode$attr.id, isOpeningMediaCommentFromToolbar)(state, dispatch);
30
32
  }
31
33
  }
32
34
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.40.1",
3
+ "version": "1.41.0",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,10 +36,10 @@
36
36
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
37
37
  "@atlaskit/analytics-next": "^10.1.0",
38
38
  "@atlaskit/button": "^20.3.0",
39
- "@atlaskit/editor-common": "^94.18.0",
39
+ "@atlaskit/editor-common": "^94.21.0",
40
40
  "@atlaskit/editor-palette": "1.6.3",
41
41
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
42
- "@atlaskit/editor-plugin-annotation": "1.23.3",
42
+ "@atlaskit/editor-plugin-annotation": "1.24.0",
43
43
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
44
44
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
45
45
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
@@ -54,19 +54,19 @@
54
54
  "@atlaskit/editor-tables": "^2.8.0",
55
55
  "@atlaskit/form": "^10.5.0",
56
56
  "@atlaskit/icon": "^22.24.0",
57
- "@atlaskit/media-card": "^78.12.0",
58
- "@atlaskit/media-client": "^28.2.0",
57
+ "@atlaskit/media-card": "^78.14.0",
58
+ "@atlaskit/media-client": "^28.3.0",
59
59
  "@atlaskit/media-client-react": "^2.3.0",
60
60
  "@atlaskit/media-common": "^11.7.0",
61
61
  "@atlaskit/media-filmstrip": "^47.5.0",
62
62
  "@atlaskit/media-picker": "^67.0.0",
63
- "@atlaskit/media-ui": "^26.1.0",
64
- "@atlaskit/media-viewer": "^49.3.0",
63
+ "@atlaskit/media-ui": "^26.2.0",
64
+ "@atlaskit/media-viewer": "^49.4.0",
65
65
  "@atlaskit/platform-feature-flags": "^0.3.0",
66
- "@atlaskit/primitives": "^13.1.0",
66
+ "@atlaskit/primitives": "^13.2.0",
67
67
  "@atlaskit/textfield": "^6.5.0",
68
68
  "@atlaskit/theme": "^14.0.0",
69
- "@atlaskit/tmp-editor-statsig": "^2.13.0",
69
+ "@atlaskit/tmp-editor-statsig": "^2.16.0",
70
70
  "@atlaskit/tokens": "^2.2.0",
71
71
  "@atlaskit/tooltip": "^18.9.0",
72
72
  "@babel/runtime": "^7.0.0",
@@ -149,6 +149,9 @@
149
149
  },
150
150
  "platform_editor_inline_resize_media_to_edge": {
151
151
  "type": "boolean"
152
+ },
153
+ "confluence_frontend_media_scroll_fix": {
154
+ "type": "boolean"
152
155
  }
153
156
  },
154
157
  "stricter": {