@atlaskit/editor-plugin-help-dialog 5.0.3 → 5.0.5

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,20 @@
1
1
  # @atlaskit/editor-plugin-help-dialog
2
2
 
3
+ ## 5.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f1c0df3d21494`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1c0df3d21494) -
8
+ ENGHEALTH-29983 fix help dialog footer a11y color contrast
9
+ - Updated dependencies
10
+
11
+ ## 5.0.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [`984f973a1fb80`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/984f973a1fb80) -
16
+ ED-29168: helpdialog hydration fix
17
+
3
18
  ## 5.0.3
4
19
 
5
20
  ### Patch Changes
@@ -7,9 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.helpDialogPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _analytics = require("@atlaskit/editor-common/analytics");
10
+ var _coreUtils = require("@atlaskit/editor-common/core-utils");
10
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
11
12
  var _messages = require("@atlaskit/editor-common/messages");
12
13
  var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/question-circle"));
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
15
  var _actions = require("./pm-plugins/actions");
14
16
  var _commands = require("./pm-plugins/commands");
15
17
  var _keymap = require("./pm-plugins/keymap");
@@ -100,11 +102,14 @@ var helpDialogPlugin = exports.helpDialogPlugin = function helpDialogPlugin(_ref
100
102
  },
101
103
  contentComponent: function contentComponent(_ref5) {
102
104
  var editorView = _ref5.editorView;
103
- if (!editorView) {
105
+ if ((0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) && (!editorView || (0, _coreUtils.isSSR)())) {
104
106
  return null;
105
107
  }
106
108
  return /*#__PURE__*/_react.default.createElement(_HelpDialogLoader.HelpDialogLoader, {
107
- pluginInjectionApi: api,
109
+ pluginInjectionApi: api
110
+ // temp non null assertion until platform_editor_hydratable_ui cleaned up
111
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
112
+ ,
108
113
  editorView: editorView,
109
114
  quickInsertEnabled: !!(api !== null && api !== void 0 && api.quickInsert)
110
115
  });
@@ -10,6 +10,7 @@ var _react = require("@emotion/react");
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
12
  var _messages = require("@atlaskit/editor-common/messages");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _styles = require("./styles");
14
15
  var _utils = require("./utils");
15
16
  /**
@@ -22,7 +23,7 @@ var ModalFooter = function ModalFooter() {
22
23
  return (
23
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
24
25
  (0, _react.jsx)("div", {
25
- css: _styles.footer
26
+ css: (0, _platformFeatureFlags.fg)('platform_editor_fix_help_dialog_color_contrast') ? _styles.footerNew : _styles.footer
26
27
  }, (0, _react.jsx)(_reactIntlNext.FormattedMessage
27
28
  // Ignored via go/ees005
28
29
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -4,7 +4,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.toolbarButton = exports.shortcutsArray = exports.row = exports.line = exports.header = exports.footer = exports.dialogHeader = exports.contentWrapper = exports.content = exports.componentFromKeymapWrapperStyles = exports.column = void 0;
7
+ exports.toolbarButton = exports.shortcutsArray = exports.row = exports.line = exports.header = exports.footerNew = exports.footer = exports.dialogHeader = exports.contentWrapper = exports.content = exports.componentFromKeymapWrapperStyles = exports.column = void 0;
8
8
  var _react = require("@emotion/react");
9
9
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
10
10
  var _colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
@@ -45,6 +45,17 @@ var footer = exports.footer = (0, _react.css)({
45
45
  boxShadow: "'none'"
46
46
  });
47
47
 
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
49
+ var footerNew = exports.footerNew = (0, _react.css)({
50
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
51
+ zIndex: _editorSharedStyles.akEditorUnitZIndex,
52
+ color: "var(--ds-text-subtle, #44546F)",
53
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
54
+ padding: "var(--ds-space-300, 24px)",
55
+ textAlign: 'right',
56
+ boxShadow: "'none'"
57
+ });
58
+
48
59
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
49
60
  var contentWrapper = exports.contentWrapper = (0, _react.css)({
50
61
  padding: "var(--ds-space-250, 20px)".concat(" ", "var(--ds-space-500, 40px)"),
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
3
4
  import { openHelp, tooltip } from '@atlaskit/editor-common/keymaps';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
8
  import { closeHelpAction, openHelpAction } from './pm-plugins/actions';
7
9
  import { openHelpCommand } from './pm-plugins/commands';
8
10
  import { keymapPlugin } from './pm-plugins/keymap';
@@ -92,11 +94,14 @@ export const helpDialogPlugin = ({
92
94
  contentComponent({
93
95
  editorView
94
96
  }) {
95
- if (!editorView) {
97
+ if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && (!editorView || isSSR())) {
96
98
  return null;
97
99
  }
98
100
  return /*#__PURE__*/React.createElement(HelpDialogLoader, {
99
- pluginInjectionApi: api,
101
+ pluginInjectionApi: api
102
+ // temp non null assertion until platform_editor_hydratable_ui cleaned up
103
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
104
+ ,
100
105
  editorView: editorView,
101
106
  quickInsertEnabled: !!(api !== null && api !== void 0 && api.quickInsert)
102
107
  });
@@ -8,12 +8,13 @@ import { jsx } from '@emotion/react';
8
8
  import { FormattedMessage } from 'react-intl-next';
9
9
  import { openHelp } from '@atlaskit/editor-common/keymaps';
10
10
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
11
- import { footer } from './styles';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { footer, footerNew } from './styles';
12
13
  import { getComponentFromKeymap } from './utils';
13
14
  const ModalFooter = () =>
14
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
15
16
  jsx("div", {
16
- css: footer
17
+ css: fg('platform_editor_fix_help_dialog_color_contrast') ? footerNew : footer
17
18
  }, jsx(FormattedMessage
18
19
  // Ignored via go/ees005
19
20
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -35,6 +35,17 @@ export const footer = css({
35
35
  boxShadow: "'none'"
36
36
  });
37
37
 
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
39
+ export const footerNew = css({
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
+ zIndex: akEditorUnitZIndex,
42
+ color: "var(--ds-text-subtle, #44546F)",
43
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
44
+ padding: "var(--ds-space-300, 24px)",
45
+ textAlign: 'right',
46
+ boxShadow: "'none'"
47
+ });
48
+
38
49
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
39
50
  export const contentWrapper = css({
40
51
  padding: `${"var(--ds-space-250, 20px)"} ${"var(--ds-space-500, 40px)"}`,
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
3
4
  import { openHelp, tooltip } from '@atlaskit/editor-common/keymaps';
4
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
5
6
  import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
8
  import { closeHelpAction, openHelpAction } from './pm-plugins/actions';
7
9
  import { openHelpCommand } from './pm-plugins/commands';
8
10
  import { keymapPlugin } from './pm-plugins/keymap';
@@ -94,11 +96,14 @@ export var helpDialogPlugin = function helpDialogPlugin(_ref2) {
94
96
  },
95
97
  contentComponent: function contentComponent(_ref5) {
96
98
  var editorView = _ref5.editorView;
97
- if (!editorView) {
99
+ if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && (!editorView || isSSR())) {
98
100
  return null;
99
101
  }
100
102
  return /*#__PURE__*/React.createElement(HelpDialogLoader, {
101
- pluginInjectionApi: api,
103
+ pluginInjectionApi: api
104
+ // temp non null assertion until platform_editor_hydratable_ui cleaned up
105
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
106
+ ,
102
107
  editorView: editorView,
103
108
  quickInsertEnabled: !!(api !== null && api !== void 0 && api.quickInsert)
104
109
  });
@@ -8,13 +8,14 @@ import { jsx } from '@emotion/react';
8
8
  import { FormattedMessage } from 'react-intl-next';
9
9
  import { openHelp } from '@atlaskit/editor-common/keymaps';
10
10
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
11
- import { footer } from './styles';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { footer, footerNew } from './styles';
12
13
  import { getComponentFromKeymap } from './utils';
13
14
  var ModalFooter = function ModalFooter() {
14
15
  return (
15
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
16
17
  jsx("div", {
17
- css: footer
18
+ css: fg('platform_editor_fix_help_dialog_color_contrast') ? footerNew : footer
18
19
  }, jsx(FormattedMessage
19
20
  // Ignored via go/ees005
20
21
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -35,6 +35,17 @@ export var footer = css({
35
35
  boxShadow: "'none'"
36
36
  });
37
37
 
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
39
+ export var footerNew = css({
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
+ zIndex: akEditorUnitZIndex,
42
+ color: "var(--ds-text-subtle, #44546F)",
43
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
44
+ padding: "var(--ds-space-300, 24px)",
45
+ textAlign: 'right',
46
+ boxShadow: "'none'"
47
+ });
48
+
38
49
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
39
50
  export var contentWrapper = css({
40
51
  padding: "var(--ds-space-250, 20px)".concat(" ", "var(--ds-space-500, 40px)"),
@@ -1,6 +1,7 @@
1
1
  import { type SerializedStyles } from '@emotion/react';
2
2
  export declare const header: SerializedStyles;
3
3
  export declare const footer: SerializedStyles;
4
+ export declare const footerNew: SerializedStyles;
4
5
  export declare const contentWrapper: SerializedStyles;
5
6
  export declare const line: SerializedStyles;
6
7
  export declare const content: SerializedStyles;
@@ -1,6 +1,7 @@
1
1
  import { type SerializedStyles } from '@emotion/react';
2
2
  export declare const header: SerializedStyles;
3
3
  export declare const footer: SerializedStyles;
4
+ export declare const footerNew: SerializedStyles;
4
5
  export declare const contentWrapper: SerializedStyles;
5
6
  export declare const line: SerializedStyles;
6
7
  export declare const content: SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-help-dialog",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "description": "Help Dialog plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,12 +34,12 @@
34
34
  "@atlaskit/editor-prosemirror": "7.0.0",
35
35
  "@atlaskit/editor-shared-styles": "^3.6.0",
36
36
  "@atlaskit/heading": "^5.2.0",
37
- "@atlaskit/icon": "^28.1.0",
37
+ "@atlaskit/icon": "^28.2.0",
38
38
  "@atlaskit/modal-dialog": "^14.3.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
- "@atlaskit/primitives": "^14.14.0",
40
+ "@atlaskit/primitives": "^14.15.0",
41
41
  "@atlaskit/theme": "^21.0.0",
42
- "@atlaskit/tmp-editor-statsig": "^12.21.0",
42
+ "@atlaskit/tmp-editor-statsig": "^12.28.0",
43
43
  "@atlaskit/tokens": "^6.3.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1",
@@ -50,7 +50,7 @@
50
50
  "@testing-library/react": "^13.4.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^109.6.0",
53
+ "@atlaskit/editor-common": "^109.12.0",
54
54
  "react": "^18.2.0"
55
55
  },
56
56
  "techstack": {
@@ -92,6 +92,9 @@
92
92
  },
93
93
  "platform_editor_breakout_resizing_hello_release": {
94
94
  "type": "boolean"
95
+ },
96
+ "platform_editor_fix_help_dialog_color_contrast": {
97
+ "type": "boolean"
95
98
  }
96
99
  }
97
100
  }