@atlaskit/renderer 109.31.1 → 109.31.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,13 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.31.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#105930](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105930)
8
+ [`939b873db211`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/939b873db211) -
9
+ [ux] Sets increased table scaling percent when FF is enabled.
10
+
3
11
  ## 109.31.1
4
12
 
5
13
  ### Patch Changes
@@ -20,6 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
20
  // User A creates a table with column widths → User B views it on a smaller screen
21
21
  // User A creates a table with column widths → User A views it with reduced viewport space (eg. Confluence sidebar is open)
22
22
  var MAX_SCALING_PERCENT = 0.3;
23
+ var MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = 0.4;
23
24
  var isTableResized = function isTableResized(columnWidths) {
24
25
  var filteredWidths = columnWidths.filter(function (width) {
25
26
  return width !== 0;
@@ -127,7 +128,9 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
127
128
  });
128
129
  var cellMinWidth = 0;
129
130
  var scaleDownPercent = 0;
130
- var isTableWidthFixed = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.preserve-widths-with-lock-button') && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
131
+ var isTableWithLockButtonEnabled = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.preserve-widths-with-lock-button') && isTableScalingEnabled;
132
+ var isTableWidthFixed = isTableWithLockButtonEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
133
+ var maxScalingPercent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.use-increased-scaling-percent') && isTableWithLockButtonEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
131
134
 
132
135
  // fixes migration tables with zero-width columns
133
136
  if (zeroWidthColumnsCount > 0) {
@@ -141,7 +144,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
141
144
  scaleDownPercent = calcScalePercent({
142
145
  renderWidth: renderWidth,
143
146
  tableWidth: tableWidth,
144
- maxScale: MAX_SCALING_PERCENT
147
+ maxScale: maxScalingPercent
145
148
  });
146
149
  }
147
150
  return targetWidths.map(function (colWidth) {
@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
56
56
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
57
57
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
58
58
  var packageName = "@atlaskit/renderer";
59
- var packageVersion = "109.31.1";
59
+ var packageVersion = "109.31.2";
60
60
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
61
61
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
62
62
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -10,6 +10,7 @@ import { useFeatureFlags } from '../../../use-feature-flags';
10
10
  // User A creates a table with column widths → User B views it on a smaller screen
11
11
  // User A creates a table with column widths → User A views it with reduced viewport space (eg. Confluence sidebar is open)
12
12
  const MAX_SCALING_PERCENT = 0.3;
13
+ const MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = 0.4;
13
14
  const isTableResized = columnWidths => {
14
15
  const filteredWidths = columnWidths.filter(width => width !== 0);
15
16
  return !!filteredWidths.length;
@@ -114,7 +115,9 @@ const renderScaleDownColgroup = props => {
114
115
  });
115
116
  let cellMinWidth = 0;
116
117
  let scaleDownPercent = 0;
117
- const isTableWidthFixed = getBooleanFF('platform.editor.table.preserve-widths-with-lock-button') && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
118
+ const isTableWithLockButtonEnabled = getBooleanFF('platform.editor.table.preserve-widths-with-lock-button') && isTableScalingEnabled;
119
+ const isTableWidthFixed = isTableWithLockButtonEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
120
+ const maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') && isTableWithLockButtonEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
118
121
 
119
122
  // fixes migration tables with zero-width columns
120
123
  if (zeroWidthColumnsCount > 0) {
@@ -128,7 +131,7 @@ const renderScaleDownColgroup = props => {
128
131
  scaleDownPercent = calcScalePercent({
129
132
  renderWidth,
130
133
  tableWidth,
131
- maxScale: MAX_SCALING_PERCENT
134
+ maxScale: maxScalingPercent
132
135
  });
133
136
  }
134
137
  return targetWidths.map(colWidth => {
@@ -37,7 +37,7 @@ import { nodeToReact } from '../../react/nodes';
37
37
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
38
38
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
39
39
  const packageName = "@atlaskit/renderer";
40
- const packageVersion = "109.31.1";
40
+ const packageVersion = "109.31.2";
41
41
  export const defaultNodeComponents = nodeToReact;
42
42
  export class Renderer extends PureComponent {
43
43
  constructor(props) {
@@ -13,6 +13,7 @@ import { useFeatureFlags } from '../../../use-feature-flags';
13
13
  // User A creates a table with column widths → User B views it on a smaller screen
14
14
  // User A creates a table with column widths → User A views it with reduced viewport space (eg. Confluence sidebar is open)
15
15
  var MAX_SCALING_PERCENT = 0.3;
16
+ var MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = 0.4;
16
17
  var isTableResized = function isTableResized(columnWidths) {
17
18
  var filteredWidths = columnWidths.filter(function (width) {
18
19
  return width !== 0;
@@ -120,7 +121,9 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
120
121
  });
121
122
  var cellMinWidth = 0;
122
123
  var scaleDownPercent = 0;
123
- var isTableWidthFixed = getBooleanFF('platform.editor.table.preserve-widths-with-lock-button') && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
124
+ var isTableWithLockButtonEnabled = getBooleanFF('platform.editor.table.preserve-widths-with-lock-button') && isTableScalingEnabled;
125
+ var isTableWidthFixed = isTableWithLockButtonEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
126
+ var maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') && isTableWithLockButtonEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
124
127
 
125
128
  // fixes migration tables with zero-width columns
126
129
  if (zeroWidthColumnsCount > 0) {
@@ -134,7 +137,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
134
137
  scaleDownPercent = calcScalePercent({
135
138
  renderWidth: renderWidth,
136
139
  tableWidth: tableWidth,
137
- maxScale: MAX_SCALING_PERCENT
140
+ maxScale: maxScalingPercent
138
141
  });
139
142
  }
140
143
  return targetWidths.map(function (colWidth) {
@@ -47,7 +47,7 @@ import { nodeToReact } from '../../react/nodes';
47
47
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
48
48
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
49
49
  var packageName = "@atlaskit/renderer";
50
- var packageVersion = "109.31.1";
50
+ var packageVersion = "109.31.2";
51
51
  export var defaultNodeComponents = nodeToReact;
52
52
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
53
53
  _inherits(Renderer, _PureComponent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.31.1",
3
+ "version": "109.31.2",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -142,6 +142,9 @@
142
142
  "platform.editor.table.preserve-widths-with-lock-button": {
143
143
  "type": "boolean"
144
144
  },
145
+ "platform.editor.table.use-increased-scaling-percent": {
146
+ "type": "boolean"
147
+ },
145
148
  "platform.editor.table.allow-table-alignment": {
146
149
  "type": "boolean"
147
150
  }