@atlaskit/renderer 136.2.2 → 136.2.4

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,23 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 136.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b6733d7c1b79e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b6733d7c1b79e) -
8
+ [ux] Updated styles for collapsible headings to ensure any element with height set via inline
9
+ style is not taking space when heading is collapsed.
10
+ - Updated dependencies
11
+
12
+ ## 136.2.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [`9e4a665de419a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9e4a665de419a) -
17
+ Clean up of expriment flag `platform_editor_preview_panel_linking_exp_conf` and
18
+ `platform_editor_preview_panel_linking_exp_jira`.
19
+ - Updated dependencies
20
+
3
21
  ## 136.2.2
4
22
 
5
23
  ### Patch Changes
@@ -17,8 +17,6 @@ var _ssr = require("@atlaskit/smart-card/ssr");
17
17
  var _ui = require("@atlaskit/editor-common/ui");
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
19
  var _analyticsNext = require("@atlaskit/analytics-next");
20
- var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
21
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
22
20
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
21
  var _analytics = require("@atlaskit/editor-common/analytics");
24
22
  var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
@@ -41,11 +39,6 @@ var _linkExtractors = require("@atlaskit/link-extractors");
41
39
  var HoverLinkOverlayNoop = function HoverLinkOverlayNoop(props) {
42
40
  return (0, _react2.jsx)(_react.Fragment, null, props.children);
43
41
  };
44
- var HoverLinkOverlayWithCondition = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
45
- return (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
46
- exposure: true
47
- });
48
- }, _ui.HoverLinkOverlay, HoverLinkOverlayNoop);
49
42
  var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
50
43
  var _cardContext$value2, _cardContext$value3, _cardContext$value3$i, _cardContext$value4;
51
44
  var rendererAppearance = _ref.rendererAppearance,
@@ -106,7 +99,7 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
106
99
  // When inside preview panel iframe, hide the overlay button
107
100
  var isInPreviewPanel = (0, _utils.isWithinPreviewPanelIFrame)();
108
101
  var showPanelButton = isInPreviewPanel ? isPreviewPanelAvailable : isPreviewAvailable;
109
- var Overlay = isPreviewAvailable ? HoverLinkOverlayWithCondition : HoverLinkOverlayNoop;
102
+ var Overlay = isPreviewAvailable ? _ui.HoverLinkOverlay : HoverLinkOverlayNoop;
110
103
  return (0, _react2.jsx)(Overlay, {
111
104
  isVisible: isResolvedViewRendered,
112
105
  url: url,
@@ -130,17 +123,13 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
130
123
  embedUrl: (0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = (0, _linkExtractors.extractSmartLinkEmbed)(cardState === null || cardState === void 0 ? void 0 : cardState.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
131
124
  }
132
125
  });
133
- (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
134
- exposure: true
135
- }) && fireHoverLabelAEP('panel');
126
+ fireHoverLabelAEP('panel');
136
127
  } else if (isPreviewModalAvailable) {
137
128
  event.preventDefault();
138
129
  if (preview) {
139
130
  preview.invoke();
140
131
  }
141
- (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
142
- exposure: true
143
- }) && fireHoverLabelAEP('modal');
132
+ fireHoverLabelAEP('modal');
144
133
  }
145
134
  }
146
135
  }, children);
@@ -228,52 +217,7 @@ var InlineCard = function InlineCard(props) {
228
217
  }
229
218
  }, [provider, url]);
230
219
  var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
