Skip to content

Commit

Permalink
Don't break the existing feedback flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Apr 24, 2024
1 parent 2c2716b commit 697d34b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion server_manager/web_app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ export class App {
manualServerEntryEl.clear();
})
.catch((e: Error) => {
console.log(e);
// Remove the progress indicator.
manualServerEntryEl.showConnection = false;
// Display either error dialog or feedback depending on error type.
Expand Down Expand Up @@ -267,6 +266,21 @@ export class App {
this.setMetricsEnabled(false);
});

appRoot.addEventListener('SubmitFeedback', (event: CustomEvent) => {
const detail: FeedbackDetail = event.detail;
try {
Sentry.captureEvent({
message: detail.userFeedback,
user: {email: detail.userEmail},
tags: {category: detail.feedbackCategory, cloudProvider: detail.cloudProvider},
});
appRoot.showNotification(appRoot.localize('notification-feedback-thanks'));
} catch (e) {
console.error(`Failed to submit feedback: ${e}`);
appRoot.showError(appRoot.localize('error-feedback'));
}
});

appRoot.addEventListener('SetLanguageRequested', (event: CustomEvent) => {
this.setAppLanguage(event.detail.languageCode, event.detail.languageDir);
});
Expand Down
2 changes: 1 addition & 1 deletion server_manager/web_app/ui_components/app-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ export class AppRoot extends polymerElementWithLocalize {
showManagerResourcesLink: {type: Boolean},
contactViewFeatureFlag: {
type: Boolean,
value: true,
value: false,
},
};
}
Expand Down

0 comments on commit 697d34b

Please sign in to comment.