@atlaskit/editor-plugin-block-type 5.1.24 → 5.1.26

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-block-type
2
2
 
3
+ ## 5.1.26
4
+
5
+ ### Patch Changes
6
+
7
+ - [#169224](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169224)
8
+ [`95aee735823c6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/95aee735823c6) -
9
+ [ux] ED-27798: Show T icon for block type plugin toolbar, and show only bold as single button,
10
+ italic as dropdown in text formatting toolbar
11
+
12
+ ## 5.1.25
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 5.1.24
4
19
 
5
20
  ### Patch Changes
@@ -11,12 +11,12 @@ var _reactIntlNext = require("react-intl-next");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _styles = require("@atlaskit/editor-common/styles");
13
13
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
14
+ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
14
15
  var _text = _interopRequireDefault(require("@atlaskit/icon/core/text"));
15
16
  var _textStyle = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/text-style"));
16
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
17
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
18
  var _primitives = require("@atlaskit/primitives");
19
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
19
+ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
20
20
  var _blockTypes = require("../../block-types");
21
21
  var _styled = require("./styled");
22
22
  /**
@@ -41,13 +41,14 @@ var BlockTypeButton = exports.BlockTypeButton = function BlockTypeButton(props)
41
41
  blockTypeName: blockTypeName
42
42
  });
43
43
  var toolipTextStyles = props.formatMessage(_messages.toolbarMessages.textStylesTooltip);
44
- var icon = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && props.blockTypeIcon ? props.blockTypeIcon : (0, _react2.jsx)(_text.default, {
44
+ var icon = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') && props.blockTypeIcon ? props.blockTypeIcon : (0, _react2.jsx)(_text.default, {
45
45
  label: labelTextStyles,
46
46
  spacing: "spacious",
47
47
  color: "currentColor",
48
48
  LEGACY_fallbackIcon: _textStyle.default
49
49
  });
50
- var chevronIconSpacing = props.isSmall && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') ? 'spacious' : 'none';
50
+ var chevronIconSpacing = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') && (props.isSmall && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') || !props.isSmall && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13')) ? 'spacious' : 'none';
51
+ var shouldUseIconAsButton = props.isSmall || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13');
51
52
  return (0, _react2.jsx)(_uiMenu.ToolbarButton, {
52
53
  spacing: props.isReducedSpacing ? 'none' : 'default',
53
54
  selected: props.selected
@@ -65,16 +66,17 @@ var BlockTypeButton = exports.BlockTypeButton = function BlockTypeButton(props)
65
66
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
66
67
  css: [_styles.wrapperStyle, props.isSmall && _styled.wrapperSmallStyle],
67
68
  "data-testid": "toolbar-block-type-text-styles-icon"
68
- }, (0, _react2.jsx)(_react.default.Fragment, null, props.isSmall && icon, (0, _react2.jsx)("span", {
69
+ }, (0, _react2.jsx)(_react.default.Fragment, null, shouldUseIconAsButton && icon, (0, _react2.jsx)("span", {
69
70
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
70
71
  css: _styles.expandIconContainerStyle
71
72
  }, (0, _react2.jsx)(_chevronDown.default, {
72
73
  spacing: chevronIconSpacing,
73
74
  label: "",
74
75
  color: "currentColor",
75
- LEGACY_margin: "0 0 0 -8px"
76
+ LEGACY_margin: "0 0 0 -8px",
77
+ size: "small"
76
78
  }))))
77
- }, !props.isSmall && (0, _react2.jsx)(_primitives.Box, {
79
+ }, !shouldUseIconAsButton && (0, _react2.jsx)(_primitives.Box, {
78
80
  xcss: [buttonContentStyle, props.isReducedSpacing && buttonContentReducedSpacingStyle]
79
81
  }, (0, _react2.jsx)(_reactIntlNext.FormattedMessage
80
82
  // Ignored via go/ees005
@@ -10,12 +10,12 @@ import { FormattedMessage } from 'react-intl-next';
10
10
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
11
11
  import { expandIconContainerStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
12
12
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
13
+ import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
13
14
  import TextIcon from '@atlaskit/icon/core/text';
14
15
  import { default as TextStyleIconLegacy } from '@atlaskit/icon/glyph/editor/text-style';
15
- import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { Box, xcss } from '@atlaskit/primitives';
18
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
19
19
  import { NORMAL_TEXT } from '../../block-types';
20
20
  import { wrapperSmallStyle } from './styled';
21
21
  const buttonContentStyle = xcss({
@@ -33,13 +33,14 @@ export const BlockTypeButton = props => {
33
33
  blockTypeName
34
34
  });
35
35
  const toolipTextStyles = props.formatMessage(toolbarMessages.textStylesTooltip);
36
- const icon = editorExperiment('platform_editor_controls', 'variant1') && props.blockTypeIcon ? props.blockTypeIcon : jsx(TextIcon, {
36
+ const icon = expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && props.blockTypeIcon ? props.blockTypeIcon : jsx(TextIcon, {
37
37
  label: labelTextStyles,
38
38
  spacing: "spacious",
39
39
  color: "currentColor",
40
40
  LEGACY_fallbackIcon: TextStyleIconLegacy
41
41
  });
42
- const chevronIconSpacing = props.isSmall && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4') ? 'spacious' : 'none';
42
+ const chevronIconSpacing = expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && (props.isSmall && fg('platform_editor_controls_patch_4') || !props.isSmall && fg('platform_editor_controls_patch_13')) ? 'spacious' : 'none';
43
+ const shouldUseIconAsButton = props.isSmall || expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && fg('platform_editor_controls_patch_13');
43
44
  return jsx(ToolbarButton, {
44
45
  spacing: props.isReducedSpacing ? 'none' : 'default',
45
46
  selected: props.selected
@@ -57,16 +58,17 @@ export const BlockTypeButton = props => {
57
58
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
58
59
  css: [wrapperStyle, props.isSmall && wrapperSmallStyle],
59
60
  "data-testid": "toolbar-block-type-text-styles-icon"
60
- }, jsx(React.Fragment, null, props.isSmall && icon, jsx("span", {
61
+ }, jsx(React.Fragment, null, shouldUseIconAsButton && icon, jsx("span", {
61
62
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
62
63
  css: expandIconContainerStyle
63
64
  }, jsx(ChevronDownIcon, {
64
65
  spacing: chevronIconSpacing,
65
66
  label: "",
66
67
  color: "currentColor",
67
- LEGACY_margin: "0 0 0 -8px"
68
+ LEGACY_margin: "0 0 0 -8px",
69
+ size: "small"
68
70
  }))))
69
- }, !props.isSmall && jsx(Box, {
71
+ }, !shouldUseIconAsButton && jsx(Box, {
70
72
  xcss: [buttonContentStyle, props.isReducedSpacing && buttonContentReducedSpacingStyle]
71
73
  }, jsx(FormattedMessage
72
74
  // Ignored via go/ees005
@@ -10,12 +10,12 @@ import { FormattedMessage } from 'react-intl-next';
10
10
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
11
11
  import { expandIconContainerStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
12
12
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
13
+ import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
13
14
  import TextIcon from '@atlaskit/icon/core/text';
14
15
  import { default as TextStyleIconLegacy } from '@atlaskit/icon/glyph/editor/text-style';
15
- import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { Box, xcss } from '@atlaskit/primitives';
18
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
19
19
  import { NORMAL_TEXT } from '../../block-types';
20
20
  import { wrapperSmallStyle } from './styled';
21
21
  var buttonContentStyle = xcss({
@@ -33,13 +33,14 @@ export var BlockTypeButton = function BlockTypeButton(props) {
33
33
  blockTypeName: blockTypeName
34
34
  });
35
35
  var toolipTextStyles = props.formatMessage(toolbarMessages.textStylesTooltip);
36
- var icon = editorExperiment('platform_editor_controls', 'variant1') && props.blockTypeIcon ? props.blockTypeIcon : jsx(TextIcon, {
36
+ var icon = expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && props.blockTypeIcon ? props.blockTypeIcon : jsx(TextIcon, {
37
37
  label: labelTextStyles,
38
38
  spacing: "spacious",
39
39
  color: "currentColor",
40
40
  LEGACY_fallbackIcon: TextStyleIconLegacy
41
41
  });
42
- var chevronIconSpacing = props.isSmall && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4') ? 'spacious' : 'none';
42
+ var chevronIconSpacing = expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && (props.isSmall && fg('platform_editor_controls_patch_4') || !props.isSmall && fg('platform_editor_controls_patch_13')) ? 'spacious' : 'none';
43
+ var shouldUseIconAsButton = props.isSmall || expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') && fg('platform_editor_controls_patch_13');
43
44
  return jsx(ToolbarButton, {
44
45
  spacing: props.isReducedSpacing ? 'none' : 'default',
45
46
  selected: props.selected
@@ -57,16 +58,17 @@ export var BlockTypeButton = function BlockTypeButton(props) {
57
58
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
58
59
  css: [wrapperStyle, props.isSmall && wrapperSmallStyle],
59
60
  "data-testid": "toolbar-block-type-text-styles-icon"
60
- }, jsx(React.Fragment, null, props.isSmall && icon, jsx("span", {
61
+ }, jsx(React.Fragment, null, shouldUseIconAsButton && icon, jsx("span", {
61
62
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
62
63
  css: expandIconContainerStyle
63
64
  }, jsx(ChevronDownIcon, {
64
65
  spacing: chevronIconSpacing,
65
66
  label: "",
66
67
  color: "currentColor",
67
- LEGACY_margin: "0 0 0 -8px"
68
+ LEGACY_margin: "0 0 0 -8px",
69
+ size: "small"
68
70
  }))))
69
- }, !props.isSmall && jsx(Box, {
71
+ }, !shouldUseIconAsButton && jsx(Box, {
70
72
  xcss: [buttonContentStyle, props.isReducedSpacing && buttonContentReducedSpacingStyle]
71
73
  }, jsx(FormattedMessage
72
74
  // Ignored via go/ees005
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "5.1.24",
3
+ "version": "5.1.26",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@atlaskit/adf-schema": "^47.6.0",
39
- "@atlaskit/editor-common": "^106.5.0",
39
+ "@atlaskit/editor-common": "^106.6.0",
40
40
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
41
41
  "@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
42
42
  "@atlaskit/editor-plugin-selection-toolbar": "^3.6.0",
@@ -44,12 +44,12 @@
44
44
  "@atlaskit/editor-shared-styles": "^3.4.0",
45
45
  "@atlaskit/editor-tables": "^2.9.0",
46
46
  "@atlaskit/icon": "^26.4.0",
47
- "@atlaskit/icon-lab": "^4.18.0",
47
+ "@atlaskit/icon-lab": "^4.19.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/primitives": "^14.8.0",
50
50
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
51
51
  "@atlaskit/theme": "^18.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^6.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^7.0.0",
53
53
  "@atlaskit/tokens": "^5.1.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1"
@@ -117,6 +117,9 @@
117
117
  "platform_editor_controls_patch_10": {
118
118
  "type": "boolean"
119
119
  },
120
+ "platform_editor_controls_patch_13": {
121
+ "type": "boolean"
122
+ },
120
123
  "platform_editor_comments_toolbar_responsiveness": {
121
124
  "type": "boolean"
122
125
  },