@atlaskit/renderer 153.2.15 → 153.2.16

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,19 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 153.2.16
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1ce7034c443be`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ce7034c443be) -
8
+ Remove the `platform_ssr_smartlink_embeds` gate, preserving enabled behavior. Embed cards use
9
+ server-side rendering when `smartLinks.ssr` is enabled and a URL is available.
10
+ - [`4e1cc6af54d56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e1cc6af54d56) -
11
+ Make the renderer analytics callback depend only on `createAnalyticsEvent`, preserving the enabled
12
+ behavior of `platform_renderer_fix_analytics_memo_callback`. Remove the experiment registration
13
+ and test override. Consumers must stop referencing the removed experiment key; the renderer now
14
+ always uses the memoization fix.
15
+ - Updated dependencies
16
+
3
17
  ## 153.2.15
4
18
 
5
19
  ### Patch Changes
@@ -17,7 +17,6 @@ var _constants = require("@atlaskit/editor-shared-styles/constants");
17
17
  var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
18
18
  var _context = require("@atlaskit/link-provider/context");
19
19
  var _componentWithCondition = require("@atlaskit/platform-feature-flags-react/component-with-condition");
20
- var _fg = require("@atlaskit/platform-feature-flags/fg");
21
20
  var _lazy = require("@atlaskit/smart-card/card/lazy");
22
21
  var _embedResizeMessageListener = require("@atlaskit/smart-card/embed-resize-message-listener");
23
22
  var _ssr = require("@atlaskit/smart-card/ssr");
@@ -166,7 +165,7 @@ function EmbedCardInternal(props) {
166
165
  }
167
166
  };
168
167
  var cardComponent;
