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

Commit 71e9932

Browse files
committed
Merge branch 'develop' of https://github.com/yaya-usman/matrix-react-sdk into patch/warn_onrefresh
2 parents 75c3627 + fddbc42 commit 71e9932

40 files changed

+1100
-419
lines changed

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,23 @@ jobs:
2323
cache: 'yarn'
2424

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

3238
- name: Build
33-
run: CI_PACKAGE=true yarn build
39+
env:
40+
CI_PACKAGE: true
41+
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
42+
run: yarn build
3443
working-directory: ./element-web
3544

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

6580
- name: Upload Artifact
6681
if: failure()

.github/workflows/netlify.yaml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,36 @@ 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
28+
- name: Create Deployment ID
29+
uses: altinukshini/[email protected]
30+
id: deployment
31+
with:
32+
token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
33+
pr: true
34+
pr_id: ${{ steps.readctx.outputs.prnumber }}
35+
transient_environment: true
36+
environment: Netlify
37+
initial_status: in_progress
38+
ref: ${{ github.event.workflow_run.head_sha }}
39+
3040
# 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:
@@ -69,12 +79,25 @@ 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 (success)
83+
if: success()
84+
uses: altinukshini/[email protected]
85+
with:
86+
token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
87+
environment_url: ${{ steps.netlify.outputs.deploy-url }}
88+
state: "success"
89+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
90+
pr: true
91+
pr_id: ${{ steps.readctx.outputs.prnumber }}
92+
description: |
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.
95+
- name: Update deployment status (failure)
96+
if: failure()
97+
uses: altinukshini/[email protected]
7698
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.
99+
token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
100+
state: "failure"
101+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
102+
pr: true
103+
pr_id: ${{ steps.readctx.outputs.prnumber }}

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/_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+
}

res/css/views/right_panel/_ThreadPanel.scss

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ limitations under the License.
140140
// Account for scrollbar when hovering
141141
padding-top: 0;
142142

143-
.mx_ThreadInfo {
143+
.mx_ThreadSummary {
144144
position: relative;
145145
padding-right: 11px;
146146

@@ -257,28 +257,14 @@ limitations under the License.
257257

258258
.mx_ThreadPanel_replies {
259259
margin-top: 8px;
260-
}
260+
display: flex;
261+
align-items: center;
262+
position: relative;
261263

262-
.mx_ThreadPanel_repliesSummary {
263-
&::before {
264-
content: "";
265-
mask-image: url('$(res)/img/element-icons/thread-summary.svg');
266-
mask-position: center;
267-
display: inline-block;
268-
height: 18px;
269-
min-width: 18px;
270-
background-color: currentColor;
271-
mask-repeat: no-repeat;
272-
mask-size: contain;
273-
margin-right: 8px;
274-
vertical-align: middle;
264+
.mx_ThreadSummary_threads-amount {
265+
color: $secondary-content;
266+
font-size: $font-12px;
275267
}
276-
277-
color: $secondary-content;
278-
font-weight: 600;
279-
float: left;
280-
margin-right: 12px;
281-
font-size: $font-12px;
282268
}
283269

284270
.mx_ThreadPanel_viewInRoom::before {

res/css/views/right_panel/_TimelineCard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ limitations under the License.
6969
margin-right: 8px;
7070
}
7171

72-
.mx_ThreadInfo {
72+
.mx_ThreadSummary {
7373
margin-left: 36px;
7474
margin-right: 0;
7575
max-width: min(calc(100% - 36px), 600px);

res/css/views/rooms/_EventBubbleTile.scss

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ limitations under the License.
3737
margin-left: 49px;
3838
font-size: $font-14px;
3939

40-
.mx_ThreadInfo {
40+
.mx_ThreadSummary {
4141
clear: both;
4242
width: fit-content;
4343
}
@@ -172,7 +172,7 @@ limitations under the License.
172172
margin-right: 32px;
173173
}
174174

175-
.mx_ThreadInfo {
175+
.mx_ThreadSummary {
176176
float: right;
177177
margin-right: calc(-1 * var(--gutterSize));
178178
}
@@ -449,8 +449,11 @@ limitations under the License.
449449

450450
.mx_ReadReceiptGroup {
451451
position: absolute;
452-
right: -78px; // as close to right gutter without clipping as possible
453-
bottom: 0;
452+
// as close to right gutter without clipping as possible
453+
right: -78px;
454+
// (EventTileLine.line-height - ReadReceiptGroup.height) / 2
455+
// this centers the ReadReceiptGroup if we’ve got a single line
456+
bottom: calc(($font-18px - 24px) / 2);
454457
top: auto;
455458
}
456459

@@ -559,6 +562,17 @@ limitations under the License.
559562
padding-top: 0;
560563
}
561564

565+
.mx_EventTile {
566+
&.mx_EventTile_info {
567+
.mx_EventTile_line {
568+
// Avoid overflow of event info by cancelling width settings
569+
width: 100%;
570+
min-width: 0;
571+
max-width: 100%;
572+
}
573+
}
574+
}
575+
562576
&::after {
563577
content: "";
564578
clear: both;
@@ -582,11 +596,11 @@ limitations under the License.
582596
margin-right: 0;
583597

584598
.mx_MessageActionBar {
585-
right: 127px; // align with that of right-column bubbles
599+
right: 48px; // align with that of right-column bubbles
586600
}
587601

588602
.mx_ReadReceiptGroup {
589-
right: -14px; // match alignment to RRs of chat bubbles
603+
right: -18px; // match alignment to RRs of chat bubbles
590604
}
591605

592606
&::before {

0 commit comments

Comments
 (0)