@atlaskit/editor-plugin-media 7.2.2 → 7.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 7.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f789827e18f93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f789827e18f93) -
8
+ FD-92214 clean up fg platform_editor_multi_images_overridden_upload_fix
9
+ - [`6fb79942fc3a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6fb79942fc3a5) -
10
+ Internal changes to how borders are applied.
11
+ - Updated dependencies
12
+
3
13
  ## 7.2.2
4
14
 
5
15
  ### Patch Changes
@@ -40,7 +40,7 @@ var supportTextStyles = (0, _react2.css)({
40
40
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-500, 40px)"),
41
41
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
42
42
  lineHeight: '20px',
43
- borderTop: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")")),
43
+ borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, ".concat(_colors.N30, ")")),
44
44
  margin: 0
45
45
  });
46
46
  var containerStyles = (0, _react2.css)({
@@ -65,7 +65,7 @@ var validationWrapperStyles = (0, _react2.css)({
65
65
  lineHeight: 0,
66
66
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-300, 24px)", " ", "var(--ds-space-150, 12px)", " 0"),
67
67
  margin: "0 ".concat("var(--ds-space-150, 12px)", " 0 ", "var(--ds-space-500, 40px)"),
68
- borderTop: "1px solid ".concat("var(--ds-border-danger, ".concat(_colors.R400, ")")),
68
+ borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-danger, ".concat(_colors.R400, ")")),
69
69
  alignItems: 'start',
70
70
  flexDirection: 'column'
71
71
  });
@@ -53,19 +53,15 @@ function insertNodesWithOptionalParagraph(_ref) {
53
53
  var openEnd = 0;
54
54
  if (state.selection.empty) {
55
55
  var insertFrom = (0, _selection.atTheBeginningOfBlock)(state) ? state.selection.$from.before() : state.selection.from;
56
- if ((0, _platformFeatureFlags.fg)('platform_editor_multi_images_overridden_upload_fix')) {
57
- // the use of pmSafeInsert causes the node selection to media single node.
58
- // It leads to discrepancy between the full-page and comment editor - not sure why :shrug:
59
- // When multiple images are uploaded, the node selection is set to the previous node
60
- // and got overridden by the next node inserted.
61
- // It also causes the images position shifted when the images are uploaded.
62
- // E.g the images are uploaded after a table, the images will be inserted inside the table.
63
- // so we revert to use tr.insert instead. No extra paragraph is added.
64
- updatedTr = updatedTr.insert(insertFrom, nodes);
65
- } else {
66
- var shouldInsertFrom = !(0, _mediaCommon.isInsidePotentialEmptyParagraph)(state);
67
- updatedTr = (0, _selection.atTheBeginningOfBlock)(state) ? (0, _utils2.safeInsert)(nodes[0], shouldInsertFrom ? insertFrom : undefined, false)(updatedTr) : updatedTr.insert(insertFrom, nodes);
68
- }
56
+
57
+ // the use of pmSafeInsert causes the node selection to media single node.
58
+ // It leads to discrepancy between the full-page and comment editor - not sure why :shrug:
59
+ // When multiple images are uploaded, the node selection is set to the previous node
60
+ // and got overridden by the next node inserted.
61
+ // It also causes the images position shifted when the images are uploaded.
62
+ // E.g the images are uploaded after a table, the images will be inserted inside the table.
63
+ // so we revert to use tr.insert instead. No extra paragraph is added.
64
+ updatedTr = updatedTr.insert(insertFrom, nodes);
69
65
  } else {
70
66
  updatedTr.replaceSelection(new _model.Slice(_model.Fragment.from(nodes), 0, openEnd));
71
67
  }
@@ -34,7 +34,7 @@ var validationWrapper = (0, _react2.css)({
34
34
  lineHeight: 0,
35
35
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-300, 24px)", " ", "var(--ds-space-150, 12px)", " 0"),
36
36
  margin: "0 ".concat("var(--ds-space-050, 4px)", " 0 ", "var(--ds-space-400, 32px)"),
37
- borderTop: "1px solid ".concat("var(--ds-border-danger, ".concat(_colors.R400, ")")),
37
+ borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-danger, ".concat(_colors.R400, ")")),
38
38
  alignItems: 'start',
39
39
  display: 'flex',
40
40
  flexDirection: 'column'
@@ -30,7 +30,7 @@ const supportTextStyles = css({
30
30
  padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-500, 40px)"}`,
31
31
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
32
32
  lineHeight: '20px',
33
- borderTop: `1px solid ${`var(--ds-border, ${N30})`}`,
33
+ borderTop: `${"var(--ds-border-width, 1px)"} solid ${`var(--ds-border, ${N30})`}`,
34
34
  margin: 0
35
35
  });
