@atlaskit/editor-plugin-show-diff 9.1.0 → 9.1.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-show-diff
2
2
 
3
+ ## 9.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3cd3edf123888`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3cd3edf123888) -
8
+ Remove purple underline from block widget containers when diffs are inverted with extended
9
+ experiment enabled
10
+ - Updated dependencies
11
+
3
12
  ## 9.1.0
4
13
 
5
14
  ### Minor Changes
@@ -299,7 +299,13 @@ var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(_ref6
299
299
  var contentWrapper = document.createElement('div');
300
300
  var targetNodeName = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _nodeTypeUtils.getBaseNodeTypeName)(targetNode.type) : targetNode.type.name;
301
301
  var nodeStyle = getChangedNodeStyle(targetNodeName, colorScheme, isInserted, isActive);
302
- contentWrapper.setAttribute('style', "".concat(getChangedContentStyle(colorScheme, isActive, isInserted)).concat(nodeStyle || ''));
302
+
303
+ // When the extended experiment is enabled and the content is inserted,
304
+ // block widget nodes that already have dedicated node-level styling (e.g. boxShadow outline)
305
+ // should not also get the inline content style (borderBottom underline) on their container.
306
+ var shouldSkipContentStyle = (0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true) && isInserted && nodeStyle !== undefined;
307
+ var contentStyle = shouldSkipContentStyle ? '' : getChangedContentStyle(colorScheme, isActive, isInserted);
308
+ contentWrapper.setAttribute('style', "".concat(contentStyle).concat(nodeStyle || ''));
303
309
  contentWrapper.append(nodeView);
304
310
  return contentWrapper;
305
311
  };
@@ -292,7 +292,13 @@ const createBlockNodeContentWrapper = ({
292
292
  const contentWrapper = document.createElement('div');
293
293
  const targetNodeName = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? getBaseNodeTypeName(targetNode.type) : targetNode.type.name;
294
294
  const nodeStyle = getChangedNodeStyle(targetNodeName, colorScheme, isInserted, isActive);
295
- contentWrapper.setAttribute('style', `${getChangedContentStyle(colorScheme, isActive, isInserted)}${nodeStyle || ''}`);
295
+
296
+ // When the extended experiment is enabled and the content is inserted,
297
+ // block widget nodes that already have dedicated node-level styling (e.g. boxShadow outline)
298
+ // should not also get the inline content style (borderBottom underline) on their container.
299
+ const shouldSkipContentStyle = expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) && isInserted && nodeStyle !== undefined;
300
+ const contentStyle = shouldSkipContentStyle ? '' : getChangedContentStyle(colorScheme, isActive, isInserted);
301
+ contentWrapper.setAttribute('style', `${contentStyle}${nodeStyle || ''}`);
296
302
  contentWrapper.append(nodeView);
297
303
  return contentWrapper;
298
304
  };
@@ -293,7 +293,13 @@ var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(_ref6
293
293
  var contentWrapper = document.createElement('div');
294
294
  var targetNodeName = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? getBaseNodeTypeName(targetNode.type) : targetNode.type.name;
295
295
  var nodeStyle = getChangedNodeStyle(targetNodeName, colorScheme, isInserted, isActive);
296
- contentWrapper.setAttribute('style', "".concat(getChangedContentStyle(colorScheme, isActive, isInserted)).concat(nodeStyle || ''));
296
+
297
+ // When the extended experiment is enabled and the content is inserted,
298
+ // block widget nodes that already have dedicated node-level styling (e.g. boxShadow outline)
299
+ // should not also get the inline content style (borderBottom underline) on their container.
300
+ var shouldSkipContentStyle = expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) && isInserted && nodeStyle !== undefined;
301
+ var contentStyle = shouldSkipContentStyle ? '' : getChangedContentStyle(colorScheme, isActive, isInserted);
302
+ contentWrapper.setAttribute('style', "".concat(contentStyle).concat(nodeStyle || ''));
297
303
  contentWrapper.append(nodeView);
298
304
  return contentWrapper;
299
305
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-show-diff",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/editor-prosemirror": "^7.3.0",
37
37
  "@atlaskit/editor-tables": "^2.10.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
- "@atlaskit/tmp-editor-statsig": "^101.0.0",
39
+ "@atlaskit/tmp-editor-statsig": "^102.0.0",
40
40
  "@atlaskit/tokens": "^13.4.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "lodash": "^4.17.21",