Skip to content

Commit

Permalink
Merge branch 'develop' into kerry/25656/after-login-fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry authored Jul 11, 2023
2 parents 3d1611e + 311c5fe commit 5edafb6
Show file tree
Hide file tree
Showing 18 changed files with 547 additions and 406 deletions.
2 changes: 2 additions & 0 deletions .github/cfp_headers
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
! Access-Control-Allow-Origin
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

/version
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/static_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,6 @@ jobs:
- name: Typecheck
run: "yarn run lint:types"

tsc-strict:
name: Typescript Strict Error Checker
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
pull-requests: read
checks: write
steps:
- uses: actions/checkout@v3

- name: Install Deps
run: "scripts/layered.sh"

- name: Get diff lines
id: diff
uses: Equip-Collaboration/diff-line-numbers@e752977e2cb4207d671bb9e4dad18c07c1b73d52 # v1.1.0
with:
include: '["\\.tsx?$"]'

- name: Detecting files changed
id: files
uses: futuratrepadeira/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0 # v4.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pattern: '^.*\.tsx?$'

- uses: t3chguy/typescript-check-action@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
use-check: false
check-fail-mode: added
output-behaviour: annotate
ts-extra-args: "--strict --noImplicitAny"
files-changed: ${{ steps.files.outputs.files_updated }}
files-added: ${{ steps.files.outputs.files_created }}
files-deleted: ${{ steps.files.outputs.files_deleted }}
line-numbers: ${{ steps.diff.outputs.lineNumbers }}

i18n_lint:
name: "i18n Check"
uses: matrix-org/matrix-react-sdk/.github/workflows/i18n_check.yml@develop
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/update-topics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Update release topics
on:
workflow_dispatch:
inputs:
expected_status:
description: What type of release is the next expected release
required: true
default: RC
type: choice
options:
- RC
- Release
expected_date:
description: Expected release date e.g. July 11th
required: true
type: string
concurrency: ${{ github.workflow }}
jobs:
bot:
name: Release topic update
runs-on: ubuntu-latest
environment: Matrix
steps:
- id: stable
uses: fangqiuming/latest-release-version@45b2da0e20968cd18c356c548d3c5ccb7318bb8f

