Skip to content

Commit

Permalink
Merge pull request #8330 from wireapp/v/rc-2024-10-30
Browse files Browse the repository at this point in the history
chore: RC-2024-10-30
  • Loading branch information
V-Gira authored Oct 30, 2024
2 parents f6b2168 + 8bff96a commit a707f4b
Show file tree
Hide file tree
Showing 88 changed files with 5,193 additions and 2,491 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ updates:
versions:
- '> 4.x'
# these are being updated to esm modules after these versions and electron doesn't currently natively support it
# TODO: electron 28 now supports esm, so we can remove this ignore
- dependency-name: image-type
versions:
- '> 4.x'
- dependency-name: electron-dl
versions:
- '> 4.x'
- dependency-name: globby
versions:
- '> 11.x'
Expand All @@ -34,10 +38,26 @@ updates:
- dependency-name: electron-winstaller
versions:
- '> 4.x'
- dependency-name: eslint-plugin-no-unsanitized
versions:
- '> 4.0.x'
- package-ecosystem: npm
directory: '/app-config'
schedule:
interval: weekly
day: sunday
open-pull-requests-limit: 99
versioning-strategy: increase

# Github actions
- package-ecosystem: 'github-actions'
directory: '/'
open-pull-requests-limit: 99
schedule:
interval: 'daily'
# Docker
- package-ecosystem: 'docker'
directory: '/'
open-pull-requests-limit: 99
schedule:
interval: 'daily'
2 changes: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!---
PLEASE NOTE:
Please remember that this is a bug tracker in a source code repository and not a discussion board. All developers get notified of each comment and will take the time for reading and commenting isses. We want to keep this as a place to easily track bugs in our code.
If you have a feature request that affects Wire in general, was kindly ask you to file it at https://github.com/wireapp/wire/issues. Please direct feature requests specifically targeted at wire-desktop to our customer support at https://support.wire.com and/or social media channels.
Please direct feature requests specifically targeted at wire-desktop to our customer support at https://support.wire.com.
--->

Wire version: <!-- Check the About dialog or run the app with `--version` flag -->
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{github.token}}
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 18.x
- name: Yarn cache
uses: c-hive/[email protected]
- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -40,7 +40,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -54,4 +54,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: '${{secrets.WEBTEAM_AUTOMERGE_TOKEN}}'

Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/download_translations.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
name: Download translations

on:
push:
branches: [dev]
schedule:
- cron: '0 6 * * *'
- cron: '0 8 * * *'
workflow_dispatch:

concurrency:
group: translations-${{ github.ref }}
cancel-in-progress: true

jobs:
download_translations:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download translations
uses: crowdin/github-action@1.1.0
uses: crowdin/github-action@v1.20.4
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
CROWDIN_PROJECT_ID: 342373
with:
upload_sources: false
upload_sources: true
upload_translations: false
download_translations: true
skip_untranslated_files: false
Expand All @@ -29,6 +36,6 @@ jobs:
create_pull_request: true
pull_request_title: 'chore: Update translations'
token: ${{secrets.WEBTEAM_CROWDIN_TOKEN}}
source: '/electron/locale/en-US.json'
translation: '/electron/locale/%locale%.json'
source: '/electron/src/locale/en-US.json'
translation: '/electron/src/locale/%locale%.json'
base_path: '.'
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
name: Label PR based on title
runs-on: ubuntu-latest
steps:
- uses: srvaroa/labeler@v0.3
- uses: srvaroa/labeler@v1.11
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 18.x
cache: 'yarn'

- name: Install JS dependencies
Expand Down
4 changes: 2 additions & 2 deletions app-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"wire-web-config-internal": "https://github.com/wireapp/wire-web-config-default#v0.31.18",
"wire-web-config-production": "https://github.com/wireapp/wire-web-config-wire#v0.31.19-0"
"wire-web-config-internal": "https://github.com/wireapp/wire-web-config-default#v0.31.35",
"wire-web-config-production": "https://github.com/wireapp/wire-web-config-wire#v0.31.36"
}
}
4 changes: 2 additions & 2 deletions bin/bin-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import fs from 'fs-extra';
import os from 'os';
import path from 'path';
import {promisify} from 'util';
import UUID from 'uuidjs';
import {v4 as uuidv4} from 'uuid';

