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

Commit 32c008b

Browse files
authored
Add additional metadata to feedback submitted through spotlight dialog (#9024)
1 parent 8c67984 commit 32c008b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/components/views/dialogs/FeedbackDialog.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ const existingIssuesUrl = "https://github.com/vector-im/element-web/issues" +
3333
"?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc";
3434
const newIssueUrl = "https://github.com/vector-im/element-web/issues/new/choose";
3535

36-
interface IProps extends IDialogProps {}
36+
interface IProps extends IDialogProps {
37+
feature?: string;
38+
}
3739

3840
const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
3941
const feedbackRef = useRef<Field>();
@@ -55,7 +57,8 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
5557
const onFinished = (sendFeedback: boolean): void => {
5658
if (hasFeedback && sendFeedback) {
5759
if (rageshakeUrl) {
58-
submitFeedback(rageshakeUrl, "feedback", comment, canContact);
60+
const label = props.feature ? `${props.feature}-feedback` : "feedback";
61+
submitFeedback(rageshakeUrl, label, comment, canContact);
5962
}
6063

6164
Modal.createDialog(InfoDialog, {

src/components/views/dialogs/spotlight/SpotlightDialog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,9 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
10041004
};
10051005

10061006
const openFeedback = SdkConfig.get().bug_report_endpoint_url ? () => {
1007-
Modal.createDialog(FeedbackDialog);
1007+
Modal.createDialog(FeedbackDialog, {
1008+
feature: "spotlight",
1009+
});
10081010
} : null;
10091011

10101012
const activeDescendant = rovingContext.state.activeRef?.current?.id;

0 commit comments

Comments
 (0)