Skip to content

Commit

Permalink
Pull in develop branch which was synced from upstream (#10)
Browse files Browse the repository at this point in the history
* Upgrade dependency to matrix-js-sdk@31.5.0-rc.0

* v3.94.0-rc.0

* Handle up/down as well as left/right for horizontal toolbars for improved a11y (matrix-org#12305)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove references to internal js-sdk type `CryptoBackend` (matrix-org#12321)

* Remove references to internal js-sdk type `CryptoBackend`

* Use `Paramteters` to avoid `ts-ignore`

* Use `strong` element to semantically denote visually emphasised content (matrix-org#12320)

* Use `strong` element to semantically denote visually emphasised content

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add comment

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove unused slider component (matrix-org#12303)

It is unused as of matrix-org#12246. I noticed this while working on matrix-org#12299.

* Update matrix-org (matrix-org#11966)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (matrix-org#12322)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency stylelint-scss to v6.2.0 (matrix-org#12323)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @vector-im/compound-web to v3.1.3 (matrix-org#12281)

* Update dependency @vector-im/compound-web to v3.1.3

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix TAC width due to compound update (matrix-org#12326)

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Florian Duros <florianduros@element.io>

* Call guest access link creation to join calls as a non registered user via the EC SPA (matrix-org#12259)

* Add externall call link button if in public call room

Signed-off-by: Timo K <toger5@hotmail.de>

* Allow configuring a spa homeserver url.

Signed-off-by: Timo K <toger5@hotmail.de>

* temp

Signed-off-by: Timo K <toger5@hotmail.de>

* remove homeserver url

Signed-off-by: Timo K <toger5@hotmail.de>

* Add custom title to share dialog.
So that we can use it as a "share call" dialog.

Signed-off-by: Timo K <toger5@hotmail.de>

* - rename config options
- only show link button if a guest url is provided
- share dialog custom Title
- rename call share labels

Signed-off-by: Timo K <toger5@hotmail.de>

* rename to title_link

Signed-off-by: Timo K <toger5@hotmail.de>

* add tests for ShareDialog

Signed-off-by: Timo K <toger5@hotmail.de>

* add tests for share call button

Signed-off-by: Timo K <toger5@hotmail.de>

* review

Signed-off-by: Timo K <toger5@hotmail.de>

* remove comment

Signed-off-by: Timo K <toger5@hotmail.de>

* Update src/components/views/dialogs/ShareDialog.tsx

Co-authored-by: David Baker <dbkr@users.noreply.github.com>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>

* Fix spotlight opening in TAC (matrix-org#12315)

* Fix spotlight opening in TAC

* Add tests

* Remove `RovingTabIndexProvider`

* Reset power selector on API failure to prevent state mismatch (matrix-org#12319)

* Reset power selector on API failure to prevent state mismatch

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Allow onChange to be sync or async

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add unmounted check

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve coverage

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Use correct push rule to evaluate room-wide mentions (matrix-org#12318)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve Forward Dialog a11y by switching to roving tab index interactions (matrix-org#12306)

* Improve Forward Dialog a11y by switching to roving tab index interactions

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve screen reader readout

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve screen reader readout

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* [create-pull-request] automated change (matrix-org#12330)

Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>

* Reuse media content/info types from the js-sdk (matrix-org#12308)

* TAC: Fix CSS & component typos (matrix-org#12333)

* Fix CSS & component typo

* Update snapshots

* Element Call: fix widget shown while its still loading (`waitForIframeLoad=false`) (matrix-org#12292)

* show loading spinner also if waitForIframeLoad = false
Configure EC so it waits for the content loaded action
!WARNING This breaks compatibility with the full mesh branch.
I would like to discuss here if/when we can do that.

Signed-off-by: Timo K <toger5@hotmail.de>

* stop show loading screen on widget ready (instead of preparing)

Signed-off-by: Timo K <toger5@hotmail.de>

* wait until widget loading is over before comparing screenshots

Signed-off-by: Timo K <toger5@hotmail.de>

* fix waitForIFrame=true widgets

Signed-off-by: Timo K <toger5@hotmail.de>

* test

Signed-off-by: Timo K <toger5@hotmail.de>

* always start with loading true. + cleanup

Signed-off-by: Timo K <toger5@hotmail.de>

* simplify loading

Signed-off-by: Timo K <toger5@hotmail.de>

* update snapshots (start not in loading state for waitForIframe = true widgets)

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>

* Upgrade dependency to matrix-js-sdk@31.5.0

* v3.94.0

* Resetting package fields for development

* Reset matrix-js-sdk back to develop branch

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: RiotRobot <releases@riot.im>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Robin <robin@robin.town>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
  • Loading branch information
10 people authored Mar 13, 2024
1 parent 69e37ff commit 1054d61
Show file tree
Hide file tree
Showing 98 changed files with 1,352 additions and 1,071 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ module.exports = {
group: [
"matrix-js-sdk/src/**",
"!matrix-js-sdk/src/matrix",
"!matrix-js-sdk/src/types",
"matrix-js-sdk/lib",
"matrix-js-sdk/lib/",
"matrix-js-sdk/lib/**",
Expand Down Expand Up @@ -125,8 +126,6 @@ module.exports = {
"!matrix-js-sdk/src/crypto/verification/QRCode",
"!matrix-js-sdk/src/crypto/verification/request",
"!matrix-js-sdk/src/crypto/verification/request/VerificationRequest",
"!matrix-js-sdk/src/common-crypto",
"!matrix-js-sdk/src/common-crypto/CryptoBackend",
"!matrix-js-sdk/src/oidc",
"!matrix-js-sdk/src/oidc/discovery",
"!matrix-js-sdk/src/oidc/authorize",
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
Changes in [3.94.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.94.0) (2024-03-12)
=====================================================================================================
## ✨ Features

* Refine styles of controls to match Compound ([#12299](https://github.com/matrix-org/matrix-react-sdk/pull/12299)). Contributed by @robintown.
* Hide the archived section ([#12286](https://github.com/matrix-org/matrix-react-sdk/pull/12286)). Contributed by @dbkr.
* Add theme data to EC widget Url ([#12279](https://github.com/matrix-org/matrix-react-sdk/pull/12279)). Contributed by @toger5.
* Update MSC2965 OIDC Discovery implementation ([#12245](https://github.com/matrix-org/matrix-react-sdk/pull/12245)). Contributed by @t3chguy.
* Use green dot for activity notification in `LegacyRoomHeader` ([#12270](https://github.com/matrix-org/matrix-react-sdk/pull/12270)). Contributed by @florianduros.

## 🐛 Bug Fixes

* Fix requests for senders to submit auto-rageshakes ([#12304](https://github.com/matrix-org/matrix-react-sdk/pull/12304)). Contributed by @richvdh.
* fix automatic DM avatar with functional members ([#12157](https://github.com/matrix-org/matrix-react-sdk/pull/12157)). Contributed by @HarHarLinks.
* Feeds event with relation to unknown to the widget ([#12283](https://github.com/matrix-org/matrix-react-sdk/pull/12283)). Contributed by @maheichyk.
* Fix TAC opening with keyboard ([#12285](https://github.com/matrix-org/matrix-react-sdk/pull/12285)). Contributed by @florianduros.
* Allow screenshot update docker to run multiple test files ([#12291](https://github.com/matrix-org/matrix-react-sdk/pull/12291)). Contributed by @dbkr.
* Fix alignment of user menu avatar ([#12289](https://github.com/matrix-org/matrix-react-sdk/pull/12289)). Contributed by @dbkr.
* Fix buttons of widget in a room ([#12288](https://github.com/matrix-org/matrix-react-sdk/pull/12288)). Contributed by @florianduros.
* ModuleAPI: `overwrite_login` action was not stopping the existing client resulting in the action failing with rust-sdk ([#12272](https://github.com/matrix-org/matrix-react-sdk/pull/12272)). Contributed by @BillCarsonFr.


Changes in [3.93.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.93.0) (2024-02-27)
=====================================================================================================
## 🦖 Deprecations
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matrix-react-sdk",
"version": "3.93.0",
"version": "3.94.0",
"description": "SDK for matrix.org using React",
"author": "matrix.org",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import { expect, test } from ".";
import { CommandOrControl } from "../../utils";

test.describe("Threads Activity Centre", () => {
test.use({
Expand Down Expand Up @@ -118,4 +119,19 @@ test.describe("Threads Activity Centre", () => {
]);
await expect(util.getTacPanel()).toMatchScreenshot("tac-panel-notification-unread.png");
});

test("should block the Spotlight to open when the TAC is opened", async ({ util, page }) => {
const toggleSpotlight = () => page.keyboard.press(`${CommandOrControl}+k`);

// Sanity check
// Open and close the spotlight
await toggleSpotlight();
await expect(page.locator(".mx_SpotlightDialog")).toBeVisible();
await toggleSpotlight();

await util.openTac();
// The spotlight should not be opened
await toggleSpotlight();
await expect(page.locator(".mx_SpotlightDialog")).not.toBeVisible();
});
});
1 change: 0 additions & 1 deletion res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
@import "./views/elements/_SearchWarning.pcss";
@import "./views/elements/_ServerPicker.pcss";
@import "./views/elements/_SettingsFlag.pcss";
@import "./views/elements/_Slider.pcss";
@import "./views/elements/_Spinner.pcss";
@import "./views/elements/_StyledCheckbox.pcss";
@import "./views/elements/_StyledRadioButton.pcss";
Expand Down
10 changes: 7 additions & 3 deletions res/css/structures/_ThreadsActivityCentre.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
* /
*/

.mx_ThreadsActivityCentre_container {
display: flex;
}

.mx_ThreadsActivityCentreButton {
border-radius: 8px;
margin: 18px auto auto auto;
Expand Down Expand Up @@ -58,12 +62,12 @@
}
}

.mx_ThreadsActivity_rows {
.mx_ThreadsActivityCentre_rows {
overflow-y: scroll;
/* Let some space at the top and the bottom of the pop-up */
max-height: calc(100vh - 200px);

.mx_ThreadsActivityRow {
.mx_ThreadsActivityCentreRow {
height: 48px;

/* Make the label of the MenuItem stay on one line and truncate with ellipsis if needed */
Expand All @@ -72,7 +76,7 @@
overflow: hidden;
text-overflow: ellipsis;
/* Arbitrary size, keep the TAC as the wanted width */
width: 194px;
width: 202px;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion res/css/views/dialogs/_ForwardDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ limitations under the License.
padding: 6px;
border-radius: 8px;

&:hover {
&:hover,
&.mx_ForwardList_entry_active {
background-color: $spacePanel-bg-color;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ limitations under the License.
.mx_AccessSecretStorageDialog_reset {
position: relative;
padding-inline-start: $spacingStart;
/* To avoid bold styling inherent with <strong> elements */
font-weight: inherit;

&::before {
content: "";
Expand Down
126 changes: 0 additions & 126 deletions res/css/views/elements/_Slider.pcss

This file was deleted.

2 changes: 0 additions & 2 deletions res/themes/dark/css/_dark.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ $progressbar-bg-color: var(--cpd-color-gray-200);
$kbd-border-color: $strong-input-border-color;
$visual-bell-bg-color: #800;
$event-timestamp-color: $text-secondary-color;
$slider-background-color: $quinary-content;
$appearance-tab-border-color: $room-highlight-color;
$composer-shadow-color: rgba(0, 0, 0, 0.28);
$breadcrumb-placeholder-bg-color: #272c35;
$theme-button-bg-color: #e3e8f0;
Expand Down
3 changes: 0 additions & 3 deletions res/themes/legacy-dark/css/_legacy-dark.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ $breadcrumb-placeholder-bg-color: #272c35;
$voice-record-stop-border-color: #6f7882;
$voice-record-icon-color: #6f7882;

/* Appearance tab colors */
$appearance-tab-border-color: $room-highlight-color;

$composer-shadow-color: tranparent;

$codeblock-background-color: #2a3039;
Expand Down
6 changes: 0 additions & 6 deletions res/themes/legacy-light/css/_legacy-light.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@ $visual-bell-bg-color: #faa;
$togglesw-off-color: #c1c9d6;
$togglesw-ball-color: var(--cpd-color-bg-action-primary-rest);

/* Slider */
$slider-background-color: #c1c9d6;

$progressbar-bg-color: rgba(141, 151, 165, 0.2);

$authpage-bg-color: #2e3649;
Expand Down Expand Up @@ -305,9 +302,6 @@ $voice-record-live-circle-color: #ff4b55;
$voice-record-stop-border-color: #e3e8f0;
$voice-record-icon-color: $tertiary-fg-color;

/* FontSlider colors */
$appearance-tab-border-color: $input-darker-bg-color;

$composer-shadow-color: tranparent;

$codeblock-background-color: $header-panel-bg-color;
Expand Down
5 changes: 0 additions & 5 deletions res/themes/light-high-contrast/css/_light-high-contrast.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ $button-secondary-bg-color: $accent-fg-color;
$message-action-bar-fg-color: $primary-content;
$voice-record-stop-border-color: $quinary-content;
$voice-record-icon-color: $tertiary-content;
$appearance-tab-border-color: $input-darker-bg-color;
$eventbubble-reply-color: $quaternary-content;
$roomtopic-color: $secondary-content;

Expand Down Expand Up @@ -104,10 +103,6 @@ $accent-1400: var(--cpd-color-green-1400);
background-color: $panel-actions !important;
}

.mx_FontScalingPanel_fontSlider {
background-color: $panel-actions !important;
}

.mx_ThemeChoicePanel_themeSelectors > .mx_StyledRadioButton input[type="radio"]:disabled + div {
border-color: $primary-content;
}
Expand Down
2 changes: 0 additions & 2 deletions res/themes/light/css/_light.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ $progressbar-bg-color: var(--cpd-color-gray-200);
$kbd-border-color: $strong-input-border-color;
$visual-bell-bg-color: #faa;
$event-timestamp-color: #acacac;
$slider-background-color: $togglesw-off-color;
$appearance-tab-border-color: $input-darker-bg-color;
$composer-shadow-color: rgba(0, 0, 0, 0.04);
$breadcrumb-placeholder-bg-color: #e8eef5;
$theme-button-bg-color: $quinary-content;
Expand Down
27 changes: 27 additions & 0 deletions src/@types/matrix-js-sdk.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2024 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import { BLURHASH_FIELD } from "../utils/image-media";

// Matrix JS SDK extensions
declare module "matrix-js-sdk" {
export interface FileInfo {
/**
* @see https://github.com/matrix-org/matrix-spec-proposals/pull/2448
*/
[BLURHASH_FIELD]?: string;
}
}
18 changes: 9 additions & 9 deletions src/ContentMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ import {
UploadProgress,
THREAD_RELATION_TYPE,
} from "matrix-js-sdk/src/matrix";
import {
ImageInfo,
AudioInfo,
VideoInfo,
EncryptedFile,
MediaEventContent,
MediaEventInfo,
} from "matrix-js-sdk/src/types";
import encrypt from "matrix-encrypt-attachment";
import extractPngChunks from "png-chunks-extract";
import { logger } from "matrix-js-sdk/src/logger";
import { removeElement } from "matrix-js-sdk/src/utils";

import {
AudioInfo,
EncryptedFile,
ImageInfo,
IMediaEventContent,
IMediaEventInfo,
VideoInfo,
} from "./customisations/models/IMediaEventContent";
import dis from "./dispatcher/dispatcher";
import { _t } from "./languageHandler";
import Modal from "./Modal";
Expand Down Expand Up @@ -537,7 +537,7 @@ export default class ContentMessages {
promBefore?: Promise<any>,
): Promise<void> {
const fileName = file.name || _t("common|attachment");
const content: Omit<IMediaEventContent, "info"> & { info: Partial<IMediaEventInfo> } = {
const content: Omit<MediaEventContent, "info"> & { info: Partial<MediaEventInfo> } = {
body: fileName,
info: {
size: file.size,
Expand Down
Loading

0 comments on commit 1054d61

Please sign in to comment.