Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 20b6882

Browse files
author
Kerry
authored
Merge branch 'develop' into psf-962/beacon-timeline-filtering
2 parents 1405e79 + 12e8534 commit 20b6882

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1278
-514
lines changed

.github/workflows/element-build-and-test.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ on:
88
branches: [ develop, master ]
99
repository_dispatch:
1010
types: [ upstream-sdk-notify ]
11+
env:
12+
# These must be set for fetchdep.sh to get the right branch
13+
REPOSITORY: ${{ github.repository }}
14+
PR_NUMBER: ${{ github.event.pull_request.number }}
1115
jobs:
1216
build:
1317
name: "Build Element-Web"
1418
runs-on: ubuntu-latest
15-
env:
16-
# This must be set for fetchdep.sh to get the right branch
17-
PR_NUMBER: ${{github.event.number}}
1819
steps:
1920
- uses: actions/checkout@v2
2021

@@ -23,14 +24,23 @@ jobs:
2324
cache: 'yarn'
2425

2526
- name: Fetch layered build
26-
run: scripts/ci/layered.sh
27+
id: layered_build
28+
run: |
29+
scripts/ci/layered.sh
30+
JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD)
31+
REACT_SHA=$(git rev-parse --short=12 HEAD)
32+
VECTOR_SHA=$(git -C element-web rev-parse --short=12 HEAD)
33+
echo "::set-output name=VERSION::$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA"
2734
2835
- name: Copy config
2936
run: cp element.io/develop/config.json config.json
3037
working-directory: ./element-web
3138

3239
- name: Build
33-
run: CI_PACKAGE=true yarn build
40+
env:
41+
CI_PACKAGE: true
42+
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
43+
run: yarn build
3444
working-directory: ./element-web
3545

3646
- name: Upload Artifact
@@ -61,6 +71,12 @@ jobs:
6171
# to run the tests, so use chrome.
6272
browser: chrome
6373
start: npx serve -p 8080 webapp
74+
record: true
75+
env:
76+
# pass the Dashboard record key as an environment variable
77+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
78+
# pass GitHub token to allow accurately detecting a build vs a re-run build
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6480

6581
- name: Upload Artifact
6682
if: failure()
@@ -75,9 +91,6 @@ jobs:
7591
app-tests:
7692
name: Element Web Integration Tests
7793
runs-on: ubuntu-latest
78-
env:
79-
# This must be set for fetchdep.sh to get the right branch
80-
PR_NUMBER: ${{github.event.number}}
8194
steps:
8295
- uses: actions/checkout@v2
8396

.github/workflows/end-to-end-tests.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ on:
99
branches: [ develop ]
1010
repository_dispatch:
1111
types: [ upstream-sdk-notify ]
12+
env:
13+
# These must be set for fetchdep.sh to get the right branch
14+
REPOSITORY: ${{ github.repository }}
15+
PR_NUMBER: ${{ github.event.pull_request.number }}
1216
jobs:
1317
end-to-end:
1418
runs-on: ubuntu-latest
15-
env:
16-
# This must be set for fetchdep.sh to get the right branch
17-
PR_NUMBER: ${{github.event.number}}
1819
container: vectorim/element-web-ci-e2etests-env:latest
1920
steps:
2021
- name: Checkout code

