@atlaskit/link-create 1.15.2 → 1.15.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,11 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 1.15.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#86416](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/86416) [`91c59efc1417`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/91c59efc1417) - Cleans up feature flag platform.linking-platform.link-create.slo-ignore-failed-fetch permanently marking failed to fetch errors to be ignored for SLO metrics.
8
+
3
9
  ## 1.15.2
4
10
 
5
11
  ### Patch Changes
@@ -91,7 +91,7 @@ var Experience = exports.Experience = function Experience(_ref) {
91
91
  /**
92
92
  * Whether the failure should be involved when considering SLI/SLO
93
93
  */
94
- isSLOFailure: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.slo-ignore-failed-fetch') ? isErrorSLOFailure(error) : true
94
+ isSLOFailure: isErrorSLOFailure(error)
95
95
  }, (0, _errors.getNetworkFields)(error)))).fire(_constants.ANALYTICS_CHANNEL);
96
96
  if (error instanceof Error) {
97
97
  if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.enable-sentry-client')) {
@@ -99,19 +99,14 @@ var Experience = exports.Experience = function Experience(_ref) {
99
99
  (0, _sentry.captureException)(error, 'link-create');
100
100
  }
101
101
  }
102
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.slo-ignore-failed-fetch')) {
103
- /**
104
- * Only consider the experience truly failed if the
105
- * failure is one we haven't correctly handled.
106
- *
107
- * In otherwords allow the experience to be "restarted" for the user to try again
108
- */
109
- if (isErrorSLOFailure(error)) {
110
- if (experience.current !== experienceStatus) {
111
- experience.current = experienceStatus;
112
- }
113
- }
114
- } else {
102
+
103
+ /**
104
+ * Only consider the experience truly failed if the
105
+ * failure is one we haven't correctly handled.
106
+ *
107
+ * In otherwords allow the experience to be "restarted" for the user to try again
108
+ */
109
+ if (isErrorSLOFailure(error)) {
115
110
  if (experience.current !== experienceStatus) {
116
111
  experience.current = experienceStatus;
117
112
  }
@@ -31,7 +31,7 @@ var LinkCreateWithAnalyticsContext = (0, _analytics.withLinkCreateAnalyticsConte
31
31
  }));
32
32
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
33
33
  packageName: "@atlaskit/link-create" || '',
34
- packageVersion: "1.15.2" || '',
34
+ packageVersion: "1.15.3" || '',
35
35
  component: _constants.COMPONENT_NAME,
36
36
  componentName: _constants.COMPONENT_NAME
37
37
  };
@@ -77,7 +77,7 @@ export const Experience = ({
77
77
  /**
78
78
  * Whether the failure should be involved when considering SLI/SLO
79
79
  */
80
- isSLOFailure: getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch') ? isErrorSLOFailure(error) : true,
80
+ isSLOFailure: isErrorSLOFailure(error),
81
81
  /**
82
82
  * Fields related to `Response` object that can help with debugging
83
83
  * what has gone wrong
@@ -90,19 +90,14 @@ export const Experience = ({
90
90
  captureException(error, 'link-create');
91
91
  }
92
92
  }
93
- if (getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch')) {
94
- /**
95
- * Only consider the experience truly failed if the
96
- * failure is one we haven't correctly handled.
97
- *
98
- * In otherwords allow the experience to be "restarted" for the user to try again
99
- */
100
- if (isErrorSLOFailure(error)) {
101
- if (experience.current !== experienceStatus) {
102
- experience.current = experienceStatus;
103
- }
104
- }
105
- } else {
93
+
94
+ /**
95
+ * Only consider the experience truly failed if the
96
+ * failure is one we haven't correctly handled.
97
+ *
98
+ * In otherwords allow the experience to be "restarted" for the user to try again
99
+ */
100
+ if (isErrorSLOFailure(error)) {
106
101
  if (experience.current !== experienceStatus) {
107
102
  experience.current = experienceStatus;
108
103
  }
@@ -23,7 +23,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
23
23
  }));
24
24
  export const PACKAGE_DATA = {
25
25
  packageName: "@atlaskit/link-create" || '',
26
- packageVersion: "1.15.2" || '',
26
+ packageVersion: "1.15.3" || '',
27
27
  component: COMPONENT_NAME,
28
28
  componentName: COMPONENT_NAME
29
29
  };
@@ -81,7 +81,7 @@ export var Experience = function Experience(_ref) {
81
81
  /**
82
82
  * Whether the failure should be involved when considering SLI/SLO
83
83
  */
84
- isSLOFailure: getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch') ? isErrorSLOFailure(error) : true
84
+ isSLOFailure: isErrorSLOFailure(error)
85
85
  }, getNetworkFields(error)))).fire(ANALYTICS_CHANNEL);
