@atlaskit/feedback-collector 16.1.1 → 16.2.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 +15 -0
- package/compass.yml +38 -0
- package/dist/cjs/components/FeedbackCollector.js +2 -1
- package/dist/cjs/components/FeedbackForm.js +2 -0
- package/dist/es2019/components/FeedbackCollector.js +2 -1
- package/dist/es2019/components/FeedbackForm.js +2 -0
- package/dist/esm/components/FeedbackCollector.js +2 -1
- package/dist/esm/components/FeedbackForm.js +2 -0
- package/dist/types/components/FeedbackCollector.d.ts +2 -0
- package/dist/types/components/FeedbackForm.d.ts +2 -0
- package/feedback-collector.docs.tsx +74 -0
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/feedback-collector
|
|
2
2
|
|
|
3
|
+
## 16.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`84e6b9695a7ca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/84e6b9695a7ca) -
|
|
8
|
+
Update i18n NPM package versions for discovery,navigation,web-platform,bitbucket,policy-platform
|
|
9
|
+
(Group 14)
|
|
10
|
+
|
|
11
|
+
## 16.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`309a7bd882781`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/309a7bd882781) -
|
|
16
|
+
Add a dialogRef prop for accessing the rendered feedback dialog container.
|
|
17
|
+
|
|
3
18
|
## 16.1.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/compass.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
configVersion: 1
|
|
2
|
+
id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/fe21e46f-8b63-46b4-8cc3-129bb0608c8c
|
|
3
|
+
name: '@atlaskit/feedback-collector'
|
|
4
|
+
ownerId: ari:cloud:identity::team/03bf8f0a-185e-4feb-b203-cdac6446ed01 # Otter
|
|
5
|
+
labels:
|
|
6
|
+
- platform-code
|
|
7
|
+
- platform-afm
|
|
8
|
+
typeId: OTHER
|
|
9
|
+
fields:
|
|
10
|
+
tier: 4
|
|
11
|
+
lifecycle: Active
|
|
12
|
+
isMonorepoProject: true
|
|
13
|
+
links:
|
|
14
|
+
- name: Root Repository
|
|
15
|
+
type: REPOSITORY
|
|
16
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
17
|
+
- name: Slack Channel
|
|
18
|
+
type: CHAT_CHANNEL
|
|
19
|
+
url: https://atlassian.enterprise.slack.com/archives/C07HSDQ3E9H # #help-allowances-platform
|
|
20
|
+
- name: Feedback Collector
|
|
21
|
+
type: REPOSITORY
|
|
22
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/web-platform/feedback-collector
|
|
23
|
+
customFields:
|
|
24
|
+
- name: Department
|
|
25
|
+
type: text
|
|
26
|
+
value: Eng - Otter - Platform Services
|
|
27
|
+
- name: Technical Owner
|
|
28
|
+
type: user
|
|
29
|
+
value: ari:cloud:identity::user/712020:e6c80c36-bd14-432b-8fbf-a1a1a6dd2ab0 # Ankush Maheshwari
|
|
30
|
+
- name: Required Reviewers Opt In
|
|
31
|
+
type: boolean
|
|
32
|
+
value: true
|
|
33
|
+
- name: Reviewer Selection Mechanism
|
|
34
|
+
type: text
|
|
35
|
+
value: random(2)
|
|
36
|
+
- name: Required Reviewer Approvals
|
|
37
|
+
type: number
|
|
38
|
+
value: 1
|
|
@@ -164,7 +164,7 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
164
164
|
}, {
|
|
165
165
|
key: "getPackageVersion",
|
|
166
166
|
value: function getPackageVersion() {
|
|
167
|
-
return "16.1.
|
|
167
|
+
return "16.1.2" || 'Unknown, at least 11.0.0';
|
|
168
168
|
}
|
|
169
169
|
}, {
|
|
170
170
|
key: "getEntitlementInformation",
|
|
@@ -493,6 +493,7 @@ var FeedbackCollector = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
493
493
|
customTextAreaLabel: this.props.customTextAreaLabel,
|
|
494
494
|
customFeedbackOptions: this.props.customFeedbackOptions,
|
|
495
495
|
shouldReturnFocusRef: this.props.shouldReturnFocusRef,
|
|
496
|
+
dialogRef: this.props.dialogRef,
|
|
496
497
|
disableSubmitButton: this.props.disableSubmitButton
|
|
497
498
|
}, (0, _platformFeatureFlags.fg)('jfp_a11y_team_feedback_collector_nested_elements') && {
|
|
498
499
|
enrolInResearchLink: this.props.enrolInResearchLink,
|
|
@@ -65,6 +65,7 @@ var FeedbackForm = function FeedbackForm(_ref2) {
|
|
|
65
65
|
_ref2$customFeedbackO = _ref2.customFeedbackOptions,
|
|
66
66
|
customFeedbackOptions = _ref2$customFeedbackO === void 0 ? [] : _ref2$customFeedbackO,
|
|
67
67
|
shouldReturnFocusRef = _ref2.shouldReturnFocusRef,
|
|
68
|
+
dialogRef = _ref2.dialogRef,
|
|
68
69
|
disableSubmitButton = _ref2.disableSubmitButton,
|
|
69
70
|
_ref2$showRequiredFie = _ref2.showRequiredFieldsSummary,
|
|
70
71
|
showRequiredFieldsSummary = _ref2$showRequiredFie === void 0 ? true : _ref2$showRequiredFie;
|
|
@@ -180,6 +181,7 @@ var FeedbackForm = function FeedbackForm(_ref2) {
|
|
|
180
181
|
// eslint-disable-next-line @atlaskit/design-system/use-primitives-text
|
|
181
182
|
_react.default.createElement("p", null, formatMessage(_messages.messages.feedbackIsAnonymous));
|
|
182
183
|
return /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
184
|
+
ref: dialogRef,
|
|
183
185
|
shouldCloseOnOverlayClick: false,
|
|
184
186
|
onClose: onClose,
|
|
185
187
|
testId: "feedbackCollectorModalDialog",
|
|
@@ -92,7 +92,7 @@ export default class FeedbackCollector extends Component {
|
|
|
92
92
|
return FeedbackCollector.defaultProps.url;
|
|
93
93
|
}
|
|
94
94
|
getPackageVersion() {
|
|
95
|
-
return "16.1.
|
|
95
|
+
return "16.1.2" || 'Unknown, at least 11.0.0';
|
|
96
96
|
}
|
|
97
97
|
async getEntitlementInformation() {
|
|
98
98
|
var _entitlementDetails, _entitlementDetails2, _productName, _entitlement, _productEntitlement;
|
|
@@ -330,6 +330,7 @@ export default class FeedbackCollector extends Component {
|
|
|
330
330
|
customTextAreaLabel: this.props.customTextAreaLabel,
|
|
331
331
|
customFeedbackOptions: this.props.customFeedbackOptions,
|
|
332
332
|
shouldReturnFocusRef: this.props.shouldReturnFocusRef,
|
|
333
|
+
dialogRef: this.props.dialogRef,
|
|
333
334
|
disableSubmitButton: this.props.disableSubmitButton
|
|
334
335
|
}, fg('jfp_a11y_team_feedback_collector_nested_elements') && {
|
|
335
336
|
enrolInResearchLink: this.props.enrolInResearchLink,
|
|
@@ -47,6 +47,7 @@ const FeedbackForm = ({
|
|
|
47
47
|
customTextAreaLabel,
|
|
48
48
|
customFeedbackOptions = [],
|
|
49
49
|
shouldReturnFocusRef,
|
|
50
|
+
dialogRef,
|
|
50
51
|
disableSubmitButton,
|
|
51
52
|
showRequiredFieldsSummary = true
|
|
52
53
|
}) => {
|
|
@@ -141,6 +142,7 @@ const FeedbackForm = ({
|
|
|
141
142
|
// eslint-disable-next-line @atlaskit/design-system/use-primitives-text
|
|
142
143
|
React.createElement("p", null, formatMessage(messages.feedbackIsAnonymous));
|
|
143
144
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
145
|
+
ref: dialogRef,
|
|
144
146
|
shouldCloseOnOverlayClick: false,
|
|
145
147
|
onClose: onClose,
|
|
146
148
|
testId: "feedbackCollectorModalDialog",
|
|
@@ -155,7 +155,7 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
155
155
|
}, {
|
|
156
156
|
key: "getPackageVersion",
|
|
157
157
|
value: function getPackageVersion() {
|
|
158
|
-
return "16.1.
|
|
158
|
+
return "16.1.2" || 'Unknown, at least 11.0.0';
|
|
159
159
|
}
|
|
160
160
|
}, {
|
|
161
161
|
key: "getEntitlementInformation",
|
|
@@ -484,6 +484,7 @@ var FeedbackCollector = /*#__PURE__*/function (_Component) {
|
|
|
484
484
|
customTextAreaLabel: this.props.customTextAreaLabel,
|
|
485
485
|
customFeedbackOptions: this.props.customFeedbackOptions,
|
|
486
486
|
shouldReturnFocusRef: this.props.shouldReturnFocusRef,
|
|
487
|
+
dialogRef: this.props.dialogRef,
|
|
487
488
|
disableSubmitButton: this.props.disableSubmitButton
|
|
488
489
|
}, fg('jfp_a11y_team_feedback_collector_nested_elements') && {
|
|
489
490
|
enrolInResearchLink: this.props.enrolInResearchLink,
|
|
@@ -56,6 +56,7 @@ var FeedbackForm = function FeedbackForm(_ref2) {
|
|
|
56
56
|
_ref2$customFeedbackO = _ref2.customFeedbackOptions,
|
|
57
57
|
customFeedbackOptions = _ref2$customFeedbackO === void 0 ? [] : _ref2$customFeedbackO,
|
|
58
58
|
shouldReturnFocusRef = _ref2.shouldReturnFocusRef,
|
|
59
|
+
dialogRef = _ref2.dialogRef,
|
|
59
60
|
disableSubmitButton = _ref2.disableSubmitButton,
|
|
60
61
|
_ref2$showRequiredFie = _ref2.showRequiredFieldsSummary,
|
|
61
62
|
showRequiredFieldsSummary = _ref2$showRequiredFie === void 0 ? true : _ref2$showRequiredFie;
|
|
@@ -171,6 +172,7 @@ var FeedbackForm = function FeedbackForm(_ref2) {
|
|
|
171
172
|
// eslint-disable-next-line @atlaskit/design-system/use-primitives-text
|
|
172
173
|
React.createElement("p", null, formatMessage(messages.feedbackIsAnonymous));
|
|
173
174
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
175
|
+
ref: dialogRef,
|
|
174
176
|
shouldCloseOnOverlayClick: false,
|
|
175
177
|
onClose: onClose,
|
|
176
178
|
testId: "feedbackCollectorModalDialog",
|
|
@@ -118,6 +118,8 @@ export interface Props {
|
|
|
118
118
|
customFeedbackOptions?: OptionType[];
|
|
119
119
|
/** Optional ref to return focus to after feedback form is closed */
|
|
120
120
|
shouldReturnFocusRef?: React.RefObject<HTMLElement>;
|
|
121
|
+
/** Ref to the rendered feedback dialog container */
|
|
122
|
+
dialogRef?: React.RefObject<HTMLElement>;
|
|
121
123
|
/** Disable submit button to allow custom content to handle validation */
|
|
122
124
|
disableSubmitButton?: boolean;
|
|
123
125
|
/** Optional to show or hide the required fields summary */
|
|
@@ -53,6 +53,8 @@ interface Props {
|
|
|
53
53
|
customFeedbackOptions?: OptionType[];
|
|
54
54
|
/** React Ref to focus on close */
|
|
55
55
|
shouldReturnFocusRef?: React.RefObject<HTMLElement>;
|
|
56
|
+
/** Ref to the rendered feedback dialog container */
|
|
57
|
+
dialogRef?: React.RefObject<HTMLElement>;
|
|
56
58
|
/** Disable submit button to allow custom content to handle validation */
|
|
57
59
|
disableSubmitButton?: boolean;
|
|
58
60
|
/** Optional to show or hide the required fields summary */
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured MCP docs for `@atlaskit/feedback-collector`.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import path from 'path';
|
|
6
|
+
|
|
7
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
8
|
+
|
|
9
|
+
import packageJson from './package.json';
|
|
10
|
+
|
|
11
|
+
const packagePath = path.resolve(__dirname);
|
|
12
|
+
|
|
13
|
+
const documentation: StructuredContentSource = {
|
|
14
|
+
package: {
|
|
15
|
+
package: '@atlaskit/feedback-collector',
|
|
16
|
+
packagePath,
|
|
17
|
+
packageJson,
|
|
18
|
+
overview:
|
|
19
|
+
'A component that collects feedback across Atlassian products. It provides a consistent way for users to submit feedback, including bug reports and feature requests.',
|
|
20
|
+
},
|
|
21
|
+
components: [
|
|
22
|
+
{
|
|
23
|
+
name: 'FeedbackCollector',
|
|
24
|
+
description: 'The main component for collecting user feedback.',
|
|
25
|
+
status: 'general-availability',
|
|
26
|
+
import: {
|
|
27
|
+
name: 'default',
|
|
28
|
+
package: '@atlaskit/feedback-collector',
|
|
29
|
+
type: 'default',
|
|
30
|
+
packagePath,
|
|
31
|
+
packageJson,
|
|
32
|
+
},
|
|
33
|
+
usageGuidelines: [
|
|
34
|
+
'Use `FeedbackCollector` to trigger a feedback form from your application.',
|
|
35
|
+
'Provide `onClose` and `onSubmit` handlers to manage the feedback flow.',
|
|
36
|
+
],
|
|
37
|
+
keywords: ['feedback', 'collector', 'atlassian'],
|
|
38
|
+
categories: ['web-platform'],
|
|
39
|
+
examples: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Feedback collector',
|
|
42
|
+
description: 'Basic usage of FeedbackCollector.',
|
|
43
|
+
source: path.resolve(packagePath, './examples/02-feedback-collector.tsx'),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'FeedbackButton',
|
|
49
|
+
description: 'A button component used to trigger the feedback collector.',
|
|
50
|
+
status: 'general-availability',
|
|
51
|
+
import: {
|
|
52
|
+
name: 'FeedbackButton',
|
|
53
|
+
package: '@atlaskit/feedback-collector',
|
|
54
|
+
type: 'named',
|
|
55
|
+
packagePath,
|
|
56
|
+
packageJson,
|
|
57
|
+
},
|
|
58
|
+
usageGuidelines: [
|
|
59
|
+
'Use `FeedbackButton` to provide a consistent trigger for the feedback collector.',
|
|
60
|
+
],
|
|
61
|
+
keywords: ['feedback', 'button', 'trigger'],
|
|
62
|
+
categories: ['web-platform'],
|
|
63
|
+
examples: [
|
|
64
|
+
{
|
|
65
|
+
name: 'Feedback button',
|
|
66
|
+
description: 'Basic usage of FeedbackButton.',
|
|
67
|
+
source: path.resolve(packagePath, './examples/03-feedback-button.tsx'),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default documentation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/feedback-collector",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.2.0",
|
|
4
4
|
"description": "A component that collects feedback across Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/afm-i18n-platform-web-platform-feedback-collector": "2.
|
|
28
|
-
"@atlaskit/button": "^24.
|
|
29
|
-
"@atlaskit/checkbox": "^18.
|
|
30
|
-
"@atlaskit/flag": "^18.
|
|
31
|
-
"@atlaskit/form": "^16.
|
|
32
|
-
"@atlaskit/icon": "^36.
|
|
33
|
-
"@atlaskit/link": "^4.
|
|
34
|
-
"@atlaskit/modal-dialog": "^16.
|
|
27
|
+
"@atlaskit/afm-i18n-platform-web-platform-feedback-collector": "2.180.0",
|
|
28
|
+
"@atlaskit/button": "^24.3.0",
|
|
29
|
+
"@atlaskit/checkbox": "^18.1.0",
|
|
30
|
+
"@atlaskit/flag": "^18.1.0",
|
|
31
|
+
"@atlaskit/form": "^16.1.0",
|
|
32
|
+
"@atlaskit/icon": "^36.2.0",
|
|
33
|
+
"@atlaskit/link": "^4.1.0",
|
|
34
|
+
"@atlaskit/modal-dialog": "^16.1.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
36
|
-
"@atlaskit/section-message": "^9.
|
|
37
|
-
"@atlaskit/select": "^22.
|
|
38
|
-
"@atlaskit/textarea": "^9.
|
|
39
|
-
"@atlaskit/tokens": "^15.
|
|
40
|
-
"@atlaskit/visually-hidden": "^4.
|
|
36
|
+
"@atlaskit/section-message": "^9.2.0",
|
|
37
|
+
"@atlaskit/select": "^22.3.0",
|
|
38
|
+
"@atlaskit/textarea": "^9.1.0",
|
|
39
|
+
"@atlaskit/tokens": "^15.4.0",
|
|
40
|
+
"@atlaskit/visually-hidden": "^4.1.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|