@atlaskit/renderer 120.1.1 → 120.1.3

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/renderer
2
2
 
3
+ ## 120.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 120.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#183601](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183601)
14
+ [`d1e802247d4cb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1e802247d4cb) -
15
+ Fix custom numbered column width calculation
16
+ - Updated dependencies
17
+
3
18
  ## 120.1.1
4
19
 
5
20
  ### Patch Changes
@@ -110,12 +110,13 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
110
110
 
111
111
  // when table resized and number column is enabled, we need to scale down the table in render
112
112
  if (forceScaleForNumColumn) {
113
- var scalePercentage = +((tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth) / tableContainerWidth);
114
- var targetMaxWidth = tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth;
113
+ var calculatedTableContainerWidth = rendererAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_custom_number_column') ? sumOfColumns : tableContainerWidth;
114
+ var scalePercentage = +((calculatedTableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth) / calculatedTableContainerWidth);
115
+ var targetMaxWidth = calculatedTableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth;
115
116
  var totalWidthAfterScale = 0;
116
117
  var newScaledTargetWidths = columnWidths.map(function (width) {
117
118
  // we need to scale each column UP, to ensure total width of table matches table container
118
- var patchedWidth = isTableSmallerThanContainer ? width / sumOfColumns * (tableContainerWidth - 1) : width;
119
+ var patchedWidth = isTableSmallerThanContainer ? width / sumOfColumns * (calculatedTableContainerWidth - 1) : width;
119
120
  var newWidth = Math.floor(patchedWidth * scalePercentage);
120
121
  totalWidthAfterScale += newWidth;
121
122
  return newWidth;
@@ -62,7 +62,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
62
62
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
63
63
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var packageName = "@atlaskit/renderer";
65
- var packageVersion = "120.1.0";
65
+ var packageVersion = "120.1.2";
66
66
  var setAsQueryContainerStyles = (0, _react2.css)({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -98,12 +98,13 @@ const renderScaleDownColgroup = props => {
98
98
 
99
99
  // when table resized and number column is enabled, we need to scale down the table in render
100
100
  if (forceScaleForNumColumn) {
101
- const scalePercentage = +((tableContainerWidth - akEditorTableNumberColumnWidth) / tableContainerWidth);
102
- const targetMaxWidth = tableContainerWidth - akEditorTableNumberColumnWidth;
101
+ const calculatedTableContainerWidth = rendererAppearance === 'comment' && fg('platform_custom_number_column') ? sumOfColumns : tableContainerWidth;
102
+ const scalePercentage = +((calculatedTableContainerWidth - akEditorTableNumberColumnWidth) / calculatedTableContainerWidth);
103
+ const targetMaxWidth = calculatedTableContainerWidth - akEditorTableNumberColumnWidth;
103
104
  let totalWidthAfterScale = 0;
104
105
  const newScaledTargetWidths = columnWidths.map(width => {
105
106
  // we need to scale each column UP, to ensure total width of table matches table container
106
- const patchedWidth = isTableSmallerThanContainer ? width / sumOfColumns * (tableContainerWidth - 1) : width;
107
+ const patchedWidth = isTableSmallerThanContainer ? width / sumOfColumns * (calculatedTableContainerWidth - 1) : width;
107
108
  const newWidth = Math.floor(patchedWidth * scalePercentage);
108
109
  totalWidthAfterScale += newWidth;
109
110
  return newWidth;
@@ -48,7 +48,7 @@ import { PortalContext } from './PortalContext';
48
48
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  const packageName = "@atlaskit/renderer";
51
- const packageVersion = "120.1.0";
51
+ const packageVersion = "120.1.2";
52
52
  const setAsQueryContainerStyles = css({
53
53
  containerName: 'ak-renderer-wrapper',
54
54
  containerType: 'inline-size'
@@ -104,12 +104,13 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
104
104
 
105
105
  // when table resized and number column is enabled, we need to scale down the table in render
106
106
  if (forceScaleForNumColumn) {
107
- var scalePercentage = +((tableContainerWidth - akEditorTableNumberColumnWidth) / tableContainerWidth);
108
- var targetMaxWidth = tableContainerWidth - akEditorTableNumberColumnWidth;
107
+ var calculatedTableContainerWidth = rendererAppearance === 'comment' && fg('platform_custom_number_column') ? sumOfColumns : tableContainerWidth;
108
+ var scalePercentage = +((calculatedTableContainerWidth - akEditorTableNumberColumnWidth) / calculatedTableContainerWidth);
109
+ var targetMaxWidth = calculatedTableContainerWidth - akEditorTableNumberColumnWidth;
109
110
  var totalWidthAfterScale = 0;
110
111
  var newScaledTargetWidths = columnWidths.map(function (width) {
111
112
  // we need to scale each column UP, to ensure total width of table matches table container
112
- var patchedWidth = isTableSmallerThanContainer ? width / sumOfColumns * (tableContainerWidth - 1) : width;
113
+ var patchedWidth = isTableSmallerThanContainer ? width / sumOfColumns * (calculatedTableContainerWidth - 1) : width;
113
114
  var newWidth = Math.floor(patchedWidth * scalePercentage);
114
115
  totalWidthAfterScale += newWidth;
115
116
  return newWidth;
@@ -53,7 +53,7 @@ import { PortalContext } from './PortalContext';
53
53
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
54
54
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
55
55
  var packageName = "@atlaskit/renderer";
56
- var packageVersion = "120.1.0";
56
+ var packageVersion = "120.1.2";
57
57
  var setAsQueryContainerStyles = css({
58
58
  containerName: 'ak-renderer-wrapper',
59
59
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "120.1.1",
3
+ "version": "120.1.3",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/adf-schema": "^47.6.0",
26
+ "@atlaskit/adf-schema": "^49.0.5",
27
27
  "@atlaskit/adf-utils": "^19.20.0",
28
28
  "@atlaskit/analytics-listeners": "^9.0.0",
29
29
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
@@ -50,12 +50,12 @@
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
52
52
  "@atlaskit/react-ufo": "^3.14.0",
53
- "@atlaskit/smart-card": "^39.2.0",
53
+ "@atlaskit/smart-card": "^40.0.0",
54
54
  "@atlaskit/status": "^3.0.0",
55
55
  "@atlaskit/task-decision": "^19.2.0",
56
56
  "@atlaskit/theme": "^19.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^9.1.0",
58
- "@atlaskit/tokens": "^5.4.0",
57
+ "@atlaskit/tmp-editor-statsig": "^9.5.0",
58
+ "@atlaskit/tokens": "^5.5.0",
59
59
  "@atlaskit/tooltip": "^20.3.0",
60
60
  "@atlaskit/visually-hidden": "^3.0.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -89,6 +89,7 @@
89
89
  "@atlaskit/mention": "^24.2.0",
90
90
  "@atlaskit/modal-dialog": "^14.2.0",
91
91
  "@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-d1445f2f74.patch",
92
+ "@atlaskit/profilecard": "^23.21.0",
92
93
  "@atlaskit/util-data-test": "^18.0.0",
93
94
  "@atlaskit/visual-regression": "workspace:^",
94
95
  "@atlassian/feature-flags-test-utils": "^0.3.0",
@@ -269,6 +270,9 @@
269
270
  },
270
271
  "confluence_frontend_comments_panel_editor_focus": {
271
272
  "type": "boolean"
273
+ },
274
+ "platform_custom_number_column": {
275
+ "type": "boolean"
272
276
  }
273
277
  },
274
278
  "af:exports": {