231
- if ((ssr || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !(0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
232
- exposure: true
233
- })) {
234
- if (
235
- // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
236
- (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
237
- return (0, _react2.jsx)(_editorSmartLinkDraggable.SmartLinkDraggable, {
238
- url: url,
239
- appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.INLINE,
240
- source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.RENDERER
241
- }, (0, _react2.jsx)("span", (0, _extends2.default)({
242
- "data-inline-card": true
243
- // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
244
- ,
245
- "data-card-data": data ? JSON.stringify(data) : undefined,
246
- "data-card-url": url
247
- // Ignored via go/ees005
248
- // eslint-disable-next-line react/jsx-props-no-spreading
249
- }, inlineAnnotationProps), (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
250
- data: analyticsData
251
- }, wrapWithSuspense((0, _react2.jsx)(_ssr.CardSSR, {
252
- appearance: "inline",
253
- url: url,
254
- showHoverPreview: !hideHoverPreview,
255
- actionOptions: actionOptions,
256
- onClick: onClick,
257
- resolvingPlaceholder: resolvingPlaceholder
258
- })))));
259
- }
260
- return (0, _react2.jsx)(_editorSmartLinkDraggable.SmartLinkDraggable, {
261
- url: url,
262
- appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.INLINE,
263
- source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.RENDERER
264
- }, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
265
- data: analyticsData
266
- }, wrapWithSuspense((0, _react2.jsx)(_ssr.CardSSR, {
267
- appearance: "inline",
268
- url: url,
269
- showHoverPreview: !hideHoverPreview,
270
- actionOptions: actionOptions,
271
- onClick: onClick,
272
- resolvingPlaceholder: resolvingPlaceholder
273
- })), CompetitorPromptComponent));
274
- } else if ((ssr || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
275
- exposure: true
276
- })) {
220
+ if ((ssr || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url) {
277
221
  if (
278
222
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
279
223
  (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
@@ -398,10 +342,10 @@ var InlineCard = function InlineCard(props) {
398
342
  setIsResolvedViewRendered(true);
399
343
  }
400
344
  },
401
- onError: onError,
402
- disablePreviewPanel: (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
403
- exposure: true
404
- })
345
+ onError: onError
346
+ // Setting disablePreviewPanel={true} leaves the overlay button as the only way to open the panel.
347
+ ,
348
+ disablePreviewPanel: true
405
349
  })))), CompetitorPromptComponent))));
406
350
  };
407
351
  var _default_1 = (0, _SmartCardStorage.withSmartCardStorage)(InlineCard);
@@ -99,10 +99,17 @@ var baseStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProper
99
99
  clear: 'both'
100
100
  }), ".".concat(_consts.RendererCssClassName.DOCUMENT), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "> [".concat(_collapsibleHeadingsDom.COLLAPSED_CONTENT_OWNERS_ATTRIBUTE, "][hidden='until-found']"), {
101
101
  display: 'block',
102
- minBlockSize: 0,
103
- marginBlock: 0,
104
- paddingBlock: 0,
105
- borderBlockWidth: 0
102
+ // `hidden='until-found'` maps to `content-visibility: hidden`, which skips the element's
103
+ // contents but keeps its own box, sized by its own specified sizes. Everything below
104
+ // needs `!important` because extension nodes are sized and spaced by declarations that
105
+ // would otherwise win: an inline `height`/`min-height` reserving macro height (see
106
+ // `react/nodes/extension.tsx`), and `!important` alignment margins from
107
+ // `@atlaskit/native-embeds-common`. Without it the collapsed section keeps a visible gap.
108
+ blockSize: '0 !important',
109
+ minBlockSize: '0 !important',
110
+ marginBlock: '0 !important',
111
+ paddingBlock: '0 !important',
112
+ borderBlockWidth: '0 !important'
106
113
  }), ".".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
107
114
  height: '22px',
108
115
  transform: "translateY(-2px)"
@@ -2287,7 +2294,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
2287
2294
  }),
