diff --git a/.stylelintrc b/.stylelintrc index 3dacee5a..f52b603d 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -4,6 +4,6 @@ "color-named": "never", "color-no-hex": true, "font-family-no-missing-generic-family-keyword": [true, {"ignoreFontFamilies": ["Material Icons"]}], - "selector-type-no-unknown": [true, {"ignoreTypes": ["send-feedback", "webview"]}], + "selector-type-no-unknown": [true, {"ignoreTypes": ["webview"]}], } } diff --git a/app/common/typed-ipc.ts b/app/common/typed-ipc.ts index 5da11e8b..a16cc1bb 100644 --- a/app/common/typed-ipc.ts +++ b/app/common/typed-ipc.ts @@ -48,7 +48,6 @@ export interface RendererMessage { logout: () => void; "new-server": () => void; "open-about": () => void; - "open-feedback-modal": () => void; "open-help": () => void; "open-network-settings": () => void; "open-org-tab": () => void; diff --git a/app/main/menu.ts b/app/main/menu.ts index 67b4afb8..c26403fb 100644 --- a/app/main/menu.ts +++ b/app/main/menu.ts @@ -280,12 +280,8 @@ function getHelpSubmenu(): Electron.MenuItemConstructorOptions[] { }, { label: t.__("Report an Issue"), - click() { - // The goal is to notify the main.html BrowserWindow - // which may not be the focused window. - for (const window of BrowserWindow.getAllWindows()) { - send(window.webContents, "open-feedback-modal"); - } + async click() { + await shell.openExternal("https://zulip.com/help/contact-support"); }, }, ]; diff --git a/app/renderer/css/main.css b/app/renderer/css/main.css index 06dbff98..e04a6cdd 100644 --- a/app/renderer/css/main.css +++ b/app/renderer/css/main.css @@ -467,26 +467,3 @@ webview.focus { opacity: 1; } } - -send-feedback { - width: 60%; - height: 85%; -} - -#feedback-modal { - display: none; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(68, 67, 67, 0.81); - align-items: center; - justify-content: center; - z-index: 2; - transition: all 1s ease-out; -} - -#feedback-modal.show { - display: flex; -} diff --git a/app/renderer/js/feedback.ts b/app/renderer/js/feedback.ts deleted file mode 100644 index aff360d2..00000000 --- a/app/renderer/js/feedback.ts +++ /dev/null @@ -1,54 +0,0 @@ -import {remote} from "electron"; -import fs from "fs"; -import path from "path"; - -import SendFeedback from "@electron-elements/send-feedback"; - -const {app} = remote; - -customElements.define("send-feedback", SendFeedback); -export const sendFeedback: SendFeedback = - document.querySelector("send-feedback")!; -export const feedbackHolder = sendFeedback.parentElement!; - -// Make the button color match zulip app's theme -sendFeedback.customStylesheet = "css/feedback.css"; - -// Customize the fields of custom elements -sendFeedback.title = "Report Issue"; -sendFeedback.titleLabel = "Issue title:"; -sendFeedback.titlePlaceholder = "Enter issue title"; -sendFeedback.textareaLabel = "Describe the issue:"; -sendFeedback.textareaPlaceholder = - "Succinctly describe your issue and steps to reproduce it..."; - -sendFeedback.buttonLabel = "Report Issue"; -sendFeedback.loaderSuccessText = ""; - -sendFeedback.useReporter("emailReporter", { - email: "support@zulip.com", -}); - -feedbackHolder.addEventListener("click", (event: Event) => { - // Only remove the class if the grey out faded - // part is clicked and not the feedback element itself - if (event.target === event.currentTarget) { - feedbackHolder.classList.remove("show"); - } -}); - -sendFeedback.addEventListener("feedback-submitted", () => { - setTimeout(() => { - feedbackHolder.classList.remove("show"); - }, 1000); -}); - -sendFeedback.addEventListener("feedback-cancelled", () => { - feedbackHolder.classList.remove("show"); -}); - -const dataDir = app.getPath("userData"); -const logsDir = path.join(dataDir, "/Logs"); -sendFeedback.logs.push( - ...fs.readdirSync(logsDir).map((file) => path.join(logsDir, file)), -); diff --git a/app/renderer/js/main.ts b/app/renderer/js/main.ts index df83aa22..45a52cd2 100644 --- a/app/renderer/js/main.ts +++ b/app/renderer/js/main.ts @@ -14,7 +14,6 @@ import type {NavItem, ServerConf, TabData} from "../../common/types"; import FunctionalTab from "./components/functional-tab"; import ServerTab from "./components/server-tab"; import WebView from "./components/webview"; -import {feedbackHolder} from "./feedback"; import {ipcRenderer} from "./typed-ipc-renderer"; import * as DomainUtil from "./utils/domain-util"; import * as LinkUtil from "./utils/link-util"; @@ -1171,10 +1170,6 @@ class ServerManagerView { }, ); - ipcRenderer.on("open-feedback-modal", () => { - feedbackHolder.classList.add("show"); - }); - ipcRenderer.on("copy-zulip-url", () => { clipboard.writeText(this.getCurrentActiveServer()); }); diff --git a/app/renderer/main.html b/app/renderer/main.html index 7d3d1dd6..0ba35704 100644 --- a/app/renderer/main.html +++ b/app/renderer/main.html @@ -51,10 +51,6 @@
- -
- -