Feedback collector

Typescript ❤️

A component that collects feedback across Atlassian products.

Install
yarn add @atlaskit/feedback-collector
Source
Bundle
Changelog
Latest

14.0.3

Patch Changes

  • #118604 7c7d655f4449b - [ux] Fixes experience with feedback collector where it cuts off in viewport by passing shouldScrollInViewport to Modal component

Feedback collector is a wrapper around feedback form component that collects customer feedback across Atlassian products.

For more information about the Feedback Collector, check out this page.

Usage

import FeedbackCollector, { FeedbackFlag, FeedbackForm } from '@atlaskit/feedback-collector';

As a button

Click the button to display the feedback collector.

Feedback Collector Props

url string = "/gateway/api"

Override the URL for all HTTPS calls, only needed if service is not behind stargate (like the Atlaskit frontend itself)

customGatewayUrl string

A custom URL for the Stargate gateway, this field takes priority over url

customFeedbackUrl string

A custom URL for the Feedback Collector API, this field takes priority over url

shouldGetEntitlementDetails boolean = true

Whether to request email details and product entitlements

name string

The customer name

entrypointId string required

The id of the entrypoint in the feedback service; to acquire your entrypointId, visit the #feedback-collectors channel

additionalFields arrayType = []

Additional fields to send to the widget service *

Array
id string required
value required One of
string,
Object,
Array
Object

canBeContactedFieldId string = "customfield_10043"

Override the default id for the "can be contacted" custom field in your widget service *

canBeContactedAgreeValue union = [{ id: "10109" }]

Override the agree value for the "can be contacted" custom field in your widget service

One of
string,
Object,
Array
Object

canBeContactedDeclineValue union = [{ id: "10111" }]

Override the decline value for the "can be contacted" custom field in your widget service

One of
string,
Object,
Array
Object

customerNameFieldId string = "customfield_10045"

Override the default id for the "customer name" custom field in your widget service

customerNameDefaultValue union = "unknown"

Override the default value for the "customer name" custom field in your widget service

One of
string,
Object,
Array
Object

descriptionFieldId string = "description"

Override the default id for the "description" custom field in your widget service

descriptionDefaultValue union = ""

Override the default value for the "description" custom field in your widget service

One of
string,
Object,
Array
Object

enrollInResearchFieldId string = "customfield_10044"

Override the default id for the "enroll in research" custom field in your widget service

enrollInResearchAgreeValue union = [{ id: "10110" }]

Override the agree value for the "enroll in research" custom field in your widget service

One of
string,
Object,
Array
Object

enrollInResearchDeclineValue union = [{ id: "10112" }]

Override the decline value for the "enroll in research" custom field in your widget service

One of
string,
Object,
Array
Object

summaryFieldId string = "summary"

Override the default id for the "summary" custom field in your widget service

summaryDefaultValue union = ""

Override the default value for the "summary" custom field in your widget service

One of
string,
Object,
Array
Object

summaryTruncateLength number = 100

Number of characters that the "summary" field accepts, the rest will be truncated

timeoutOnSubmit number = 700

After this delay the onSubmit callback will be triggered optimistically

typeFieldId string = "customfield_10042"

Override the default id for the "type" custom field in your widget service

typeBugDefaultValue union = { id: "10105" }

Override the default value for the "Bug" type of response in your widget service

One of
string,
Object,
Array
Object

typeCommentDefaultValue union = { id: "10106" }

Override the default value for the "Comment" type of response in your widget service

One of
string,
Object,
Array
Object

typeSuggestionDefaultValue union = { id: "10107" }

Override the default value for the "Suggestion" type of response in your widget service

One of
string,
Object,
Array
Object

typeQuestionDefaultValue union = { id: "10108" }

Override the default value for the "Question" type of response in your widget service

One of
string,
Object,
Array
Object

typeEmptyDefaultValue union = { id: "empty" }

Override the default value for the "Empty" type of response in your widget service

One of
string,
Object,
Array
Object

showTypeField boolean = true

Override to hide the feedback type select drop down for the feedback

feedbackTitle default.ReactText

Message which will be shown as the title of the feedback dialog

default.ReactText

feedbackTitleDetails default.ReactChild

Message which will be shown below the title of the feedback dialog

default.ReactChild

enrolInResearchLabel default.ReactChild

Message which will be shown next to the enrol in research checkbox

default.ReactChild

canBeContactedLabel default.ReactChild

Message which will be shown next to the can be contacted checkbox

default.ReactChild

summaryPlaceholder string

Message which will be shown inside the summary text field

submitButtonLabel string

Message for submit button label

cancelButtonLabel string

Message for cancel button label

feedbackGroupLabels Record<union, object>

Message for select option labels and field labels

RecordOne of
"bug",
"comment",
"suggestion",
"question",
"empty"
,
fieldLabel string required
selectOptionLabel string required

onClose function = () => undefined

Function that will be called to initiate the exit transition.

() => undefined

onSubmit function = () => undefined

Function that will be called optimistically after a delay when the feedback is submitted.

formFields => undefined

locale string = "en"

Locale for i18n

customContent default.ReactChild

Optional custom modal content

default.ReactChild

showDefaultTextFields boolean = true

Override to hide the default text fields for feedback

atlassianAccountId string

Optional parameter for feedback submitter's Atlassian Account ID

email string

Optional parameter for feedback submitter's email address

anonymousFeedback boolean = false

Override to mark feedback as anonymous

selectLabel string

Optional custom label for select field

customTextAreaLabel string

Optional custom label for TextArea when showTypeField is false

customFeedbackOptions arrayType

Custom Select feedback options

Array
label required default.ReactText
value required One of
"bug",
"comment",
"suggestion",
"question",
"empty"

shouldReturnFocusRef default.RefObject<HTMLElement>

Optional ref to return focus to after feedback form is closed

default.RefObjectHTMLElement

Feedback form

Feedback form is a basic component that provides your the appearance and functionality of the feedback dialog pattern. It is not tied to any particular feedback collector.

As a button