2288
2295
  css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) && fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true))) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, (0, _expValEquals.expValEquals)('platform_editor_flexible_list_schema', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
2289
2296
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2290
- textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
2297
+ textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
2291
2298
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2292
2299
  (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, !(0, _expValEquals.expValEquals)('platform_editor_flex_based_centering', 'isEnabled', true) && extensionCenterAlignLegacyStyles,
2293
2300
  // this should be placed after baseOtherStyles
@@ -74,7 +74,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
74
74
  var TABLE_INFO_TIMEOUT = 10000;
75
75
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
76
76
  var packageName = "@atlaskit/renderer";
77
- var packageVersion = "136.2.1";
77
+ var packageVersion = "136.2.3";
78
78
  var setAsQueryContainerStyles = (0, _react2.css)({
79
79
  containerName: 'ak-renderer-wrapper',
80
80
  containerType: 'inline-size'
@@ -15,8 +15,6 @@ import { CardSSR } from '@atlaskit/smart-card/ssr';
15
15
  import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { AnalyticsContext } from '@atlaskit/analytics-next';
18
- import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
19
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
20
18
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
21
19
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
22
20
  import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
@@ -29,9 +27,6 @@ import { useInlineAnnotationProps } from '../../ui/annotations/element/useInline
29
27
  import { usePortal } from '../../ui/Renderer/PortalContext';
30
28
  import { extractSmartLinkEmbed } from '@atlaskit/link-extractors';
31
29
  const HoverLinkOverlayNoop = props => jsx(Fragment, null, props.children);
32
- const HoverLinkOverlayWithCondition = componentWithCondition(() => editorExperiment('platform_editor_preview_panel_linking_exp', true, {
33
- exposure: true
34
- }), HoverLinkOverlay, HoverLinkOverlayNoop);
35
30
  const OverlayWithCardContext = ({
36
31
  rendererAppearance,
37
32
  isResolvedViewRendered,
@@ -89,7 +84,7 @@ const OverlayWithCardContext = ({
89
84
  // When inside preview panel iframe, hide the overlay button
90
85
  const isInPreviewPanel = isWithinPreviewPanelIFrame();
91
86
  const showPanelButton = isInPreviewPanel ? isPreviewPanelAvailable : isPreviewAvailable;
92
- const Overlay = isPreviewAvailable ? HoverLinkOverlayWithCondition : HoverLinkOverlayNoop;
87
+ const Overlay = isPreviewAvailable ? HoverLinkOverlay : HoverLinkOverlayNoop;
93
88
  return jsx(Overlay, {
94
89
  isVisible: isResolvedViewRendered,
95
90
  url: url,
@@ -113,17 +108,13 @@ const OverlayWithCardContext = ({
113
108
  embedUrl: expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = extractSmartLinkEmbed(cardState === null || cardState === void 0 ? void 0 : cardState.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
114
109
  }
115
110
  });
116
- editorExperiment('platform_editor_preview_panel_linking_exp', true, {
117
- exposure: true
118
- }) && fireHoverLabelAEP('panel');
111
+ fireHoverLabelAEP('panel');
119
112
  } else if (isPreviewModalAvailable) {
120
113
  event.preventDefault();
121
114
  if (preview) {
122
115
  preview.invoke();
123
116
  }
124
- editorExperiment('platform_editor_preview_panel_linking_exp', true, {
125
- exposure: true
126
- }) && fireHoverLabelAEP('modal');
117
+ fireHoverLabelAEP('modal');
127
118
  }
128
119
  }
129
120
  }, children);
@@ -213,52 +204,7 @@ const InlineCard = props => {
213
204
  }
214
205
  }, [provider, url]);
215
206
  const MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
216
- if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !editorExperiment('platform_editor_preview_panel_linking_exp', true, {
217
- exposure: true
218
- })) {
219
- if (
220
- // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
221
- fg('editor_inline_comments_on_inline_nodes')) {
222
- return jsx(SmartLinkDraggable, {
223
- url: url,
224
- appearance: SMART_LINK_APPEARANCE.INLINE,
225
- source: SMART_LINK_DRAG_TYPES.RENDERER
226
- }, jsx("span", _extends({
227
- "data-inline-card": true
228
- // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
229
- ,
230
- "data-card-data": data ? JSON.stringify(data) : undefined,
231
- "data-card-url": url
232
- // Ignored via go/ees005
233
- // eslint-disable-next-line react/jsx-props-no-spreading
234
- }, inlineAnnotationProps), jsx(AnalyticsContext, {
235
- data: analyticsData
236
- }, wrapWithSuspense(jsx(CardSSR, {
237
- appearance: "inline",
238
- url: url,
239
- showHoverPreview: !hideHoverPreview,
240
- actionOptions: actionOptions,
241
- onClick: onClick,
242
- resolvingPlaceholder: resolvingPlaceholder
243
- })))));
244
- }
245
- return jsx(SmartLinkDraggable, {
246
- url: url,
247
- appearance: SMART_LINK_APPEARANCE.INLINE,
248
- source: SMART_LINK_DRAG_TYPES.RENDERER
249
- }, jsx(AnalyticsContext, {
250
- data: analyticsData
251
- }, wrapWithSuspense(jsx(CardSSR, {
252
- appearance: "inline",
253
- url: url,
254
- showHoverPreview: !hideHoverPreview,
255
- actionOptions: actionOptions,
256
- onClick: onClick,
257
- resolvingPlaceholder: resolvingPlaceholder
258
- })), CompetitorPromptComponent));
259
- } else if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
260
- exposure: true
261
- })) {
207
+ if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url) {
262
208
  if (
263
209
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
264
210
  fg('editor_inline_comments_on_inline_nodes')) {
@@ -383,10 +329,10 @@ const InlineCard = props => {
383
329
  setIsResolvedViewRendered(true);
384
330
  }
385
331
  },
386
- onError: onError,
387
- disablePreviewPanel: editorExperiment('platform_editor_preview_panel_linking_exp', true, {
388
- exposure: true
389
- })
332
+ onError: onError
333
+ // Setting disablePreviewPanel={true} leaves the overlay button as the only way to open the panel.
334
+ ,
335
+ disablePreviewPanel: true
390
336
  })))), CompetitorPromptComponent))));