86
86
  if (error instanceof Error) {
87
87
  if (getBooleanFF('platform.linking-platform.link-create.enable-sentry-client')) {
@@ -89,19 +89,14 @@ export var Experience = function Experience(_ref) {
89
89
  captureException(error, 'link-create');
90
90
  }
91
91
  }
92
- if (getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch')) {
93
- /**
94
- * Only consider the experience truly failed if the
95
- * failure is one we haven't correctly handled.
96
- *
97
- * In otherwords allow the experience to be "restarted" for the user to try again
98
- */
99
- if (isErrorSLOFailure(error)) {
100
- if (experience.current !== experienceStatus) {
101
- experience.current = experienceStatus;
102
- }
103
- }
104
- } else {
92
+
93
+ /**
94
+ * Only consider the experience truly failed if the
95
+ * failure is one we haven't correctly handled.
96
+ *
97
+ * In otherwords allow the experience to be "restarted" for the user to try again
98
+ */
99
+ if (isErrorSLOFailure(error)) {
105
100
  if (experience.current !== experienceStatus) {
106
101
  experience.current = experienceStatus;
107
102
  }
@@ -23,7 +23,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
23
23
  }));
24
24
  export var PACKAGE_DATA = {
25
25
  packageName: "@atlaskit/link-create" || '',
26
- packageVersion: "1.15.2" || '',
26
+ packageVersion: "1.15.3" || '',
27
27
  component: COMPONENT_NAME,
28
28
  componentName: COMPONENT_NAME
29
29
  };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+
3
+ import { useIntl } from 'react-intl-next';
4
+
5
+ export const MockDisclaimer = () => {
6
+ const { locale } = useIntl();
7
+ const parentLocale = locale.split(/[-_]/)[0];
8
+ const disclaimer = 'This is a mocked plugin.';
9
+
10
+ if (parentLocale !== 'en') {
11
+ return (
12
+ <p>
13
+ {disclaimer} <small>{`(locale ${locale} not available)`}</small>
14
+ </p>
15
+ );
16
+ }
17
+
18
+ return <p>{disclaimer}</p>;
19
+ };
@@ -9,6 +9,8 @@ import {
9
9
  Validator,
10
10
  } from '../src';
11
11
 
12
+ import { MockDisclaimer } from './mock-disclaimer';
13
+
12
14
  interface pluginProps {
13
15
  shouldThrowError?: boolean;
14
16
  }
@@ -62,7 +64,7 @@ export function MockPluginForm({ shouldThrowError }: pluginProps) {
62
64
 
63
65
  return (
64
66
  <div>
65
- This is a mocked plugin.
67
+ <MockDisclaimer />
66
68
  <CreateForm<CreateFormProps<FormData>>
67
69
  onSubmit={mockHandleSubmit}
68
70
  onCancel={onCancel}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -16,7 +16,8 @@
16
16
  ],
17
17
  "website": {
18
18
  "name": "LinkCreate"
19
- }
19
+ },
20
+ "i18n": true
20
21
  },
21
22
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
22
23
  "main": "dist/cjs/index.js",
@@ -38,15 +39,15 @@
38
39
  },
39
40
  "dependencies": {
40
41
  "@atlaskit/analytics-next": "^9.2.0",
41
- "@atlaskit/button": "^17.7.0",
42
+ "@atlaskit/button": "^17.8.0",
42
43
  "@atlaskit/empty-state": "^7.7.0",
43
- "@atlaskit/form": "^9.0.3",
44
+ "@atlaskit/form": "^9.1.0",
44
45
  "@atlaskit/icon": "^22.1.0",
45
46
  "@atlaskit/intl-messages-provider": "^1.0.2",
46
- "@atlaskit/linking-common": "^5.5.0",
47
+ "@atlaskit/linking-common": "^5.6.0",
47
48
  "@atlaskit/modal-dialog": "^12.10.0",
48
49
  "@atlaskit/platform-feature-flags": "^0.2.1",
49
- "@atlaskit/primitives": "^5.1.0",
50
+ "@atlaskit/primitives": "^5.2.0",
50
51
  "@atlaskit/select": "^17.3.0",
51
52
  "@atlaskit/spinner": "^16.0.0",
52
53
  "@atlaskit/textfield": "^6.1.0",
@@ -64,7 +65,7 @@
64
65
  "devDependencies": {
65
66
  "@af/integration-testing": "*",
66
67
  "@af/visual-regression": "*",
67
- "@atlaskit/link-test-helpers": "^6.2.0",
68
+ "@atlaskit/link-test-helpers": "^7.0.0",
68
69
  "@atlaskit/visual-regression": "*",
69
70
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
70
71
  "@atlassian/feature-flags-test-utils": "*",
@@ -126,9 +127,6 @@
126
127
  "platform.linking-platform.link-create.tmp-log-error-message": {
127
128
  "type": "boolean"
128
129
  },
129
- "platform.linking-platform.link-create.slo-ignore-failed-fetch": {
130
- "type": "boolean"
131
- },
132
130
  "platform.linking-platform.link-create.enable-expected-field-errors": {
133
131
  "type": "boolean"
134
132
  }