@atlaskit/editor-plugin-panel 4.3.2 → 4.3.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,14 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 4.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#136524](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/136524)
8
+ [`d70621353e0f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d70621353e0f7) -
9
+ [ux] [EDITOR-266] Fix nested panel icon colours in LCM
10
+ - Updated dependencies
11
+
3
12
  ## 4.3.2
4
13
 
5
14
  ### Patch Changes
@@ -11,6 +11,7 @@ var _panel = require("@atlaskit/editor-common/panel");
11
11
  var _editorPalette = require("@atlaskit/editor-palette");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _utils = require("@atlaskit/editor-prosemirror/utils");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -42,9 +43,13 @@ var panelAttrsToDom = exports.panelAttrsToDom = function panelAttrsToDom(attrs,
42
43
  'data-panel-icon-text': panelIconText
43
44
  });
44
45
  }
45
- var iconDiv = ['div', {
46
+ var iconDiv = ['div', // EDITOR-266 This fixes an issue in LCM where if you have nested panels
47
+ // The icon colour will be overriden by the parent panel style, this is used to create a more specefic css selector
48
+ _objectSpread({
46
49
  class: _panel.PanelSharedCssClassName.icon
47
- }];
50
+ }, (0, _platformFeatureFlags.fg)('platform_editor_lcm_nested_panel_icon_fix') ? {
51
+ 'data-panel-type': panelType || _adfSchema.PanelType.INFO
52
+ } : {})];
48
53
  var contentDiv = ['div', {
49
54
  class: _panel.PanelSharedCssClassName.content
50
55
  }, 0];
@@ -3,6 +3,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
3
3
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
4
4
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
8
  export const findPanel = (state, selection) => {
8
9
  const {
@@ -37,8 +38,14 @@ export const panelAttrsToDom = (attrs, allowCustomPanel) => {
37
38
  'data-panel-icon-text': panelIconText
38
39
  };
39
40
  }
40
- const iconDiv = ['div', {
41
- class: PanelSharedCssClassName.icon
41
+ const iconDiv = ['div',
42
+ // EDITOR-266 This fixes an issue in LCM where if you have nested panels
43
+ // The icon colour will be overriden by the parent panel style, this is used to create a more specefic css selector
44
+ {
45
+ class: PanelSharedCssClassName.icon,
46
+ ...(fg('platform_editor_lcm_nested_panel_icon_fix') ? {
47
+ 'data-panel-type': panelType || PanelType.INFO
48
+ } : {})
42
49
  }];
43
50
  const contentDiv = ['div', {
44
51
  class: PanelSharedCssClassName.content
@@ -6,6 +6,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
6
6
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
7
7
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { findParentNode, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
11
  export var findPanel = function findPanel(state, selection) {
11
12
  var panel = state.schema.nodes.panel;
@@ -35,9 +36,13 @@ export var panelAttrsToDom = function panelAttrsToDom(attrs, allowCustomPanel) {
35
36
  'data-panel-icon-text': panelIconText
36
37
  });
37
38
  }
38
- var iconDiv = ['div', {
39
+ var iconDiv = ['div', // EDITOR-266 This fixes an issue in LCM where if you have nested panels
40
+ // The icon colour will be overriden by the parent panel style, this is used to create a more specefic css selector
41
+ _objectSpread({
39
42
  class: PanelSharedCssClassName.icon
40
- }];
43
+ }, fg('platform_editor_lcm_nested_panel_icon_fix') ? {
44
+ 'data-panel-type': panelType || PanelType.INFO
45
+ } : {})];
41
46
  var contentDiv = ['div', {
42
47
  class: PanelSharedCssClassName.content
43
48
  }, 0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "Panel 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-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
39
- "@atlaskit/editor-plugin-emoji": "^3.4.0",
39
+ "@atlaskit/editor-plugin-emoji": "^3.5.0",
40
40
  "@atlaskit/editor-prosemirror": "7.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^3.4.0",
42
42
  "@atlaskit/emoji": "^69.0.0",
@@ -98,6 +98,9 @@
98
98
  },
99
99
  "platform_editor_controls_patch_1": {
100
100
  "type": "boolean"
101
+ },
102
+ "platform_editor_lcm_nested_panel_icon_fix": {
103
+ "type": "boolean"
101
104
  }
102
105
  },
103
106
  "stricter": {