391
337
  };
392
338
  const _default_1 = withSmartCardStorage(InlineCard);
@@ -90,10 +90,17 @@ const baseStyles = css({
90
90
  [`.${RendererCssClassName.DOCUMENT}`]: {
91
91
  [`> [${COLLAPSED_CONTENT_OWNERS_ATTRIBUTE}][hidden='until-found']`]: {
92
92
  display: 'block',
93
- minBlockSize: 0,
94
- marginBlock: 0,
95
- paddingBlock: 0,
96
- borderBlockWidth: 0
93
+ // `hidden='until-found'` maps to `content-visibility: hidden`, which skips the element's
94
+ // contents but keeps its own box, sized by its own specified sizes. Everything below
95
+ // needs `!important` because extension nodes are sized and spaced by declarations that
96
+ // would otherwise win: an inline `height`/`min-height` reserving macro height (see
97
+ // `react/nodes/extension.tsx`), and `!important` alignment margins from
98
+ // `@atlaskit/native-embeds-common`. Without it the collapsed section keeps a visible gap.
99
+ blockSize: '0 !important',
100
+ minBlockSize: '0 !important',
101
+ marginBlock: '0 !important',
102
+ paddingBlock: '0 !important',
103
+ borderBlockWidth: '0 !important'
97
104
  },
98
105
  // p, h3, and action items
99
106
  [`.${INLINE_IMAGE_WRAPPER_CLASS_NAME}`]: {
@@ -2913,7 +2920,7 @@ export const RendererStyleContainer = props => {
2913
2920
  },
2914
2921
  css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, expValEquals('platform_editor_flexible_list_schema', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
2915
2922
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2916
- textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
2923
+ textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
2917
2924
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2918
2925
  fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, !expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) && extensionCenterAlignLegacyStyles,
2919
2926
  // this should be placed after baseOtherStyles
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
60
60
  const TABLE_INFO_TIMEOUT = 10000;
61
61
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
62
62
  const packageName = "@atlaskit/renderer";
63
- const packageVersion = "136.2.1";
63
+ const packageVersion = "136.2.3";
64
64
  const setAsQueryContainerStyles = css({
65
65
  containerName: 'ak-renderer-wrapper',
66
66
  containerType: 'inline-size'
@@ -16,8 +16,6 @@ import { CardSSR } from '@atlaskit/smart-card/ssr';
16
16
  import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
18
  import { AnalyticsContext } from '@atlaskit/analytics-next';
19
- import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
20
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
22
20
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
23
21
  import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
@@ -32,11 +30,6 @@ import { extractSmartLinkEmbed } from '@atlaskit/link-extractors';
32
30
  var HoverLinkOverlayNoop = function HoverLinkOverlayNoop(props) {
33
31
  return jsx(Fragment, null, props.children);
34
32
  };
35
- var HoverLinkOverlayWithCondition = componentWithCondition(function () {
36
- return editorExperiment('platform_editor_preview_panel_linking_exp', true, {
37
- exposure: true
38
- });
39
- }, HoverLinkOverlay, HoverLinkOverlayNoop);
40
33
  var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
41
34
  var _cardContext$value2, _cardContext$value3, _cardContext$value3$i, _cardContext$value4;
42
35
  var rendererAppearance = _ref.rendererAppearance,
@@ -97,7 +90,7 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
97
90
  // When inside preview panel iframe, hide the overlay button
98
91
  var isInPreviewPanel = isWithinPreviewPanelIFrame();
99
92
  var showPanelButton = isInPreviewPanel ? isPreviewPanelAvailable : isPreviewAvailable;
100
- var Overlay = isPreviewAvailable ? HoverLinkOverlayWithCondition : HoverLinkOverlayNoop;
93
+ var Overlay = isPreviewAvailable ? HoverLinkOverlay : HoverLinkOverlayNoop;
101
94
  return jsx(Overlay, {
102
95
  isVisible: isResolvedViewRendered,
103
96
  url: url,
@@ -121,17 +114,13 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
121
114
  embedUrl: expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = extractSmartLinkEmbed(cardState === null || cardState === void 0 ? void 0 : cardState.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
122
115
  }
123
116
  });
124
- editorExperiment('platform_editor_preview_panel_linking_exp', true, {
125
- exposure: true
126
- }) && fireHoverLabelAEP('panel');
117
+ fireHoverLabelAEP('panel');
127
118
  } else if (isPreviewModalAvailable) {
128
119
  event.preventDefault();
129
120
  if (preview) {
130
121
  preview.invoke();
131
122
  }
132
- editorExperiment('platform_editor_preview_panel_linking_exp', true, {
133
- exposure: true
134
- }) && fireHoverLabelAEP('modal');
123
+ fireHoverLabelAEP('modal');
135
124
  }
136
125
  }
137
126
  }, children);
@@ -219,52 +208,7 @@ var InlineCard = function InlineCard(props) {
219
208
  }
220
209
  }, [provider, url]);
