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

Commit be78a43

Browse files
author
Kerry
authored
Merge branch 'develop' into psf-963/live-location-labs-flag-screen
2 parents 4ebfe3e + 8baa46b commit be78a43

File tree

17 files changed

+325
-199
lines changed

17 files changed

+325
-199
lines changed

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

Lines changed: 11 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

.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/deployment-action@v1.2.6
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/deployment-status@v1.0.1
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/deployment-status@v1.0.1
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 }}

res/css/_components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
@import "./views/rooms/_SearchBar.scss";
265265
@import "./views/rooms/_SendMessageComposer.scss";
266266
@import "./views/rooms/_Stickers.scss";
267+
@import "./views/rooms/_ThreadSummary.scss";
267268
@import "./views/rooms/_TopUnreadMessagesBar.scss";
268269
@import "./views/rooms/_VoiceRecordComposerTile.scss";
269270
@import "./views/rooms/_WhoIsTypingTile.scss";

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: 2 additions & 2 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
}

res/css/views/rooms/_EventTile.scss

Lines changed: 6 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ $left-gutter: 64px;
7777
background-color: $alert;
7878
}
7979

80-
.mx_ThreadInfo,
80+
.mx_ThreadSummary,
8181
.mx_ThreadSummaryIcon {
8282
margin-left: 64px;
8383
}
@@ -304,15 +304,15 @@ $left-gutter: 64px;
304304
.mx_RoomView_timeline_rr_enabled {
305305
.mx_EventTile[data-layout=group] {
306306

307-
.mx_ThreadInfo,
307+
.mx_ThreadSummary,
308308
.mx_ThreadSummaryIcon,
309309
.mx_EventTile_line {
310310
/* ideally should be 100px, but 95px gives us a max thumbnail size of 800x600, which is nice */
311311
margin-right: 110px;
312312
min-height: $font-14px;
313313
}
314314

315-
.mx_ThreadInfo {
315+
.mx_ThreadSummary {
316316
max-width: min(calc(100% - $left-gutter - 110px), 600px); // leave space on both left & right gutters
317317
}
318318
}
@@ -680,8 +680,9 @@ $left-gutter: 64px;
680680
}
681681
}
682682

683+
.mx_ThreadPanel_replies::before,
683684
.mx_ThreadSummaryIcon::before,
684-
.mx_ThreadInfo::before {
685+
.mx_ThreadSummary::before {
685686
content: "";
686687
display: inline-block;
687688
mask-image: url('$(res)/img/element-icons/thread-summary.svg');
@@ -707,113 +708,12 @@ $left-gutter: 64px;
707708
}
708709
}
709710

710-
.mx_ThreadInfo {
711-
min-width: 267px;
712-
max-width: min(calc(100% - $left-gutter), 600px); // leave space on both left & right gutters
713-
width: fit-content;
714-
height: 40px;
715-
position: relative;
716-
background-color: $system;
717-
padding-left: 12px;
718-
display: flex;
719-
align-items: center;
720-
border-radius: 8px;
721-
padding-right: 16px;
722-
margin-top: 8px;
723-
font-size: $font-12px;
724-
color: $secondary-content;
725-
box-sizing: border-box;
726-
justify-content: flex-start;
727-
clear: both;
728-
overflow: hidden;
729-
border: 1px solid $system; // always render a border so the hover effect doesn't require a re-layout
730-
731-
.mx_ThreadInfo_chevron {
732-
position: absolute;
733-
top: 0;
734-
right: 0;
735-
bottom: 0;
736-
width: 60px;
737-
box-sizing: border-box;
738-
// XXX: We use `$system-transparent` instead of `transparent` to work around a Safari <15.4 bug
739-
background: linear-gradient(270deg, $system 50%, $system-transparent 100%);
740-
741-
opacity: 0;
742-
transform: translateX(60px);
743-
transition: all .1s ease-in-out;
744-
745-
&::before {
746-
content: '';
747-
position: absolute;
748-
top: 50%;
749-
right: 12px;
750-
transform: translateY(-50%);
751-
width: 12px;
752-
height: 12px;
753-
mask-image: url('$(res)/img/compound/chevron-right-12px.svg');
754-
mask-position: center;
755-
mask-size: contain;
756-
mask-repeat: no-repeat;
757-
background-color: $secondary-content;
758-
}
759-
}
760-
761-
&:hover,
762-
&:focus {
763-
cursor: pointer;
764-
border-color: $quinary-content;
765-
766-
.mx_ThreadInfo_chevron {
767-
opacity: 1;
768-
transform: translateX(0);
769-
}
770-
}
771-
772-
&::before {
773-
align-self: center; // v-align the threads icon
774-
}
775-
}
776-
777-
.mx_MessagePanel_narrow .mx_ThreadInfo {
711+
.mx_MessagePanel_narrow .mx_ThreadSummary {
778712
min-width: initial;
779713
max-width: initial;
780714
width: initial;
781715
}
782716

783-
$threadInfoLineHeight: calc(2 * $font-12px);
784-
785-
.mx_ThreadInfo_sender {
786-
font-weight: $font-semi-bold;
787-
line-height: $threadInfoLineHeight;
788-
text-overflow: ellipsis;
789-
overflow: hidden;
790-
white-space: nowrap;
791-
}
792-
793-
.mx_ThreadInfo_content {
794-
text-overflow: ellipsis;
795-
overflow: hidden;
796-
white-space: nowrap;
797-
margin-left: 4px;
798-
font-size: $font-12px;
799-
line-height: $threadInfoLineHeight;
800-
color: $secondary-content;
801-
flex: 1;
802-
}
803-
804-
.mx_ThreadInfo_avatar {
805-
float: left;
806-
margin-right: 8px;
807-
}
808-
809-
.mx_ThreadInfo_threads-amount {
810-
font-weight: $font-semi-bold;
811-
position: relative;
812-
padding: 0 12px 0 8px;
813-
white-space: nowrap;
814-
line-height: $threadInfoLineHeight;
815-
}
816-
817717
.mx_EventTile[data-shape=ThreadsList] {
818718
--topOffset: 20px;
819719
--leftOffset: 46px;

res/css/views/rooms/_IRCLayout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $irc-line-height: $font-18px;
4040
margin-right: $right-padding;
4141
}
4242

43-
.mx_ThreadInfo {
43+
.mx_ThreadSummary {
4444
margin-right: 0;
4545
margin-left: 0;
4646
}

0 commit comments

Comments
 (0)