@atlaskit/renderer 124.5.0 → 124.5.2

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,22 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`eec573b4a7a6a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eec573b4a7a6a) -
8
+ Passing the precise Pixel width when available instead of the container width, and passing height
9
+ 100% to avoid attempting height calculations to remove changes for VC
10
+ - Updated dependencies
11
+
12
+ ## 124.5.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [`08782f92b4f09`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/08782f92b4f09) -
17
+ COMMENTS-5684-fe-cleanup-and-archive-cc-comments-include-path-for-renderer-emojis
18
+ - Updated dependencies
19
+
3
20
  ## 124.5.0
4
21
 
5
22
  ### Minor Changes
@@ -237,7 +237,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
237
237
  case 'media':
238
238
  return this.getMediaProps(node, path);
239
239
  case 'emoji':
240
- return this.getEmojiProps(node, (0, _expValEquals.expValEquals)('cc_comments_include_path_for_renderer_emojis', 'isEnabled', true) ? path : undefined);
240
+ return this.getEmojiProps(node, path);
241
241
  case 'extension':
242
242
  case 'bodiedExtension':
243
243
  return this.getExtensionProps(node, path);
@@ -140,12 +140,21 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
140
140
  var padding = isFullPage ? _style.FullPagePadding * 2 : 0;
141
141
  var calcDimensions = (0, _react.useCallback)(function (mediaContainerWidth) {
142
142
  var containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
143
- var maxWidth = (0, _coreUtils.isSSR)() && widthAttr && typeof widthAttr === 'number' && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
144
- var maxHeight = height / width * maxWidth;
145
- var cardDimensions = {
146
- width: "".concat(maxWidth, "px"),
147
- height: "".concat(maxHeight, "px")
148
- };
143
+ var cardDimensions = {};
144
+ if ((0, _platformFeatureFlags.fg)('media-perf-uplift-mutation-fix')) {
145
+ var maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
146
+ cardDimensions = {
147
+ width: "".concat(maxWidth, "px"),
148
+ height: "100%"
149
+ };
150
+ } else {
151
+ var _maxWidth = (0, _coreUtils.isSSR)() && widthAttr && typeof widthAttr === 'number' && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
152
+ var maxHeight = height / width * _maxWidth;
153
+ cardDimensions = {
154
+ width: "".concat(_maxWidth, "px"),
155
+ height: "".concat(maxHeight, "px")
156
+ };
157
+ }
149
158
  var nonFullWidthSize = containerWidth;
150
159
  if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
151
160
  var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= _editorSharedStyles.akEditorDefaultLayoutWidth;
@@ -68,7 +68,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
68
68
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
69
69
  var TABLE_WIDTH_INFO_TIMEOUT = 10000;
70
70
  var packageName = "@atlaskit/renderer";
71
- var packageVersion = "124.4.4";
71
+ var packageVersion = "124.5.1";
72
72
  var setAsQueryContainerStyles = (0, _react2.css)({
73
73
  containerName: 'ak-renderer-wrapper',
74
74
  containerType: 'inline-size'
@@ -219,7 +219,7 @@ export default class ReactSerializer {
219
219
  case 'media':
220
220
  return this.getMediaProps(node, path);
221
221
  case 'emoji':
222
- return this.getEmojiProps(node, expValEquals('cc_comments_include_path_for_renderer_emojis', 'isEnabled', true) ? path : undefined);
222
+ return this.getEmojiProps(node, path);
223
223
  case 'extension':
224
224
  case 'bodiedExtension':
225
225
  return this.getExtensionProps(node, path);
@@ -127,12 +127,21 @@ const MediaSingleWithChildren = props => {
127
127
  const padding = isFullPage ? FullPagePadding * 2 : 0;
128
128
  const calcDimensions = useCallback(mediaContainerWidth => {
129
129
  const containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
130
- const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
131
- const maxHeight = height / width * maxWidth;
132
- const cardDimensions = {
133
- width: `${maxWidth}px`,
134
- height: `${maxHeight}px`
135
- };
130
+ let cardDimensions = {};
131
+ if (fg('media-perf-uplift-mutation-fix')) {
132
+ const maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
133
+ cardDimensions = {
134
+ width: `${maxWidth}px`,
135
+ height: `100%`
136
+ };
137
+ } else {
138
+ const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
139
+ const maxHeight = height / width * maxWidth;
140
+ cardDimensions = {
141
+ width: `${maxWidth}px`,
142
+ height: `${maxHeight}px`
143
+ };
144
+ }
136
145
  let nonFullWidthSize = containerWidth;
137
146
  if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
138
147
  const isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
@@ -54,7 +54,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
54
54
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
55
55
  const TABLE_WIDTH_INFO_TIMEOUT = 10000;
56
56
  const packageName = "@atlaskit/renderer";
57
- const packageVersion = "124.4.4";
57
+ const packageVersion = "124.5.1";
58
58
  const setAsQueryContainerStyles = css({
59
59
  containerName: 'ak-renderer-wrapper',
60
60
  containerType: 'inline-size'
@@ -230,7 +230,7 @@ var ReactSerializer = /*#__PURE__*/function () {
230
230
  case 'media':
231
231
  return this.getMediaProps(node, path);
232
232
  case 'emoji':
233
- return this.getEmojiProps(node, expValEquals('cc_comments_include_path_for_renderer_emojis', 'isEnabled', true) ? path : undefined);
233
+ return this.getEmojiProps(node, path);
234
234
  case 'extension':
235
235
  case 'bodiedExtension':
236
236
  return this.getExtensionProps(node, path);
@@ -130,12 +130,21 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
130
130
  var padding = isFullPage ? FullPagePadding * 2 : 0;
131
131
  var calcDimensions = useCallback(function (mediaContainerWidth) {
132
132
  var containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
133
- var maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
134
- var maxHeight = height / width * maxWidth;
135
- var cardDimensions = {
136
- width: "".concat(maxWidth, "px"),
137
- height: "".concat(maxHeight, "px")
138
- };
133
+ var cardDimensions = {};
134
+ if (fg('media-perf-uplift-mutation-fix')) {
135
+ var maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
136
+ cardDimensions = {
137
+ width: "".concat(maxWidth, "px"),
138
+ height: "100%"
139
+ };
140
+ } else {
141
+ var _maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
142
+ var maxHeight = height / width * _maxWidth;
143
+ cardDimensions = {
144
+ width: "".concat(_maxWidth, "px"),
145
+ height: "".concat(maxHeight, "px")
146
+ };
147
+ }
139
148
  var nonFullWidthSize = containerWidth;
140
149
  if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
141
150
  var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
@@ -59,7 +59,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
60
60
  var TABLE_WIDTH_INFO_TIMEOUT = 10000;
61
61
  var packageName = "@atlaskit/renderer";
62
- var packageVersion = "124.4.4";
62
+ var packageVersion = "124.5.1";
63
63
  var setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.5.0",
3
+ "version": "124.5.2",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/status": "^3.0.0",
58
58
  "@atlaskit/task-decision": "^19.2.0",
59
59
  "@atlaskit/theme": "^21.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^13.11.0",
60
+ "@atlaskit/tmp-editor-statsig": "^13.12.0",
61
61
  "@atlaskit/tokens": "^6.5.0",
62
62
  "@atlaskit/tooltip": "^20.5.0",
63
63
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -250,6 +250,9 @@
250
250
  },
251
251
  "hot-121622_lazy_load_expand_content": {
252
252
  "type": "boolean"
253
+ },
254
+ "media-perf-uplift-mutation-fix": {
255
+ "type": "boolean"
253
256
  }
254
257
  }
255
258
  }