interface BackupResult {
backupPaths: string[];
Expand Down Expand Up @@ -51,7 +51,7 @@ export async function restoreFiles({originalPaths, backupPaths, tempDir}: Backup
await fs.remove(tempDir);
}

export const generateUUID = () => UUID.genV4().toString();
export const generateUUID = () => uuidv4();

export const getLogger = (namespace: string, name: string): Logger =>
LogFactory.getLogger(name, {forceEnable: true, namespace: `@wireapp/${namespace}`, separator: '/'});
Expand Down
2 changes: 2 additions & 0 deletions bin/build-tools/lib/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/

export interface CommonConfig {
aboutReleasesUrl: string;
aboutUpdatesUrl: string;
adminUrl: string;
appBase: string;
buildDir: string;
Expand Down
4 changes: 2 additions & 2 deletions bin/build-tools/lib/build-linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export async function buildLinuxConfig(
fpm: ['--name', linuxConfig.executableName],
};

const rpmDepends = ['alsa-lib', 'GConf2', 'libappindicator', 'libnotify', 'libXScrnSaver', 'libXtst', 'nss'];
const debDepends = ['libappindicator1', 'libasound2', 'libgconf-2-4', 'libnotify-bin', 'libnss3', 'libxss1'];
const rpmDepends = ['alsa-lib', 'libnotify', 'libXScrnSaver', 'libXtst', 'nss'];
const debDepends = ['libasound2', 'libnotify-bin', 'libnss3', 'libxss1'];

const builderConfig: electronBuilder.Configuration = {
afterPack: afterPackLinux,
Expand Down
2 changes: 2 additions & 0 deletions bin/build-tools/lib/commonConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export async function getCommonConfig(envFile: string, wireJson: string): Promis

const commonConfig: CommonConfig = {
...defaultConfig,
aboutReleasesUrl: process.env.URL_ABOUT_RELEASES || defaultConfig.aboutReleasesUrl,
aboutUpdatesUrl: process.env.URL_ABOUT_UPDATES || defaultConfig.aboutUpdatesUrl,
adminUrl: process.env.URL_ADMIN || defaultConfig.adminUrl,
appBase: process.env.APP_BASE || defaultConfig.appBase,
buildDir: defaultConfig.buildDir || 'wrap/build',
Expand Down
3 changes: 3 additions & 0 deletions electron/html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<h1 id="name"></h1>
<p class="copy"><span data-string="aboutVersion"></span> <span id="version"></span></p>
<p class="webappVersion copy"><span data-string="aboutWebappVersion"></span> <span id="webappVersion"></span></p>
<p class="webappAVSVersion copy">
<span data-string="aboutWebappAVSVersion"></span> <span id="webappAVSVersion"></span>
</p>
<p>
<a href="#" data-href="aboutUpdatesUrl" target="_blank"><span data-string="aboutUpdate"></span></a>
</p>
Expand Down
6 changes: 1 addition & 5 deletions electron/renderer/src/components/WebView/Webview.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@
}

.Webview.hide {
/**
* Electron's recommended way of using 0px width and height was causing
* render issues when selecting a webview for the first time
*/
z-index: var(--z-index-webview-hidden);
display: none;
}

.Webview-close {
Expand Down
5 changes: 3 additions & 2 deletions electron/renderer/src/components/WebView/Webview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ const Webview = ({

case EVENT_TYPE.LIFECYCLE.SIGNED_IN: {
if (conversationJoinData) {
window.sendConversationJoinToHost(accountId, conversationJoinData.code, conversationJoinData.key);
const {code, key, domain} = conversationJoinData;
window.sendConversationJoinToHost(accountId, code, key, domain);
setConversationJoinData(accountId, undefined);
}
updateAccountLifecycle(accountId, channel);
Expand Down Expand Up @@ -240,7 +241,7 @@ const Webview = ({

if (isConversationJoinData(data)) {
if (accountLifecycle === EVENT_TYPE.LIFECYCLE.SIGNED_IN) {
window.sendConversationJoinToHost(accountId, data.code, data.key);
window.sendConversationJoinToHost(accountId, data.code, data.key, data.domain);
setConversationJoinData(accountId, undefined);
} else {
setConversationJoinData(accountId, data);
Expand Down
4 changes: 2 additions & 2 deletions electron/renderer/src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import React from 'react';

import UUID from 'uuidjs';
import {v4 as uuidv4} from 'uuid';

export const noop = () => {};

Expand All @@ -31,4 +31,4 @@ export const preventFocus = (fn: (event: React.MouseEvent<Element, MouseEvent>)
};
};

export const generateUUID = () => UUID.genV4().toString();
export const generateUUID = () => uuidv4();
1 change: 1 addition & 0 deletions electron/renderer/src/types/account.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
export type ConversationJoinData = {
code: string;
key: string;
domain: string;
};

export type Account = {
Expand Down
39 changes: 39 additions & 0 deletions electron/src/calling/PictureInPictureCall.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Wire
* Copyright (C) 2024 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

import {getNewWindowOptions} from '../window/WindowUtil';

const PICTURE_IN_PICTURE_CALL_FRAME_NAME = 'WIRE_PICTURE_IN_PICTURE_CALL';

export const isPictureInPictureCallWindow = (frameName: string): boolean => {
return frameName === PICTURE_IN_PICTURE_CALL_FRAME_NAME;
};

export const getPictureInPictureCallWindowOptions = (): Electron.BrowserWindowConstructorOptions => {
return getNewWindowOptions({
autoHideMenuBar: true,
width: 1026,
height: 829,
resizable: true,
fullscreenable: true,
maximizable: true,
alwaysOnTop: false,
minimizable: true,
});
};
3 changes: 2 additions & 1 deletion electron/src/lib/CoreProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ export class CustomProtocolHandler {
logger.info('Joining conversation ...');
const code = route.searchParams.get('code');
const key = route.searchParams.get('key');
const domain = route.searchParams.get('domain');

try {
await this.windowManager.sendActionAndFocusWindow(EVENT_TYPE.ACTION.JOIN_CONVERSATION, {code, key});
await this.windowManager.sendActionAndFocusWindow(EVENT_TYPE.ACTION.JOIN_CONVERSATION, {code, key, domain});
} catch (error: any) {
logger.error(`Cannot join conversation: ${error.message}`, error);
}
Expand Down
3 changes: 3 additions & 0 deletions electron/src/lib/eventType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const EVENT_TYPE = {
},
ACTION: {
CHANGE_ENVIRONMENT: 'EVENT_TYPE.ACTION.CHANGE_ENVIRONMENT',
CHANGE_DOWNLOAD_LOCATION: 'EVENT_TYPE.ACTION.CHANGE_DOWNLOAD_LOCATION',
CREATE_SSO_ACCOUNT: 'EVENT_TYPE.ACTION.CREATE_SSO_ACCOUNT',
CREATE_SSO_ACCOUNT_RESPONSE: 'EVENT_TYPE.ACTION.CREATE_SSO_ACCOUNT_RESPONSE',
DECRYPT: 'EVENT_TYPE.ACTION.DECRYPT',
Expand All @@ -56,6 +57,7 @@ export const EVENT_TYPE = {
SHOW_NEXT: 'EVENT_TYPE.CONVERSATION.SHOW_NEXT',
SHOW_PREVIOUS: 'EVENT_TYPE.CONVERSATION.SHOW_PREVIOUS',
START: 'EVENT_TYPE.CONVERSATION.START',
SEARCH: 'EVENT_TYPE.CONVERSATION.SEARCH',
TOGGLE_MUTE: 'EVENT_TYPE.CONVERSATION.TOGGLE_MUTE',
VIDEO_CALL: 'EVENT_TYPE.CONVERSATION.VIDEO_CALL',
},
Expand Down Expand Up @@ -88,6 +90,7 @@ export const EVENT_TYPE = {
SYSTEM_MENU: 'EVENT_TYPE.UI.SYSTEM_MENU',
THEME_UPDATE: 'EVENT_TYPE.UI.THEME_UPDATE',
WEBAPP_VERSION: 'EVENT_TYPE.UI.WEBAPP_VERSION',
WEBAPP_AVS_VERSION: 'EVENT_TYPE.UI.WEBAPP_AVS_VERSION',
},
WEBAPP: {
APP_LOADED: 'EVENT_TYPE.WEBAPP.APP_LOADED',
Expand Down
Loading

0 comments on commit a707f4b

Please sign in to comment.