- uses: actions/github-script@v6
env:
HS_URL: ${{ secrets.BETABOT_HS_URL }}
LOBBY_ROOM_ID: ${{ secrets.ROOM_ID }}
PUBLIC_ROOM_ID: "!YTvKGNlinIzlkMTVRl:matrix.org"
ANNOUNCEMENT_ROOM_ID: "!bijaLdadorKgNGtHdA:matrix.org"
TOKEN: ${{ secrets.BETABOT_ACCESS_TOKEN }}
RELEASE_TOPIC: "Stable: ${{ steps.stable.outputs.tag_name }} | Release status: ${{ inputs.expected_status }} expected ${{ inputs.expected_date }}"
with:
script: |
const { HS_URL, TOKEN, RELEASE_TOPIC, LOBBY_ROOM_ID, PUBLIC_ROOM_ID, ANNOUNCEMENT_ROOM_ID } = process.env;
const regex = /Stable: v(\d+.\d+.\d+) \| Release status: (\w+) expected (\w+ \d+\w+)/gm;
async function updateReleaseInTopic(roomId) {
const apiUrl = `${HS_URL}/_matrix/client/v3/rooms/${roomId}/state/m.room.topic/`;
const headers = {
"Content-Type": "application/json",
"Authorization": `Bearer ${TOKEN}`,
};
await fetch(`${HS_URL}/_matrix/client/v3/rooms/${roomId}/join`, {
method: "POST",
headers,
body: "{}",
});
let res = await fetch(apiUrl, {
method: "GET",
headers,
});
const data = await res.json();
const topic = data.topic.replace(regex, RELEASE_TOPIC);
if (topic === data.topic) {
console.log(roomId, "nothing to do");
return;
}
if (data["org.matrix.msc3765.topic"]) {
data["org.matrix.msc3765.topic"].forEach(d => {
d.body = d.body.replace(regex, RELEASE_TOPIC);
});
}
res = await fetch(apiUrl, {
method: "PUT",
body: JSON.stringify({
...data,
topic,
}),
headers,
});
if (res.ok) {
console.log(roomId, "topic updated:", topic);
} else {
console.log(roomId, await res.text());
}
}
await updateReleaseInTopic(LOBBY_ROOM_ID);
await updateReleaseInTopic(PUBLIC_ROOM_ID);
await updateReleaseInTopic(ANNOUNCEMENT_ROOM_ID);
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
Changes in [1.11.35](https://github.com/vector-im/element-web/releases/tag/v1.11.35) (2023-07-04)
=================================================================================================

## 🦖 Deprecations
* Remove `feature_favourite_messages` as it is has been abandoned for now ([\#11097](https://github.com/matrix-org/matrix-react-sdk/pull/11097)). Fixes #25555.

## ✨ Features
* Don't setup keys on login when encryption is force disabled ([\#11125](https://github.com/matrix-org/matrix-react-sdk/pull/11125)). Contributed by @kerryarchibald.
* OIDC: attempt dynamic client registration ([\#11074](https://github.com/matrix-org/matrix-react-sdk/pull/11074)). Fixes #25468 and #25467. Contributed by @kerryarchibald.
* OIDC: Check static client registration and add login flow ([\#11088](https://github.com/matrix-org/matrix-react-sdk/pull/11088)). Fixes #25467. Contributed by @kerryarchibald.
* Improve message body output from plain text editor ([\#11124](https://github.com/matrix-org/matrix-react-sdk/pull/11124)). Contributed by @alunturner.
* Disable encryption toggle in room settings when force disabled ([\#11122](https://github.com/matrix-org/matrix-react-sdk/pull/11122)). Contributed by @kerryarchibald.
* Add .well-known config option to force disable encryption on room creation ([\#11120](https://github.com/matrix-org/matrix-react-sdk/pull/11120)). Contributed by @kerryarchibald.
* Handle permalinks in room topic ([\#11115](https://github.com/matrix-org/matrix-react-sdk/pull/11115)). Fixes #23395.
* Add at room avatar for RTE ([\#11106](https://github.com/matrix-org/matrix-react-sdk/pull/11106)). Contributed by @alunturner.
* Remove new room breadcrumbs ([\#11104](https://github.com/matrix-org/matrix-react-sdk/pull/11104)).
* Update rich text editor dependency and associated changes ([\#11098](https://github.com/matrix-org/matrix-react-sdk/pull/11098)). Contributed by @alunturner.
* Implement new model, hooks and reconcilation code for new GYU notification settings ([\#11089](https://github.com/matrix-org/matrix-react-sdk/pull/11089)). Contributed by @justjanne.
* Allow maintaining a different right panel width for thread panels ([\#11064](https://github.com/matrix-org/matrix-react-sdk/pull/11064)). Fixes #25487.
* Make AppPermission pane scrollable ([\#10954](https://github.com/matrix-org/matrix-react-sdk/pull/10954)). Fixes #25438 and #25511. Contributed by @luixxiul.
* Integrate compound design tokens ([\#11091](https://github.com/matrix-org/matrix-react-sdk/pull/11091)). Fixes vector-im/internal-planning#450.
* Don't warn about the effects of redacting state events when redacting non-state-events ([\#11071](https://github.com/matrix-org/matrix-react-sdk/pull/11071)). Fixes #8478.
* Allow specifying help URLs in config.json ([\#11070](https://github.com/matrix-org/matrix-react-sdk/pull/11070)). Fixes #15268.

## 🐛 Bug Fixes
* Fix error when generating error for polling for updates ([\#25609](https://github.com/vector-im/element-web/pull/25609)).
* Fix spurious notifications on non-live events ([\#11133](https://github.com/matrix-org/matrix-react-sdk/pull/11133)). Fixes #24336.
* Prevent auto-translation within composer ([\#11114](https://github.com/matrix-org/matrix-react-sdk/pull/11114)). Fixes #25624.
* Fix caret jump when backspacing into empty line at beginning of editor ([\#11128](https://github.com/matrix-org/matrix-react-sdk/pull/11128)). Fixes #22335.
* Fix server picker not allowing you to switch from custom to default ([\#11127](https://github.com/matrix-org/matrix-react-sdk/pull/11127)). Fixes #25650.
* Consider the unthreaded read receipt for Unread dot state ([\#11117](https://github.com/matrix-org/matrix-react-sdk/pull/11117)). Fixes #24229.
* Increase RTE resilience ([\#11111](https://github.com/matrix-org/matrix-react-sdk/pull/11111)). Fixes #25277. Contributed by @alunturner.
* Fix RoomView ignoring alias lookup errors due to them not knowing the roomId ([\#11099](https://github.com/matrix-org/matrix-react-sdk/pull/11099)). Fixes #24783 and #25562.
* Fix style inconsistencies on SecureBackupPanel ([\#11102](https://github.com/matrix-org/matrix-react-sdk/pull/11102)). Fixes #25615. Contributed by @luixxiul.
* Remove unknown MXIDs from invite suggestions ([\#11055](https://github.com/matrix-org/matrix-react-sdk/pull/11055)). Fixes #25446.
* Reduce volume of ring sounds to normalised levels ([\#9143](https://github.com/matrix-org/matrix-react-sdk/pull/9143)). Contributed by @JMoVS.
* Fix slash commands not being enabled in certain cases ([\#11090](https://github.com/matrix-org/matrix-react-sdk/pull/11090)). Fixes #25572.
* Prevent escape in threads from sending focus to main timeline composer ([\#11061](https://github.com/matrix-org/matrix-react-sdk/pull/11061)). Fixes #23397.

Changes in [1.11.34](https://github.com/vector-im/element-web/releases/tag/v1.11.34) (2023-06-20)
=================================================================================================

Expand Down
5 changes: 3 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ One of the following options **must** be supplied:
information. These are the same values seen as `base_url` in the `default_server_config` example, with `default_is_url`
being optional.

If a combination of these three methods is used then Element will fail to load. This is because it is unclear which
should be considered "first".
If both `default_server_config` and `default_server_name` are used, Element will try to look up the connection
infomation using `.well-known`, and if that fails, take `default_server_config` as the homeserver connection
infomation.

## Labs flags

Expand Down
8 changes: 8 additions & 0 deletions docs/customisations.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Customisations

### 🦖 DEPRECATED

Customisations have been deprecated in favour of the [Module API](https://github.com/vector-im/element-web/blob/develop/docs/modules.md).
If you have use cases from customisations which are not yet available via the Module API please open an issue.
Customisations will be removed from the codebase in a future release.

---

Element Web and the React SDK support "customisation points" that can be used to
easily add custom logic specific to a particular deployment of Element Web.

Expand Down
8 changes: 8 additions & 0 deletions element.io/app/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"default_server_name": "matrix.org",
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix-client.matrix.org"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"brand": "Element",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
Expand Down
8 changes: 8 additions & 0 deletions element.io/develop/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"default_server_name": "matrix.org",
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix-client.matrix.org"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"brand": "Element",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.11.34",
"version": "1.11.35",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
Expand Down Expand Up @@ -70,7 +70,7 @@
},
"dependencies": {
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
"@matrix-org/react-sdk-module-api": "^0.0.5",
"@matrix-org/react-sdk-module-api": "^0.0.6",
"gfm.css": "^1.1.2",
"jsrsasign": "^10.5.25",
"katex": "^0.16.0",
Expand Down Expand Up @@ -170,7 +170,7 @@
"simple-proxy-agent": "^1.1.0",
"string-replace-loader": "3",
"style-loader": "2",
"stylelint": "^15.3.0",
"stylelint": "^15.10.1",
"stylelint-config-standard": "^33.0.0",
"stylelint-scss": "^5.0.0",
"terser-webpack-plugin": "^4.0.0",
Expand Down
25 changes: 14 additions & 11 deletions scripts/layered.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,30 @@ export PR_ORG=vector-im
export PR_REPO=element-web

# Set up the js-sdk first
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk develop
pushd matrix-js-sdk
yarn link
yarn install --frozen-lockfile
popd

# Also set up matrix-analytics-events so we get the latest from
# the main branch or a branch with matching name
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-analytics-events main
pushd matrix-analytics-events
yarn link
yarn install --frozen-lockfile
yarn build:ts
popd
# Also set up matrix-analytics-events for branch with matching name
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-analytics-events
# We don't pass a default branch so cloning may fail when we are not in a PR
# This is expected as this project does not share a release cycle but we still branch match it
if [ -d matrix-analytics-events ]; then
pushd matrix-analytics-events
yarn link
yarn install --frozen-lockfile
yarn build:ts
popd
fi

# Now set up the react-sdk
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-react-sdk
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-react-sdk develop
pushd matrix-react-sdk
yarn link
yarn link matrix-js-sdk
yarn link @matrix-org/analytics-events
[ -d matrix-analytics-events ] && yarn link @matrix-org/analytics-events
yarn install --frozen-lockfile
popd

Expand Down
Loading

0 comments on commit 5edafb6

Please sign in to comment.