@atlaskit/renderer 127.4.0 → 127.5.0
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 +13 -0
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +9 -4
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +9 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/ErrorBoundary.js +9 -4
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/ui/Renderer/ErrorBoundary.d.ts +2 -0
- package/dist/types-ts4.5/ui/Renderer/ErrorBoundary.d.ts +2 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 127.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`dcc45a2290b59`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dcc45a2290b59) -
|
|
8
|
+
Cleaned up enable_absolute_positioning_profile_card feature gate
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`5c1f0e3fb0a3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c1f0e3fb0a3f) -
|
|
13
|
+
EDITO-5622 Update errorboundary key to reduce rerenders from new key being generated
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 127.4.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -16,6 +16,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
16
16
|
var _types = require("@atlaskit/analytics-listeners/types");
|
|
17
17
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
18
18
|
var _events = require("../../analytics/events");
|
|
19
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
20
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
20
21
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
21
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
@@ -31,7 +32,8 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
31
32
|
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
32
33
|
(0, _defineProperty2.default)(_this, "state", {
|
|
33
34
|
errorCaptured: false,
|
|
34
|
-
domError: false
|
|
35
|
+
domError: false,
|
|
36
|
+
domErrorCount: 0
|
|
35
37
|
});
|
|
36
38
|
return _this;
|
|
37
39
|
}
|
|
@@ -91,9 +93,10 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
91
93
|
errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
|
|
92
94
|
}
|
|
93
95
|
});
|
|
94
|
-
this.setState(function () {
|
|
96
|
+
this.setState(function (prevState) {
|
|
95
97
|
return {
|
|
96
|
-
domError: true
|
|
98
|
+
domError: true,
|
|
99
|
+
domErrorCount: prevState.domErrorCount + 1
|
|
97
100
|
};
|
|
98
101
|
});
|
|
99
102
|
}
|
|
@@ -111,9 +114,11 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
|
|
|
111
114
|
key: "render",
|
|
112
115
|
value: function render() {
|
|
113
116
|
if (this.state.domError) {
|
|
117
|
+
var key = (0, _expValEquals.expValEquals)('platform_editor_renderer_error_boundary_stable_key', 'isEnabled', true) ? this.state.domErrorCount :
|
|
114
118
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
119
|
+
(0, _uuid.default)();
|
|
115
120
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
116
|
-
key:
|
|
121
|
+
key: key
|
|
117
122
|
}, this.props.children);
|
|
118
123
|
}
|
|
119
124
|
if (this.shouldRecover()) {
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "
|
|
74
|
+
var packageVersion = "0.0.0-development";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -4,6 +4,7 @@ import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
5
5
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
6
6
|
import { PLATFORM } from '../../analytics/events';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
8
9
|
import uuid from 'uuid';
|
|
9
10
|
// Ignored via go/ees005
|
|
@@ -13,7 +14,8 @@ export class ErrorBoundary extends React.Component {
|
|
|
13
14
|
super(...args);
|
|
14
15
|
_defineProperty(this, "state", {
|
|
15
16
|
errorCaptured: false,
|
|
16
|
-
domError: false
|
|
17
|
+
domError: false,
|
|
18
|
+
domErrorCount: 0
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
fireAnalyticsEvent(event) {
|
|
@@ -64,8 +66,9 @@ export class ErrorBoundary extends React.Component {
|
|
|
64
66
|
errorMessage: `${additionalInfo}${error === null || error === void 0 ? void 0 : error.message}`
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
|
-
this.setState(
|
|
68
|
-
domError: true
|
|
69
|
+
this.setState(prevState => ({
|
|
70
|
+
domError: true,
|
|
71
|
+
domErrorCount: prevState.domErrorCount + 1
|
|
69
72
|
}));
|
|
70
73
|
}
|
|
71
74
|
if (this.hasFallback()) {
|
|
@@ -80,9 +83,11 @@ export class ErrorBoundary extends React.Component {
|
|
|
80
83
|
}
|
|
81
84
|
render() {
|
|
82
85
|
if (this.state.domError) {
|
|
86
|
+
const key = expValEquals('platform_editor_renderer_error_boundary_stable_key', 'isEnabled', true) ? this.state.domErrorCount :
|
|
83
87
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
88
|
+
uuid();
|
|
84
89
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
85
|
-
key:
|
|
90
|
+
key: key
|
|
86
91
|
}, this.props.children);
|
|
87
92
|
}
|
|
88
93
|
if (this.shouldRecover()) {
|
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "
|
|
60
|
+
const packageVersion = "0.0.0-development";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -11,6 +11,7 @@ import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
|
11
11
|
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
12
12
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
13
13
|
import { PLATFORM } from '../../analytics/events';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
15
16
|
import uuid from 'uuid';
|
|
16
17
|
// Ignored via go/ees005
|
|
@@ -25,7 +26,8 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
25
26
|
_this = _callSuper(this, ErrorBoundary, [].concat(args));
|
|
26
27
|
_defineProperty(_this, "state", {
|
|
27
28
|
errorCaptured: false,
|
|
28
|
-
domError: false
|
|
29
|
+
domError: false,
|
|
30
|
+
domErrorCount: 0
|
|
29
31
|
});
|
|
30
32
|
return _this;
|
|
31
33
|
}
|
|
@@ -85,9 +87,10 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
85
87
|
errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
|
|
86
88
|
}
|
|
87
89
|
});
|
|
88
|
-
this.setState(function () {
|
|
90
|
+
this.setState(function (prevState) {
|
|
89
91
|
return {
|
|
90
|
-
domError: true
|
|
92
|
+
domError: true,
|
|
93
|
+
domErrorCount: prevState.domErrorCount + 1
|
|
91
94
|
};
|
|
92
95
|
});
|
|
93
96
|
}
|
|
@@ -105,9 +108,11 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
105
108
|
key: "render",
|
|
106
109
|
value: function render() {
|
|
107
110
|
if (this.state.domError) {
|
|
111
|
+
var key = expValEquals('platform_editor_renderer_error_boundary_stable_key', 'isEnabled', true) ? this.state.domErrorCount :
|
|
108
112
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
113
|
+
uuid();
|
|
109
114
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
110
|
-
key:
|
|
115
|
+
key: key
|
|
111
116
|
}, this.props.children);
|
|
112
117
|
}
|
|
113
118
|
if (this.shouldRecover()) {
|
|
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
62
62
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
63
63
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
64
64
|
var packageName = "@atlaskit/renderer";
|
|
65
|
-
var packageVersion = "
|
|
65
|
+
var packageVersion = "0.0.0-development";
|
|
66
66
|
var setAsQueryContainerStyles = css({
|
|
67
67
|
containerName: 'ak-renderer-wrapper',
|
|
68
68
|
containerType: 'inline-size'
|
|
@@ -12,12 +12,14 @@ interface ErrorBoundaryProps {
|
|
|
12
12
|
}
|
|
13
13
|
interface ErrorBoundaryState {
|
|
14
14
|
domError: boolean;
|
|
15
|
+
domErrorCount: number;
|
|
15
16
|
errorCaptured: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
18
19
|
state: {
|
|
19
20
|
errorCaptured: boolean;
|
|
20
21
|
domError: boolean;
|
|
22
|
+
domErrorCount: number;
|
|
21
23
|
};
|
|
22
24
|
private fireAnalyticsEvent;
|
|
23
25
|
private hasFallback;
|
|
@@ -12,12 +12,14 @@ interface ErrorBoundaryProps {
|
|
|
12
12
|
}
|
|
13
13
|
interface ErrorBoundaryState {
|
|
14
14
|
domError: boolean;
|
|
15
|
+
domErrorCount: number;
|
|
15
16
|
errorCaptured: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
18
19
|
state: {
|
|
19
20
|
errorCaptured: boolean;
|
|
20
21
|
domError: boolean;
|
|
22
|
+
domErrorCount: number;
|
|
21
23
|
};
|
|
22
24
|
private fireAnalyticsEvent;
|
|
23
25
|
private hasFallback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "127.
|
|
3
|
+
"version": "127.5.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/status": "^3.1.0",
|
|
60
60
|
"@atlaskit/task-decision": "^19.3.0",
|
|
61
61
|
"@atlaskit/theme": "^22.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^35.
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^35.9.0",
|
|
63
63
|
"@atlaskit/tokens": "^11.1.0",
|
|
64
64
|
"@atlaskit/tooltip": "^20.14.0",
|
|
65
65
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^3.1.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^111.
|
|
76
|
+
"@atlaskit/editor-common": "^111.35.0",
|
|
77
77
|
"@atlaskit/link-provider": "^4.2.0",
|
|
78
78
|
"@atlaskit/media-core": "^37.0.0",
|
|
79
79
|
"react": "^18.2.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@atlaskit/mention": "^24.5.0",
|
|
93
93
|
"@atlaskit/modal-dialog": "^14.11.0",
|
|
94
94
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
|
|
95
|
-
"@atlaskit/profilecard": "^24.
|
|
95
|
+
"@atlaskit/profilecard": "^24.44.0",
|
|
96
96
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
97
97
|
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
98
98
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|