221
210
  var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
222
- if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && !editorExperiment('platform_editor_preview_panel_linking_exp', true, {
223
- exposure: true
224
- })) {
225
- if (
226
- // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
227
- fg('editor_inline_comments_on_inline_nodes')) {
228
- return jsx(SmartLinkDraggable, {
229
- url: url,
230
- appearance: SMART_LINK_APPEARANCE.INLINE,
231
- source: SMART_LINK_DRAG_TYPES.RENDERER
232
- }, jsx("span", _extends({
233
- "data-inline-card": true
234
- // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
235
- ,
236
- "data-card-data": data ? JSON.stringify(data) : undefined,
237
- "data-card-url": url
238
- // Ignored via go/ees005
239
- // eslint-disable-next-line react/jsx-props-no-spreading
240
- }, inlineAnnotationProps), jsx(AnalyticsContext, {
241
- data: analyticsData
242
- }, wrapWithSuspense(jsx(CardSSR, {
243
- appearance: "inline",
244
- url: url,
245
- showHoverPreview: !hideHoverPreview,
246
- actionOptions: actionOptions,
247
- onClick: onClick,
248
- resolvingPlaceholder: resolvingPlaceholder
249
- })))));
250
- }
251
- return jsx(SmartLinkDraggable, {
252
- url: url,
253
- appearance: SMART_LINK_APPEARANCE.INLINE,
254
- source: SMART_LINK_DRAG_TYPES.RENDERER
255
- }, jsx(AnalyticsContext, {
256
- data: analyticsData
257
- }, wrapWithSuspense(jsx(CardSSR, {
258
- appearance: "inline",
259
- url: url,
260
- showHoverPreview: !hideHoverPreview,
261
- actionOptions: actionOptions,
262
- onClick: onClick,
263
- resolvingPlaceholder: resolvingPlaceholder
264
- })), CompetitorPromptComponent));
265
- } else if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url && editorExperiment('platform_editor_preview_panel_linking_exp', true, {
266
- exposure: true
267
- })) {
211
+ if ((ssr || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url) {
268
212
  if (
269
213
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
270
214
  fg('editor_inline_comments_on_inline_nodes')) {
@@ -389,10 +333,10 @@ var InlineCard = function InlineCard(props) {
389
333
  setIsResolvedViewRendered(true);
390
334
  }
391
335
  },
392
- onError: onError,
393
- disablePreviewPanel: editorExperiment('platform_editor_preview_panel_linking_exp', true, {
394
- exposure: true
395
- })
336
+ onError: onError
337
+ // Setting disablePreviewPanel={true} leaves the overlay button as the only way to open the panel.
338
+ ,
339
+ disablePreviewPanel: true
396
340
  })))), CompetitorPromptComponent))));
397
341
  };
398
342
  var _default_1 = withSmartCardStorage(InlineCard);
@@ -92,10 +92,17 @@ var baseStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProp
92
92
  clear: 'both'
