Skip to content

Commit ca8ce1d

Browse files
priyank-pakashnimare
authored andcommitted
report-issue: Add report issue UX using send-feedback electron element.
This uses @electron-elements/send-feedback package to easily implement UX for reporting issues.
1 parent f70432f commit ca8ce1d

File tree

8 files changed

+12121
-8
lines changed

8 files changed

+12121
-8
lines changed

app/main/menu.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
2-
const os = require('os');
32
const path = require('path');
43

54
const { app, shell, BrowserWindow, Menu, dialog } = require('electron');
@@ -139,13 +138,11 @@ class AppMenu {
139138
}, {
140139
label: 'Report an Issue...',
141140
click() {
142-
const body = `
143-
<!-- Please succinctly describe your issue and steps to reproduce it. -->
144-
-
145-
${app.getName()} ${app.getVersion()}
146-
Electron ${process.versions.electron}
147-
${process.platform} ${process.arch} ${os.release()}`;
148-
shell.openExternal(`https://github.com/zulip/zulip-electron/issues/new?body=${encodeURIComponent(body)}`);
141+
// the goal is to notify the main.html BrowserWindow
142+
// which may not be the focused window.
143+
BrowserWindow.getAllWindows().forEach(window => {
144+
window.webContents.send('open-feedback-modal');
145+
});
149146
}
150147
}];
151148
}

0 commit comments

Comments
 (0)