Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Add additional metadata to feedback submitted through spotlight dialog #9024

Merged
merged 2 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/components/views/dialogs/FeedbackDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const existingIssuesUrl = "https://github.com/vector-im/element-web/issues" +
"?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc";
const newIssueUrl = "https://github.com/vector-im/element-web/issues/new/choose";

interface IProps extends IDialogProps {}
interface IProps extends IDialogProps {
feature?: string;
}

const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
const feedbackRef = useRef<Field>();
Expand All @@ -55,7 +57,8 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
const onFinished = (sendFeedback: boolean): void => {
if (hasFeedback && sendFeedback) {
if (rageshakeUrl) {
submitFeedback(rageshakeUrl, "feedback", comment, canContact);
const label = props.feature ? `${props.feature}-feedback` : "feedback";
submitFeedback(rageshakeUrl, label, comment, canContact);
}

Modal.createDialog(InfoDialog, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,9 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
};

const openFeedback = SdkConfig.get().bug_report_endpoint_url ? () => {
Modal.createDialog(FeedbackDialog);
Modal.createDialog(FeedbackDialog, {
feature: "spotlight",
});
} : null;

const activeDescendant = rovingContext.state.activeRef?.current?.id;
Expand Down