93
93
  }), ".".concat(RendererCssClassName.DOCUMENT), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "> [".concat(COLLAPSED_CONTENT_OWNERS_ATTRIBUTE, "][hidden='until-found']"), {
94
94
  display: 'block',
95
- minBlockSize: 0,
96
- marginBlock: 0,
97
- paddingBlock: 0,
98
- borderBlockWidth: 0
95
+ // `hidden='until-found'` maps to `content-visibility: hidden`, which skips the element's
96
+ // contents but keeps its own box, sized by its own specified sizes. Everything below
97
+ // needs `!important` because extension nodes are sized and spaced by declarations that
98
+ // would otherwise win: an inline `height`/`min-height` reserving macro height (see
99
+ // `react/nodes/extension.tsx`), and `!important` alignment margins from
100
+ // `@atlaskit/native-embeds-common`. Without it the collapsed section keeps a visible gap.
101
+ blockSize: '0 !important',
102
+ minBlockSize: '0 !important',
103
+ marginBlock: '0 !important',
104
+ paddingBlock: '0 !important',
105
+ borderBlockWidth: '0 !important'
99
106
  }), ".".concat(INLINE_IMAGE_WRAPPER_CLASS_NAME), {
100
107
  height: '22px',
101
108
  transform: "translateY(-2px)"
@@ -2280,7 +2287,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
2280
2287
  }),
2281
2288
  css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) && fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true))) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, expValEquals('platform_editor_flexible_list_schema', 'isEnabled', true) && listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
2282
2289
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2283
- textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
2290
+ textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
2284
2291
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2285
2292
  fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, !expValEquals('platform_editor_flex_based_centering', 'isEnabled', true) && extensionCenterAlignLegacyStyles,
2286
2293
  // this should be placed after baseOtherStyles
@@ -65,7 +65,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
65
65
  var TABLE_INFO_TIMEOUT = 10000;
66
66
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
67
67
  var packageName = "@atlaskit/renderer";
68
- var packageVersion = "136.2.1";
68
+ var packageVersion = "136.2.3";
69
69
  var setAsQueryContainerStyles = css({
70
70
  containerName: 'ak-renderer-wrapper',
71
71
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "136.2.2",
3
+ "version": "136.2.4",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/feature-gate-js-client": "^6.0.0",
51
51
  "@atlaskit/icon": "^37.5.0",
52
52
  "@atlaskit/link": "^5.1.0",
53
- "@atlaskit/link-datasource": "^6.6.0",
53
+ "@atlaskit/link-datasource": "^6.7.0",
54
54
  "@atlaskit/link-extractors": "^4.1.0",
55
55
  "@atlaskit/linking-common": "^12.0.0",
56
56
  "@atlaskit/media-card": "^81.7.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/status": "^5.8.0",
71
71
  "@atlaskit/task-decision": "^21.8.0",
72
72
  "@atlaskit/theme": "^28.1.0",
73
- "@atlaskit/tmp-editor-statsig": "^157.0.0",
73
+ "@atlaskit/tmp-editor-statsig": "^158.0.0",
74
74
  "@atlaskit/tokens": "^16.8.0",
75
75
  "@atlaskit/tooltip": "^24.2.0",
76
76
  "@atlaskit/visually-hidden": "^4.3.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^3.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^119.15.0",
88
+ "@atlaskit/editor-common": "^119.16.0",
89
89
  "@atlaskit/link-provider": "^5.4.0",
90
90
  "@atlaskit/media-core": "^38.0.0",
91
91
  "react": "^18.2.0",
@@ -105,11 +105,11 @@
105
105
  "@atlaskit/mention": "^27.18.0",
106
106
  "@atlaskit/modal-dialog": "^16.5.0",
107
107
  "@atlaskit/navigation-system": "^10.16.0",
108
- "@atlaskit/profilecard": "^26.18.0",
108
+ "@atlaskit/profilecard": "^26.19.0",
109
109
  "@atlaskit/side-nav-items": "^2.3.0",
110
110
  "@atlaskit/util-data-test": "^19.1.0",
111
- "@atlassian/a11y-jest-testing": "^0.16.0",
112
- "@atlassian/a11y-playwright-testing": "^0.11.0",
111
+ "@atlassian/a11y-jest-testing": "^0.17.0",
112
+ "@atlassian/a11y-playwright-testing": "^0.12.0",
113
113
  "@atlassian/experiment-test-utils": "^0.2.0",
114
114
  "@atlassian/feature-flags-test-utils": "^1.2.0",
115
115
  "@atlassian/structured-docs-types": "workspace:^",