@atlaskit/editor-common 127.0.0 → 127.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,28 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 127.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4b7d3cc53594a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b7d3cc53594a) -
8
+ Enable avatar mentions for the person and all cohorts of convo_ai_entity_hover_cards_non_hello_exp
9
+ alongside the existing editor avatar experiments. Make the avatar provider available in Chat for
10
+ these cohorts, regardless of mention source. Other cohorts retain the existing rollout checks.
11
+
12
+ ## 127.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`457c77d8f6992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/457c77d8f6992) -
17
+ Behind `platform-dst-top-layer-tooltip`: tooltips whose content changes on press (for example
18
+ "Copy" to "Copied!") stay open to show the new content. `@atlaskit/editor-common` floating toolbar
19
+ buttons and `@atlaskit/smart-card` stack-item actions add an optional
20
+ `hasNewContentOnTriggerClick` prop.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 127.0.0
4
27
 
5
28
  ### Major Changes
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "126.4.4";
30
+ var packageVersion = "127.1.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -139,7 +139,8 @@ var SortingIcon = function SortingIcon(_ref) {
139
139
  return (0, _react.jsx)(_Tooltip.default, {
140
140
  delay: 0,
141
141
  content: content,
142
- position: "top"
142
+ position: "top",
143
+ hasNewContentOnTriggerClick: true
143
144
  }, (0, _react.jsx)("div", {
144
145
  css: [buttonStyles, (0, _expValEquals.expValEquals)('confluence_live_doc_table_sort_bugfix', 'isEnabled', true) && sortButtonElevatedStyles]
145
146
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "126.4.4";
27
+ var packageVersion = "127.1.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -49,6 +49,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
49
49
  interactionName = _ref.interactionName,
50
50
  _ref$hideTooltipOnCli = _ref.hideTooltipOnClick,
51
51
  hideTooltipOnClick = _ref$hideTooltipOnCli === void 0 ? true : _ref$hideTooltipOnCli,
52
+ hasNewContentOnTriggerClick = _ref.hasNewContentOnTriggerClick,
52
53
  ariaHasPopup = _ref.ariaHasPopup,
53
54
  tabIndex = _ref.tabIndex,
54
55
  areaControls = _ref.areaControls,
@@ -82,6 +83,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
82
83
  content: tooltipContent || (iconOnly ? title : undefined),
83
84
  component: tooltipStyle,
84
85
  hideTooltipOnClick: hideTooltipOnClick,
86
+ hasNewContentOnTriggerClick: hasNewContentOnTriggerClick,
85
87
  position: "top"
86
88
  }, /*#__PURE__*/_react.default.createElement("div", {
87
89
  onMouseEnter: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
@@ -13,6 +13,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
13
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireWildcard(require("react"));
16
+ var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
16
17
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
17
18
  var _fg = require("@atlaskit/platform-feature-flags/fg");
18
19
  var _providerFactory = require("../../provider-factory");
@@ -42,7 +43,8 @@ var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
42
43
  profilecardProvider = providers.profilecardProvider;
43
44
  var hasProvider = Boolean(mentionNodeDataProvider);
44
45
  var canReportMissingProvider = !hasProvider && (0, _fg.fg)('platform_editor_mention_avatar_observability');
45
- var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_graphql_provider'));
46
+ var cohort = (0, _expVal.expVal)('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
47
+ var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_graphql_provider'));
46
48
  if (isAvatarEnabled && mentionNodeDataProvider) {
47
49
  return /*#__PURE__*/_react.default.createElement(_mentionWithProviders.MentionWithAvatarProviders, {
48
50
  id: id,
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "126.4.4";
16
+ const packageVersion = "127.1.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -172,7 +172,8 @@ const SortingIcon = ({
172
172
  return jsx(Tooltip, {
173
173
  delay: 0,
174
174
  content: content,
175
- position: "top"
175
+ position: "top",
176
+ hasNewContentOnTriggerClick: true
176
177
  }, jsx("div", {
177
178
  css: [buttonStyles, expValEquals('confluence_live_doc_table_sort_bugfix', 'isEnabled', true) && sortButtonElevatedStyles]
178
179
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "126.4.4";
17
+ const packageVersion = "127.1.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -32,6 +32,7 @@ const FloatingToolbarButton = ({
32
32
  testId,
33
33
  interactionName,
34
34
  hideTooltipOnClick = true,
35
+ hasNewContentOnTriggerClick,
35
36
  ariaHasPopup,
36
37
  tabIndex,
37
38
  areaControls,
@@ -64,6 +65,7 @@ const FloatingToolbarButton = ({
64
65
  content: tooltipContent || (iconOnly ? title : undefined),
65
66
  component: tooltipStyle,
66
67
  hideTooltipOnClick: hideTooltipOnClick,
68
+ hasNewContentOnTriggerClick: hasNewContentOnTriggerClick,
67
69
  position: "top"
68
70
  }, /*#__PURE__*/React.createElement("div", {
69
71
  onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /* eslint-disable @repo/internal/react/no-class-components */
3
3
 
4
4
  import React, { PureComponent } from 'react';
5
+ import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
5
6
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
7
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
8
  import { ProviderFactory, WithProviders } from '../../provider-factory';
@@ -29,7 +30,8 @@ export default class Mention extends PureComponent {
29
30
  } = providers;
30
31
  const hasProvider = Boolean(mentionNodeDataProvider);
31
32
  const canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
32
- const isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
33
+ const cohort = expVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
34
+ const isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
33
35
  if (isAvatarEnabled && mentionNodeDataProvider) {
34
36
  return /*#__PURE__*/React.createElement(MentionWithAvatarProviders, {
35
37
  id: id,
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "126.4.4";
22
+ var packageVersion = "127.1.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -128,7 +128,8 @@ var SortingIcon = function SortingIcon(_ref) {
128
128
  return jsx(Tooltip, {
129
129
  delay: 0,
130
130
  content: content,
131
- position: "top"
131
+ position: "top",
132
+ hasNewContentOnTriggerClick: true
132
133
  }, jsx("div", {
133
134
  css: [buttonStyles, expValEquals('confluence_live_doc_table_sort_bugfix', 'isEnabled', true) && sortButtonElevatedStyles]
134
135
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "126.4.4";
24
+ var packageVersion = "127.1.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -40,6 +40,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
40
40
  interactionName = _ref.interactionName,
41
41
  _ref$hideTooltipOnCli = _ref.hideTooltipOnClick,
42
42
  hideTooltipOnClick = _ref$hideTooltipOnCli === void 0 ? true : _ref$hideTooltipOnCli,
43
+ hasNewContentOnTriggerClick = _ref.hasNewContentOnTriggerClick,
43
44
  ariaHasPopup = _ref.ariaHasPopup,
44
45
  tabIndex = _ref.tabIndex,
45
46
  areaControls = _ref.areaControls,
@@ -73,6 +74,7 @@ var FloatingToolbarButton = function FloatingToolbarButton(_ref, forwardedRef) {
73
74
  content: tooltipContent || (iconOnly ? title : undefined),
74
75
  component: tooltipStyle,
75
76
  hideTooltipOnClick: hideTooltipOnClick,
77
+ hasNewContentOnTriggerClick: hasNewContentOnTriggerClick,
76
78
  position: "top"
77
79
  }, /*#__PURE__*/React.createElement("div", {
78
80
  onMouseEnter: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? undefined : onMouseEnter,
@@ -9,6 +9,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
9
9
  /* eslint-disable @repo/internal/react/no-class-components */
10
10
 
11
11
  import React, { PureComponent } from 'react';
12
+ import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
12
13
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
13
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
14
15
  import { ProviderFactory, WithProviders } from '../../provider-factory';
@@ -35,7 +36,8 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
35
36
  profilecardProvider = providers.profilecardProvider;
36
37
  var hasProvider = Boolean(mentionNodeDataProvider);
37
38
  var canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
38
- var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
39
+ var cohort = expVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
40
+ var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
39
41
  if (isAvatarEnabled && mentionNodeDataProvider) {
40
42
  return /*#__PURE__*/React.createElement(MentionWithAvatarProviders, {
41
43
  id: id,
@@ -164,6 +164,8 @@ export type FloatingToolbarButton<T extends object> = {
164
164
  /** If true, the component will have pulse onboarding effect around it. */
165
165
  pulse?: boolean;
166
166
  selected?: boolean;
167
+ /** Keep the tooltip open when the button is pressed. Set it when a press changes the tooltip content. */
168
+ hasNewContentOnTriggerClick?: boolean;
167
169
  showTitle?: boolean;
168
170
  supportsViewMode?: boolean;
169
171
  tabIndex?: number | null | undefined;
@@ -27,6 +27,8 @@ export interface Props {
27
27
  /** If true, the component will have pulse onboarding effect around it. */
28
28
  pulse?: boolean;
29
29
  selected?: boolean;
30
+ /** Keep the tooltip open when the button is pressed. Set it when a press changes the tooltip content. */
31
+ hasNewContentOnTriggerClick?: boolean;
30
32
  tabIndex?: number | null | undefined;
31
33
  target?: string;
32
34
  testId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "127.0.0",
3
+ "version": "127.1.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/codemod-utils": "^5.1.0",
42
42
  "@atlaskit/css": "^1.1.0",
43
43
  "@atlaskit/custom-steps": "^1.1.0",
44
- "@atlaskit/dropdown-menu": "^20.0.0",
44
+ "@atlaskit/dropdown-menu": "^21.0.0",
45
45
  "@atlaskit/editor-json-transformer": "^10.0.0",
46
46
  "@atlaskit/editor-palette": "^3.5.0",
47
47
  "@atlaskit/editor-prosemirror": "^9.0.0",
@@ -79,7 +79,7 @@
79
79
  "@atlaskit/react-compiler-gating": "^0.2.0",
80
80
  "@atlaskit/react-ufo": "^8.0.0",
81
81
  "@atlaskit/section-message": "^10.2.0",
82
- "@atlaskit/smart-card": "^46.2.0",
82
+ "@atlaskit/smart-card": "^46.3.0",
83
83
  "@atlaskit/smart-user-picker": "^12.1.0",
84
84
  "@atlaskit/spinner": "^20.4.0",
85
85
  "@atlaskit/task-decision": "^21.11.0",
@@ -87,7 +87,7 @@
87
87
  "@atlaskit/textfield": "^10.2.0",
88
88
  "@atlaskit/tmp-editor-statsig": "^219.0.0",
89
89
  "@atlaskit/tokens": "^20.1.0",
90
- "@atlaskit/tooltip": "^24.3.0",
90
+ "@atlaskit/tooltip": "^24.4.0",
91
91
  "@atlaskit/width-detector": "^7.2.0",
92
92
  "@babel/runtime": "^7.0.0",
93
93
  "@compiled/react": "^1.0.2",