.github/workflows/netlify.yaml

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,58 @@ on:
77
types:
88
- completed
99
jobs:
10-
build:
10+
deploy:
1111
runs-on: ubuntu-latest
12-
if: >
13-
${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' }}
12+
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
1413
steps:
1514
- name: "🔍 Read PR number"
1615
id: readctx
17-
# we need to find the PR number that corresponds to the branch, which we do by
18-
# searching the GH API
16+
# We need to find the PR number that corresponds to the branch, which we do by searching the GH API
1917
# The workflow_run event includes a list of pull requests, but it doesn't get populated for
2018
# forked PRs: https://docs.github.com/en/rest/reference/checks#create-a-check-run
2119
run: |
2220
head_branch='${{github.event.workflow_run.head_repository.owner.login}}:${{github.event.workflow_run.head_branch}}'
23-
echo "head branch: $head_branch"
21+
echo "Head branch: $head_branch"
2422
pulls_uri="https://api.github.com/repos/${{ github.repository }}/pulls?head=$(jq -Rr '@uri' <<<$head_branch)"
2523
pr_number=$(curl -s -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' "$pulls_uri" |
2624
jq -r '.[] | .number')
2725
echo "PR number: $pr_number"
2826
echo "::set-output name=prnumber::$pr_number"
2927
30-
# There's a 'download artifact' action but it hasn't been updated for the
28+
- name: Create Deployment
29+
uses: bobheadxi/deployments@v1
30+
id: deployment
31+
with:
32+
step: start
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
env: Netlify
35+
ref: ${{ github.event.workflow_run.head_sha }}
36+
desc: |
37+
Do you trust the author of this PR? Maybe this build will steal your keys or give you malware.
38+
Exercise caution. Use test accounts.
39+
40+
# There's a 'download artifact' action, but it hasn't been updated for the
3141
# workflow_run action (https://github.com/actions/download-artifact/issues/60)
3242
# so instead we get this mess:
3343
- name: 'Download artifact'
3444
uses: actions/[email protected]
3545
with:
3646
script: |
37-
var artifacts = await github.actions.listWorkflowRunArtifacts({
38-
owner: context.repo.owner,
39-
repo: context.repo.repo,
40-
run_id: ${{github.event.workflow_run.id }},
47+
const artifacts = await github.actions.listWorkflowRunArtifacts({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
run_id: ${{ github.event.workflow_run.id }},
4151
});
42-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
43-
return artifact.name == "previewbuild"
52+
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
53+
return artifact.name == "previewbuild"
4454
})[0];
45-
var download = await github.actions.downloadArtifact({
46-
owner: context.repo.owner,
47-
repo: context.repo.repo,
48-
artifact_id: matchArtifact.id,
49-
archive_format: 'zip',
55+
const download = await github.actions.downloadArtifact({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
artifact_id: matchArtifact.id,
59+
archive_format: 'zip',
5060
});
51-
var fs = require('fs');
61+
const fs = require('fs');
5262
fs.writeFileSync('${{github.workspace}}/previewbuild.zip', Buffer.from(download.data));
5363
5464
- name: Extract Artifacts
@@ -69,12 +79,16 @@ jobs:
6979
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
7080
timeout-minutes: 1
7181

72-
- name: Edit PR Description
73-
uses: Beakyn/gha-comment-pull-request@2167a7aee24f9e61ce76a23039f322e49a990409
74-
env:
75-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
- name: Update deployment status
83+
uses: bobheadxi/deployments@v1
84+
if: always()
7685
with:
77-
pull-request-number: ${{ steps.readctx.outputs.prnumber }}
78-
description-message: |
79-
Preview: ${{ steps.netlify.outputs.deploy-url }}
80-
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.
86+
step: finish
87+
token: ${{ secrets.GITHUB_TOKEN }}
88+
status: ${{ job.status }}
89+
env: ${{ steps.deployment.outputs.env }}
90+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
91+
env_url: ${{ steps.netlify.outputs.deploy-url }}
92+
desc: |
93+
Do you trust the author of this PR? Maybe this build will steal your keys or give you malware.
94+
Exercise caution. Use test accounts.

.github/workflows/static_analysis.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ on:
55
branches: [ develop, master ]
66
repository_dispatch:
77
types: [ upstream-sdk-notify ]
8+
env:
9+
# These must be set for fetchdep.sh to get the right branch
10+
REPOSITORY: ${{ github.repository }}
11+
PR_NUMBER: ${{ github.event.pull_request.number }}
812
jobs:
913
ts_lint:
1014
name: "Typescript Syntax Check"
1115
runs-on: ubuntu-latest
12-
env:
13-
# This must be set for fetchdep.sh to get the right branch
14-
PR_NUMBER: ${{github.event.number}}
1516
steps:
1617
- uses: actions/checkout@v2
1718

@@ -86,3 +87,16 @@ jobs:
8687

8788
- name: Run Linter
8889
run: "yarn run lint:style"
90+
91+
sonarqube:
92+
name: "SonarQube"
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/checkout@v2
96+
with:
97+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
98+
- name: SonarCloud Scan
99+
uses: SonarSource/sonarcloud-github-action@master
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ on:
55
branches: [ develop, master ]
66
repository_dispatch:
77
types: [ upstream-sdk-notify ]
8+
env:
9+
# These must be set for fetchdep.sh to get the right branch
10+
REPOSITORY: ${{ github.repository }}
11+
PR_NUMBER: ${{ github.event.pull_request.number }}
812
jobs:
913
jest:
1014
name: Jest with Codecov
1115
runs-on: ubuntu-latest
12-
env:
13-
# This must be set for fetchdep.sh to get the right branch
14-
PR_NUMBER: ${{github.event.number}}
1516
steps:
1617
- name: Checkout code
1718
uses: actions/checkout@v2

cypress.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"baseUrl": "http://localhost:8080",
3-
"videoUploadOnPasses": false
3+
"videoUploadOnPasses": false,
4+
"projectId": "ppvnzg"
45
}

res/css/_common.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,29 @@ legend {
692692
}
693693
}
694694

695+
@define-mixin ThreadsAmount {
696+
$threadInfoLineHeight: calc(2 * $font-12px);
697+
698+
color: $secondary-content;
699+
font-weight: $font-semi-bold;
700+
line-height: $threadInfoLineHeight;
701+
white-space: nowrap;
702+
position: relative;
703+
padding: 0 $spacing-12 0 $spacing-8;
704+
}
705+
706+
@define-mixin ThreadInfoIcon {
707+
content: "";
708+
display: inline-block;
709+
mask-image: url('$(res)/img/element-icons/thread-summary.svg');
710+
mask-position: center;
711+
height: 18px;
712+
min-width: 18px;
713+
background-color: $secondary-content !important;
714+
mask-repeat: no-repeat;
715+
mask-size: contain;
716+
}
717+
695718
@define-mixin ListResetDefault {
696719
list-style: none;
697720
padding: 0;

res/css/_components.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@import "./components/views/beacon/_OwnBeaconStatus.scss";
1515
@import "./components/views/beacon/_RoomLiveShareWarning.scss";
1616
@import "./components/views/beacon/_StyledLiveBeaconIcon.scss";
17+
@import "./components/views/location/_EnableLiveShare.scss";
1718
@import "./components/views/location/_LiveDurationDropdown.scss";
1819
@import "./components/views/location/_LocationShareMenu.scss";
1920
@import "./components/views/location/_MapError.scss";
@@ -263,6 +264,7 @@
263264
@import "./views/rooms/_SearchBar.scss";
264265
@import "./views/rooms/_SendMessageComposer.scss";
265266
@import "./views/rooms/_Stickers.scss";
267+
@import "./views/rooms/_ThreadSummary.scss";
266268
@import "./views/rooms/_TopUnreadMessagesBar.scss";
267269
@import "./views/rooms/_VoiceRecordComposerTile.scss";
268270
@import "./views/rooms/_WhoIsTypingTile.scss";
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
Copyright 2022 The Matrix.org Foundation C.I.C.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_EnableLiveShare {
18+
flex: 1 1 0;
19+
display: flex;
20+
flex-direction: column;
21+
justify-content: flex-end;
22+
align-items: center;
23+
24+
padding: $spacing-32 $spacing-16;
25+
text-align: center;
26+
box-sizing: border-box;
27+
}
28+
29+
.mx_EnableLiveShare_heading {
30+
padding-top: $spacing-24;
31+
}
32+
33+
.mx_EnableLiveShare_icon {
34+
height: 58px;
35+
width: 58px;
36+
}
37+
38+
.mx_EnableLiveShare_description {
39+
padding: 0 $spacing-24;
40+
margin-bottom: $spacing-32;
41+
line-height: $font-20px;
42+
}
43+
44+
.mx_EnableLiveShare_button {
45+
margin-top: $spacing-32;
46+
height: 48px;
47+
width: 100%;
48+
}

res/css/structures/_ViewSource.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ limitations under the License.
4444
.mx_ViewSource_container {
4545
max-width: calc(100% - 24px);
4646
}
47+
48+
.mx_ViewSource_container .mx_CopyableText_border {
49+
width: 100%;
50+
}

0 commit comments

Comments
 (0)