169
- if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url && (0, _fg.fg)('platform_ssr_smartlink_embeds')) {
168
+ if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url) {
170
169
  var _smartLinks$frameStyl2;
171
170
  var ssrCardProps = {
172
171
  url: url,
@@ -35,7 +35,6 @@ var _shouldForceTracking = require("@atlaskit/editor-common/utils/should-force-t
35
35
  var _WidthProvider = require("@atlaskit/editor-common/WidthProvider");
36
36
  var _WithCreateAnalyticsEvent = require("@atlaskit/editor-common/WithCreateAnalyticsEvent");
37
37
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
38
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
39
38
  var _analyticsContext = _interopRequireDefault(require("../../analytics/analyticsContext"));
40
39
  var _events = require("../../analytics/events");
41
40
  var _react3 = _interopRequireDefault(require("../../react"));
@@ -80,7 +79,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
80
79
  var TABLE_INFO_TIMEOUT = 10000;
81
80
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
82
81
  var packageName = "@atlaskit/renderer";
83
- var packageVersion = "153.2.14";
82
+ var packageVersion = "153.2.15";
84
83
  var setAsQueryContainerStyles = (0, _react2.css)({
85
84
  containerName: 'ak-renderer-wrapper',
86
85
  containerType: 'inline-size'
@@ -217,22 +216,12 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
217
216
  };
218
217
  };
219
218
  }, [nestedRendererType]);
220
- var fireAnalyticsEventOld = (0, _react.useCallback)(function (event) {
221
- var createAnalyticsEvent = props.createAnalyticsEvent;
222
- if (createAnalyticsEvent) {
223
- var channel = _types.FabricChannel.editor;
224
- createAnalyticsEvent(event).fire(channel);
225
- }
226
- }, [props]);
227
- var fireAnalyticsEventNew = (0, _react.useCallback)(function (event) {
219
+ var _fireAnalyticsEvent = (0, _react.useCallback)(function (event) {
228
220
  if (createAnalyticsEvent) {
229
221
  var channel = _types.FabricChannel.editor;
230
222
  createAnalyticsEvent(event).fire(channel);
231
223
  }
232
224
  }, [createAnalyticsEvent]);
233
- var _fireAnalyticsEvent = (0, _editorExperiment.editorExperiment)('platform_renderer_fix_analytics_memo_callback', true, {
234
- exposure: true
235
- }) ? fireAnalyticsEventNew : fireAnalyticsEventOld;
236
225
  var deriveSerializerProps = (0, _react.useCallback)(function (props) {
237
226
  var _props$startPos, _props$isPerformanceM;
238
227
  var stickyHeaders = props.stickyHeaders ? props.stickyHeaders === true ? {} : props.stickyHeaders : undefined;
@@ -16,7 +16,6 @@ import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFul
16
16
  import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
17
17
  import { SmartCardContext } from '@atlaskit/link-provider/context';
18
18
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
19
- import { fg } from '@atlaskit/platform-feature-flags/fg';
20
19
  import { Card } from '@atlaskit/smart-card/card/lazy';
21
20
  import { EmbedResizeMessageListener } from '@atlaskit/smart-card/embed-resize-message-listener';
22
21
  import { CardSSR } from '@atlaskit/smart-card/ssr';
@@ -154,7 +153,7 @@ function EmbedCardInternal(props) {
154
153
  }
155
154
  };
156
155
  let cardComponent;
157
- if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url && fg('platform_ssr_smartlink_embeds')) {
156
+ if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url) {
158
157
  var _smartLinks$frameStyl2;
159
158
  const ssrCardProps = {
160
159
  url,
@@ -29,7 +29,6 @@ import { shouldForceTracking } from '@atlaskit/editor-common/utils/should-force-
29
29
  import { WidthProvider } from '@atlaskit/editor-common/WidthProvider';
30
30
  import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/WithCreateAnalyticsEvent';
31
31
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
32
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
33
32
  import AnalyticsContext from '../../analytics/analyticsContext';
34
33
  import { MODE, PLATFORM } from '../../analytics/events';
35
34
  import { default as ReactSerializer } from '../../react';
@@ -65,7 +64,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
65
64
  const TABLE_INFO_TIMEOUT = 10000;
66
65
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
67
66
  const packageName = "@atlaskit/renderer";
68
- const packageVersion = "153.2.14";
67
+ const packageVersion = "153.2.15";
69
68
  const setAsQueryContainerStyles = css({
70
69
  containerName: 'ak-renderer-wrapper',
71
70
  containerType: 'inline-size'
@@ -203,24 +202,12 @@ export const RendererFunctionalComponent = props => {
203
202
  nestedRendererType
204
203
  };
205
204
  }, [nestedRendererType]);
206
- const fireAnalyticsEventOld = useCallback(event => {
207
- const {
208
- createAnalyticsEvent
209
- } = props;
210
- if (createAnalyticsEvent) {
211
- const channel = FabricChannel.editor;
212
- createAnalyticsEvent(event).fire(channel);
213
- }
214
- }, [props]);
215
- const fireAnalyticsEventNew = useCallback(event => {
205
+ const fireAnalyticsEvent = useCallback(event => {
216
206
  if (createAnalyticsEvent) {
217
207
  const channel = FabricChannel.editor;
218
208
  createAnalyticsEvent(event).fire(channel);
219
209
  }
220
210
  }, [createAnalyticsEvent]);
221
- const fireAnalyticsEvent = editorExperiment('platform_renderer_fix_analytics_memo_callback', true, {
222
- exposure: true
223
- }) ? fireAnalyticsEventNew : fireAnalyticsEventOld;
224
211
  const deriveSerializerProps = useCallback(props => {
225
212
  var _props$startPos, _props$isPerformanceM;
226
213
  const stickyHeaders = props.stickyHeaders ? props.stickyHeaders === true ? {} : props.stickyHeaders : undefined;
@@ -17,7 +17,6 @@ import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFul
17
17
  import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
18
18
  import { SmartCardContext } from '@atlaskit/link-provider/context';
19
19
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
20
- import { fg } from '@atlaskit/platform-feature-flags/fg';
21
20
  import { Card } from '@atlaskit/smart-card/card/lazy';
22
21
  import { EmbedResizeMessageListener } from '@atlaskit/smart-card/embed-resize-message-listener';
23
22
  import { CardSSR } from '@atlaskit/smart-card/ssr';
@@ -158,7 +157,7 @@ function EmbedCardInternal(props) {
158
157
  }
159
158
  };
160
159
  var cardComponent;
161
- if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url && fg('platform_ssr_smartlink_embeds')) {
160
+ if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url) {
162
161
  var _smartLinks$frameStyl2;
163
162
  var ssrCardProps = {
164
163
  url: url,
@@ -34,7 +34,6 @@ import { shouldForceTracking } from '@atlaskit/editor-common/utils/should-force-
34
34
  import { WidthProvider } from '@atlaskit/editor-common/WidthProvider';
35
35
  import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/WithCreateAnalyticsEvent';
36
36
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
37
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
38
37
  import AnalyticsContext from '../../analytics/analyticsContext';
39
38
  import { MODE, PLATFORM } from '../../analytics/events';
40
39
  import { default as ReactSerializer } from '../../react';
@@ -70,7 +69,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
70
69
  var TABLE_INFO_TIMEOUT = 10000;
71
70
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
72
71
  var packageName = "@atlaskit/renderer";
73
- var packageVersion = "153.2.14";
72
+ var packageVersion = "153.2.15";
74
73
  var setAsQueryContainerStyles = css({
75
74
  containerName: 'ak-renderer-wrapper',
76
75
  containerType: 'inline-size'
@@ -207,22 +206,12 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
207
206
  };
208
207
  };
209
208
  }, [nestedRendererType]);
210
- var fireAnalyticsEventOld = useCallback(function (event) {
211
- var createAnalyticsEvent = props.createAnalyticsEvent;
212
- if (createAnalyticsEvent) {
213
- var channel = FabricChannel.editor;
214
- createAnalyticsEvent(event).fire(channel);
215
- }
216
- }, [props]);
217
- var fireAnalyticsEventNew = useCallback(function (event) {
209
+ var _fireAnalyticsEvent = useCallback(function (event) {
218
210
  if (createAnalyticsEvent) {
219
211
  var channel = FabricChannel.editor;
220
212
  createAnalyticsEvent(event).fire(channel);
221
213
  }
222
214
  }, [createAnalyticsEvent]);
223
- var _fireAnalyticsEvent = editorExperiment('platform_renderer_fix_analytics_memo_callback', true, {
224
- exposure: true
225
- }) ? fireAnalyticsEventNew : fireAnalyticsEventOld;
226
215
  var deriveSerializerProps = useCallback(function (props) {
227
216
  var _props$startPos, _props$isPerformanceM;
228
217
  var stickyHeaders = props.stickyHeaders ? props.stickyHeaders === true ? {} : props.stickyHeaders : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "153.2.15",
3
+ "version": "153.2.16",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/smart-card": "^46.13.0",
72
72
  "@atlaskit/status": "^5.15.0",
73
73
  "@atlaskit/task-decision": "^21.14.0",
74
- "@atlaskit/tmp-editor-statsig": "^256.0.0",
74
+ "@atlaskit/tmp-editor-statsig": "^257.0.0",
75
75
  "@atlaskit/tokens": "^20.9.0",
76
76
  "@atlaskit/tooltip": "^24.4.0",
77
77
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -175,9 +175,6 @@
175
175
  "platform_renderer_ispresentational": {
176
176
  "type": "boolean"
177
177
  },
178
- "platform_ssr_smartlink_embeds": {
179
- "type": "boolean"
180
- },
181
178
  "platform_bitbucket_fix_shortname_and_ordering": {
182
179
  "type": "boolean",
183
180
  "referenceOnly": true