36
36
  const containerStyles = css({
@@ -55,7 +55,7 @@ const validationWrapperStyles = css({
55
55
  lineHeight: 0,
56
56
  padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-300, 24px)"} ${"var(--ds-space-150, 12px)"} 0`,
57
57
  margin: `0 ${"var(--ds-space-150, 12px)"} 0 ${"var(--ds-space-500, 40px)"}`,
58
- borderTop: `1px solid ${`var(--ds-border-danger, ${R400})`}`,
58
+ borderTop: `${"var(--ds-border-width, 1px)"} solid ${`var(--ds-border-danger, ${R400})`}`,
59
59
  alignItems: 'start',
60
60
  flexDirection: 'column'
61
61
  });
@@ -7,7 +7,7 @@ import { checkNodeDown, isEmptyParagraph } from '@atlaskit/editor-common/utils';
7
7
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
8
8
  import { safeInsert as pmSafeInsert, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
- import { copyOptionalAttrsFromMediaState, isInsidePotentialEmptyParagraph } from '../utils/media-common';
10
+ import { copyOptionalAttrsFromMediaState } from '../utils/media-common';
11
11
  import { findChangeFromLocation, getChangeMediaAnalytics } from './analytics';
12
12
  import { isImage } from './is-type';
13
13
  const getInsertMediaAnalytics = (inputMethod, fileExtension, insertMediaVia) => ({
@@ -45,19 +45,15 @@ function insertNodesWithOptionalParagraph({
45
45
  const openEnd = 0;
46
46
  if (state.selection.empty) {
47
47
  const insertFrom = atTheBeginningOfBlock(state) ? state.selection.$from.before() : state.selection.from;
48
- if (fg('platform_editor_multi_images_overridden_upload_fix')) {
49
- // the use of pmSafeInsert causes the node selection to media single node.
50
- // It leads to discrepancy between the full-page and comment editor - not sure why :shrug:
51
- // When multiple images are uploaded, the node selection is set to the previous node
52
- // and got overridden by the next node inserted.
53
- // It also causes the images position shifted when the images are uploaded.
54
- // E.g the images are uploaded after a table, the images will be inserted inside the table.
55
- // so we revert to use tr.insert instead. No extra paragraph is added.
56
- updatedTr = updatedTr.insert(insertFrom, nodes);
57
- } else {
58
- const shouldInsertFrom = !isInsidePotentialEmptyParagraph(state);
59
- updatedTr = atTheBeginningOfBlock(state) ? pmSafeInsert(nodes[0], shouldInsertFrom ? insertFrom : undefined, false)(updatedTr) : updatedTr.insert(insertFrom, nodes);
60
- }
48
+
49
+ // the use of pmSafeInsert causes the node selection to media single node.
50
+ // It leads to discrepancy between the full-page and comment editor - not sure why :shrug:
51
+ // When multiple images are uploaded, the node selection is set to the previous node
52
+ // and got overridden by the next node inserted.
53
+ // It also causes the images position shifted when the images are uploaded.
54
+ // E.g the images are uploaded after a table, the images will be inserted inside the table.
55
+ // so we revert to use tr.insert instead. No extra paragraph is added.
56
+ updatedTr = updatedTr.insert(insertFrom, nodes);
61
57
  } else {
62
58
  updatedTr.replaceSelection(new Slice(Fragment.from(nodes), 0, openEnd));
63
59
  }
@@ -23,7 +23,7 @@ const validationWrapper = css({
23
23
  lineHeight: 0,
24
24
  padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-300, 24px)"} ${"var(--ds-space-150, 12px)"} 0`,
25
25
  margin: `0 ${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-400, 32px)"}`,
26
- borderTop: `1px solid ${`var(--ds-border-danger, ${R400})`}`,
26
+ borderTop: `${"var(--ds-border-width, 1px)"} solid ${`var(--ds-border-danger, ${R400})`}`,
27
27
  alignItems: 'start',
28
28
  display: 'flex',
29
29
  flexDirection: 'column'
@@ -37,7 +37,7 @@ var supportTextStyles = css({
37
37
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-500, 40px)"),
38
38
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
39
39
  lineHeight: '20px',
40
- borderTop: "1px solid ".concat("var(--ds-border, ".concat(N30, ")")),
40
+ borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, ".concat(N30, ")")),
41
41
  margin: 0
42
42
  });
43
43
  var containerStyles = css({
@@ -62,7 +62,7 @@ var validationWrapperStyles = css({
62
62
  lineHeight: 0,
63
63
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-300, 24px)", " ", "var(--ds-space-150, 12px)", " 0"),
64
64
  margin: "0 ".concat("var(--ds-space-150, 12px)", " 0 ", "var(--ds-space-500, 40px)"),
65
- borderTop: "1px solid ".concat("var(--ds-border-danger, ".concat(R400, ")")),
65
+ borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-danger, ".concat(R400, ")")),
66
66
  alignItems: 'start',
67
67
  flexDirection: 'column'
68
68
  });
@@ -10,7 +10,7 @@ import { checkNodeDown, isEmptyParagraph } from '@atlaskit/editor-common/utils';
10
10
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
11
11
  import { safeInsert as pmSafeInsert, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
- import { copyOptionalAttrsFromMediaState, isInsidePotentialEmptyParagraph } from '../utils/media-common';
13
+ import { copyOptionalAttrsFromMediaState } from '../utils/media-common';
14
14
  import { findChangeFromLocation, getChangeMediaAnalytics } from './analytics';
15
15
  import { isImage } from './is-type';
16
16
  var getInsertMediaAnalytics = function getInsertMediaAnalytics(inputMethod, fileExtension, insertMediaVia) {
@@ -46,19 +46,15 @@ function insertNodesWithOptionalParagraph(_ref) {
46
46
  var openEnd = 0;
47
47
  if (state.selection.empty) {
48
48
  var insertFrom = atTheBeginningOfBlock(state) ? state.selection.$from.before() : state.selection.from;
49
- if (fg('platform_editor_multi_images_overridden_upload_fix')) {
50
- // the use of pmSafeInsert causes the node selection to media single node.
51
- // It leads to discrepancy between the full-page and comment editor - not sure why :shrug:
52
- // When multiple images are uploaded, the node selection is set to the previous node
53
- // and got overridden by the next node inserted.
54
- // It also causes the images position shifted when the images are uploaded.
55
- // E.g the images are uploaded after a table, the images will be inserted inside the table.
56
- // so we revert to use tr.insert instead. No extra paragraph is added.
57
- updatedTr = updatedTr.insert(insertFrom, nodes);
58
- } else {
59
- var shouldInsertFrom = !isInsidePotentialEmptyParagraph(state);
60
- updatedTr = atTheBeginningOfBlock(state) ? pmSafeInsert(nodes[0], shouldInsertFrom ? insertFrom : undefined, false)(updatedTr) : updatedTr.insert(insertFrom, nodes);
61
- }
49
+
50
+ // the use of pmSafeInsert causes the node selection to media single node.
51
+ // It leads to discrepancy between the full-page and comment editor - not sure why :shrug:
52
+ // When multiple images are uploaded, the node selection is set to the previous node
53
+ // and got overridden by the next node inserted.
54
+ // It also causes the images position shifted when the images are uploaded.
55
+ // E.g the images are uploaded after a table, the images will be inserted inside the table.
56
+ // so we revert to use tr.insert instead. No extra paragraph is added.
57
+ updatedTr = updatedTr.insert(insertFrom, nodes);
62
58
  } else {
63
59
  updatedTr.replaceSelection(new Slice(Fragment.from(nodes), 0, openEnd));
64
60
  }
@@ -30,7 +30,7 @@ var validationWrapper = css({
30
30
  lineHeight: 0,
31
31
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-300, 24px)", " ", "var(--ds-space-150, 12px)", " 0"),
32
32
  margin: "0 ".concat("var(--ds-space-050, 4px)", " 0 ", "var(--ds-space-400, 32px)"),
33
- borderTop: "1px solid ".concat("var(--ds-border-danger, ".concat(R400, ")")),
33
+ borderTop: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-danger, ".concat(R400, ")")),
34
34
  alignItems: 'start',
35
35
  display: 'flex',
36
36
  flexDirection: 'column'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "7.2.2",
3
+ "version": "7.2.3",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/primitives": "^14.14.0",
67
67
  "@atlaskit/textfield": "^8.0.0",
68
68
  "@atlaskit/theme": "^21.0.0",
69
- "@atlaskit/tmp-editor-statsig": "^12.23.0",
69
+ "@atlaskit/tmp-editor-statsig": "^12.24.0",
70
70
  "@atlaskit/tokens": "^6.3.0",
71
71
  "@atlaskit/tooltip": "^20.4.0",
72
72
  "@babel/runtime": "^7.0.0",
@@ -148,9 +148,6 @@
148
148
  "platform_editor_add_media_from_url_rollout": {
149
149
  "type": "boolean"
150
150
  },
151
- "platform_editor_multi_images_overridden_upload_fix": {
152
- "type": "boolean"
153
- },
154
151
  "platform_editor_remove_media_inline_feature_flag": {
155
152
  "type": "boolean"
156
153
  },