From 812f3c5cc689eb22a09ddf0f669c339f95782dd3 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Tue, 14 Jan 2020 20:07:24 +0530 Subject: [PATCH 01/10] SDA-1665 - Set level to modal-panel when in fullscreen (#848) --- src/app/window-actions.ts | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/app/window-actions.ts b/src/app/window-actions.ts index 8229b896..5e9b7abf 100644 --- a/src/app/window-actions.ts +++ b/src/app/window-actions.ts @@ -144,10 +144,13 @@ export const activate = (windowName: string, shouldFocus: boolean = true): void /** * Sets always on top property based on isAlwaysOnTop * - * @param shouldSetAlwaysOnTop - * @param shouldActivateMainWindow + * @param shouldSetAlwaysOnTop {boolean} - Whether to enable always on top or not + * @param shouldActivateMainWindow {boolean} - Whether to active main window */ -export const updateAlwaysOnTop = async (shouldSetAlwaysOnTop: boolean, shouldActivateMainWindow: boolean = true): Promise => { +export const updateAlwaysOnTop = async ( + shouldSetAlwaysOnTop: boolean, + shouldActivateMainWindow: boolean = true, +): Promise => { logger.info(`window-actions: Should we set always on top? ${shouldSetAlwaysOnTop}!`); const browserWins: ICustomBrowserWindow[] = BrowserWindow.getAllWindows() as ICustomBrowserWindow[]; await config.updateUserConfig({ alwaysOnTop: shouldSetAlwaysOnTop }); @@ -198,6 +201,18 @@ export const handleKeyPress = (key: number): void => { } }; +/** + * Sets the window to always on top based + * on fullscreen state + */ +const setSpecificAlwaysOnTop = () => { + const browserWindow = BrowserWindow.getFocusedWindow(); + if (isMac && browserWindow && windowExists(browserWindow) && browserWindow.isAlwaysOnTop()) { + // Set the focused window's always on top level based on fullscreen state + browserWindow.setAlwaysOnTop(true, browserWindow.isFullScreen() ? 'modal-panel' : 'floating'); + } +}; + /** * Monitors window actions * @@ -223,6 +238,13 @@ export const monitorWindowActions = (window: BrowserWindow): void => { if ((window as ICustomBrowserWindow).winName === apiName.mainWindowName) { window.on('restore', throttledWindowRestore); } + + // Workaround for an issue with MacOS + AlwaysOnTop + // Issue: SDA-1665 + if (isMac) { + window.on('enter-full-screen', setSpecificAlwaysOnTop); + window.on('leave-full-screen', setSpecificAlwaysOnTop); + } }; /** @@ -246,6 +268,13 @@ export const removeWindowEventListener = (window: BrowserWindow): void => { window.removeListener('leave-full-screen', throttledWindowChanges); window.removeListener('unmaximize', throttledWindowChanges); + + // Workaround for and issue with MacOS + AlwaysOnTop + // Issue: SDA-1665 + if (isMac) { + window.removeListener('enter-full-screen', setSpecificAlwaysOnTop); + window.removeListener('leave-full-screen', setSpecificAlwaysOnTop); + } }; /** From 500100d7cc9eed0f2c53c4cc07a7bbc9d6bfc9c0 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Tue, 14 Jan 2020 20:07:57 +0530 Subject: [PATCH 02/10] SDA-1668: add entitlements for macOS catalina (#849) --- entitlements.mac.plist | 13 +++++++++++++ package.json | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 entitlements.mac.plist diff --git a/entitlements.mac.plist b/entitlements.mac.plist new file mode 100644 index 00000000..fdba46cc --- /dev/null +++ b/entitlements.mac.plist @@ -0,0 +1,13 @@ + + + + + com.apple.security.cs.allow-jit + com.apple.security.cs.allow-unsigned-executable-memory + com.apple.security.cs.allow-dyld-environment-variables + com.apple.security.device.audio-input + com.apple.security.device.camera + com.apple.security.files.user-selected.read-write + com.apple.security.network.client + + \ No newline at end of file diff --git a/package.json b/package.json index c10969b5..19221459 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,9 @@ ], "mac": { "category": "public.app-category.business", - "icon": "images/icon.icns" + "icon": "images/icon.icns", + "entitlements": "entitlements.mac.plist", + "entitlementsInherit": "entitlements.mac.plist" }, "win": { "icon": "images/icon.ico", From 4723c0a9e57a3cafb4ce412ea46111633d18fb40 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Thu, 16 Jan 2020 14:14:59 +0530 Subject: [PATCH 03/10] bump up version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c10969b5..b9f4694a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "symphony", "productName": "Symphony", - "version": "6.0.0", + "version": "6.1.0", "clientVersion": "2.0.1", "buildNumber": "0", "searchAPIVersion": "1.55.3", From c8158656c9c5fd7b9561257127e849db8967cc35 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 17 Jan 2020 14:08:13 +0530 Subject: [PATCH 04/10] add label workflow --- .github/workflows/label.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 00000000..e90b599b --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,19 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler/blob/master/README.md + +name: Labeler +on: [pull_request] + +jobs: + label: + + runs-on: ubuntu-latest + + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" From a5f772de90a1081c1e2b902658e25b58e3f7a8a9 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 17 Jan 2020 14:09:56 +0530 Subject: [PATCH 05/10] add stale workflow --- .github/workflows/stale.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..7bbc0505 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' From 9ba2a3f1f3d44d6f084635eceab15bc008a0850f Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 17 Jan 2020 14:11:43 +0530 Subject: [PATCH 06/10] add backport action --- .github/workflows/backport.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000..26801ebb --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,16 @@ +name: Backport +on: + pull_request: + types: + - closed + - labeled + +jobs: + backport: + runs-on: ubuntu-18.04 + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From 6255b32f2278e3f4f8b39889c43c493f522964bb Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 17 Jan 2020 14:20:18 +0530 Subject: [PATCH 07/10] Create delete-merged-branch.yml --- .github/workflows/delete-merged-branch.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/delete-merged-branch.yml diff --git a/.github/workflows/delete-merged-branch.yml b/.github/workflows/delete-merged-branch.yml new file mode 100644 index 00000000..9a3ab780 --- /dev/null +++ b/.github/workflows/delete-merged-branch.yml @@ -0,0 +1,2 @@ +- name: Delete merged branch + uses: SvanBoxel/delete-merged-branch@v1.3.3 From a6d9da66b2a49ed9e29fa3c0338f0c1b5cb98d57 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 17 Jan 2020 14:22:01 +0530 Subject: [PATCH 08/10] Delete delete-merged-branch.yml --- .github/workflows/delete-merged-branch.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .github/workflows/delete-merged-branch.yml diff --git a/.github/workflows/delete-merged-branch.yml b/.github/workflows/delete-merged-branch.yml deleted file mode 100644 index 9a3ab780..00000000 --- a/.github/workflows/delete-merged-branch.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: Delete merged branch - uses: SvanBoxel/delete-merged-branch@v1.3.3 From 211f551107243cce96ab1a9a67c041aad428595e Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Mon, 20 Jan 2020 14:04:17 +0530 Subject: [PATCH 09/10] Update backport.yml --- .github/workflows/backport.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 26801ebb..195dbd13 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,16 +1,9 @@ -name: Backport -on: - pull_request: - types: - - closed - - labeled - -jobs: - backport: - runs-on: ubuntu-18.04 - name: Backport - steps: - - name: Backport - uses: tibdex/backport@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} +- name: Backport + uses: qcastel/github-actions-backport@master + with: + backport-branches-regex: "*" + + git-release-bot-name: "release-bot" + git-release-bot-email: "release-bot@example.com" + + access-token: ${{ secrets.GITHUB_ACCESS_TOKEN }} From 0fe59ffb19417ab65c85e039b6c7331a0756e845 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Mon, 20 Jan 2020 14:08:39 +0530 Subject: [PATCH 10/10] Update backport.yml --- .github/workflows/backport.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 195dbd13..26801ebb 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,9 +1,16 @@ -- name: Backport - uses: qcastel/github-actions-backport@master - with: - backport-branches-regex: "*" - - git-release-bot-name: "release-bot" - git-release-bot-email: "release-bot@example.com" - - access-token: ${{ secrets.GITHUB_ACCESS_TOKEN }} +name: Backport +on: + pull_request: + types: + - closed + - labeled + +jobs: + backport: + runs-on: ubuntu-18.04 + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }}