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

Right Panel Room Summary and Widgets #5167

Merged
merged 35 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
11e349d
Update e2e iconography
t3chguy Aug 28, 2020
2527344
Create name/title Widget utils
t3chguy Aug 28, 2020
8f94a42
Update Right Panel phase recall behaviour
t3chguy Aug 28, 2020
89a8361
small css tweaks to closer match the figma
t3chguy Sep 1, 2020
eb7f6f4
Create new WidgetStore to track all widgets stuff
t3chguy Sep 7, 2020
31cca5e
Create new right panel cards
t3chguy Sep 8, 2020
98b59fb
Consolidate all the work thus far
t3chguy Sep 8, 2020
0fe6ce1
Stage svgs
t3chguy Sep 8, 2020
ef0843d
Iterate to match design
t3chguy Sep 8, 2020
73dcba1
i18n
t3chguy Sep 8, 2020
3a99343
iterate styling
t3chguy Sep 8, 2020
4a4a8cd
styling and fix `i` button behaviour
t3chguy Sep 8, 2020
8d14d26
do the todos
t3chguy Sep 8, 2020
6c7cb47
finalise colours from Figma
t3chguy Sep 8, 2020
b982bf8
delint
t3chguy Sep 8, 2020
1532048
Fix behaviour WidgetStore for new/unknown rooms
t3chguy Sep 8, 2020
a17b2ba
use constant
t3chguy Sep 8, 2020
01a8ac2
Use null coalescing operator
t3chguy Sep 8, 2020
596060c
fix alignments and iterate PR
t3chguy Sep 8, 2020
12a6bc8
update copy
t3chguy Sep 8, 2020
517b594
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-…
t3chguy Sep 8, 2020
644ff56
Fix e2e tests
t3chguy Sep 9, 2020
29c2a0e
Fix FilePanel and NotificationPanel overscroll issues
t3chguy Sep 9, 2020
c8bc80a
test with delay
t3chguy Sep 9, 2020
fb0b784
test CI
t3chguy Sep 9, 2020
37c0d52
re-order top right buttons
t3chguy Sep 9, 2020
bb98587
fix e2e tests. Change the default Room Tab to RoomSummary
t3chguy Sep 9, 2020
8dcb2d4
attempt to fix CI tests
t3chguy Sep 9, 2020
b635598
Attempt to fix tests and fix RoomSummaryCard having wrong member count
t3chguy Sep 9, 2020
8d66dce
Update copy and use svg for ellipsis
t3chguy Sep 9, 2020
d9e17e8
fix CI
t3chguy Sep 9, 2020
39a59db
fix CI some more
t3chguy Sep 9, 2020
cef533b
Update ellipsis svg
t3chguy Sep 9, 2020
0e58eb6
Update initial widget height
t3chguy Sep 9, 2020
04d2f93
Fix WidgetStore handler bindings
t3chguy Sep 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,12 @@
@import "./views/messages/_UnknownBody.scss";
@import "./views/messages/_ViewSourceEvent.scss";
@import "./views/messages/_common_CryptoEvent.scss";
@import "./views/right_panel/_BaseCard.scss";
@import "./views/right_panel/_EncryptionInfo.scss";
@import "./views/right_panel/_RoomSummaryCard.scss";
@import "./views/right_panel/_UserInfo.scss";
@import "./views/right_panel/_VerificationPanel.scss";
@import "./views/right_panel/_WidgetCard.scss";
@import "./views/room_settings/_AliasSettings.scss";
@import "./views/rooms/_AppsDrawer.scss";
@import "./views/rooms/_Autocomplete.scss";
Expand Down
8 changes: 8 additions & 0 deletions res/css/structures/_HeaderButtons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ limitations under the License.
display: flex;
}

.mx_RoomHeader_buttons + .mx_HeaderButtons {
// remove the | separator line for when next to RoomHeaderButtons
// TODO: remove this once when we redo communities and make the right panel similar to the new rooms one
&::before {
content: unset;
}
}

.mx_HeaderButtons::before {
content: "";
background-color: $header-divider-color;
Expand Down
1 change: 1 addition & 0 deletions res/css/structures/_MainSplit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ limitations under the License.
padding: 5px;
// margin left to not allow the handle to not encroach on the space for the scrollbar
margin-left: 8px;
height: calc(100vh - 51px); // height of .mx_RoomHeader.light-panel

&:hover .mx_RightPanel_ResizeHandle {
// Need to use important to override element style attributes
Expand Down
33 changes: 12 additions & 21 deletions res/css/structures/_RightPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,26 @@ limitations under the License.
mask-repeat: no-repeat;
mask-size: contain;
}
}

.mx_RightPanel_membersButton::before {
mask-image: url('$(res)/img/element-icons/room/members.svg');
mask-position: center;
}
&:hover {
background: rgba($accent-color, 0.1);

.mx_RightPanel_filesButton::before {
mask-image: url('$(res)/img/element-icons/room/files.svg');
mask-position: center;
&::before {
background-color: $accent-color;
}
}
}

.mx_RightPanel_notifsButton::before {
mask-image: url('$(res)/img/element-icons/notifications.svg');
mask-position: center;
}

.mx_RightPanel_roomSummaryButton::before {
mask-image: url('$(res)/img/element-icons/room/room-summary.svg');
mask-position: center;
}

.mx_RightPanel_groupMembersButton::before {
mask-image: url('$(res)/img/element-icons/community-members.svg');
mask-position: center;
Expand All @@ -96,23 +99,11 @@ limitations under the License.
}

.mx_RightPanel_headerButton_highlight {
background: rgba($accent-color, 0.25);
// make the icon the accent color too
&::before {
background-color: $accent-color !important;
}
}

.mx_RightPanel_headerButton:not(.mx_RightPanel_headerButton_highlight) {
&:hover {
background: rgba($accent-color, 0.1);

&::before {
background-color: $accent-color;
}
}
}

.mx_RightPanel_headerButton_badge {
font-size: $font-8px;
border-radius: 8px;
Expand Down Expand Up @@ -146,7 +137,7 @@ limitations under the License.
}

.mx_RightPanel_empty {
margin-right: -42px;
margin-right: -28px;

h2 {
font-weight: 700;
Expand Down
3 changes: 1 addition & 2 deletions res/css/structures/_UserMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ limitations under the License.
*/

.mx_UserMenu {

// to make the menu button sort of aligned with the explore button below
padding-right: 6px;

Expand Down Expand Up @@ -59,7 +58,7 @@ limitations under the License.
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
background: $primary-fg-color;
background: $tertiary-fg-color;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mildly concerned about this for communities v2 - leaving a comment as a reminder to myself

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, going to leave this unresolved so I can see it - feel free to ignore it

mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
}
}
Expand Down
5 changes: 4 additions & 1 deletion res/css/views/context_menus/_IconizedContextMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ limitations under the License.
}

span.mx_IconizedContextMenu_label { // labels
padding-left: 14px;
width: 100%;
flex: 1;

Expand All @@ -91,6 +90,10 @@ limitations under the License.
overflow: hidden;
white-space: nowrap;
}

.mx_IconizedContextMenu_icon + .mx_IconizedContextMenu_label {
padding-left: 14px;
}
}
}

Expand Down
166 changes: 166 additions & 0 deletions res/css/views/right_panel/_BaseCard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
/*
Copyright 2020 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.
*/

.mx_BaseCard {
padding: 0 8px;
overflow: hidden;
display: flex;
flex-direction: column;
flex: 1;

.mx_BaseCard_header {
margin: 8px 0;

h2 {
margin: 0 44px;
font-size: $font-18px;
font-weight: $font-semi-bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.mx_BaseCard_back, .mx_BaseCard_close {
position: absolute;
background-color: rgba(141, 151, 165, 0.2);
height: 20px;
width: 20px;
margin: 12px;
top: 0;

&::before {
content: "";
position: absolute;
height: 20px;
width: 20px;
top: 0;
left: 0;
mask-repeat: no-repeat;
mask-position: center;
background-color: $rightpanel-button-color;
}
}

.mx_BaseCard_back {
border-radius: 4px;
left: 0;

&::before {
transform: rotate(90deg);
mask-size: 22px;
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
}
}

.mx_BaseCard_close {
border-radius: 10px;
right: 0;

&::before {
mask-image: url('$(res)/img/icons-close.svg');
mask-size: 8px;
}
}
}

.mx_AutoHideScrollbar {
// collapse the margin into a padding to move the scrollbar into the right gutter
margin-right: -8px;
padding-right: 8px;
min-height: 0;
width: 100%;
height: 100%;
}

.mx_BaseCard_Group {
margin: 20px 0 16px;

& > * {
margin-left: 10px;
margin-right: 10px;
}

h1 {
color: $tertiary-fg-color;
font-size: $font-12px;
font-weight: 500;
}

.mx_BaseCard_Button {
padding: 10px 38px 10px 12px;
margin: 0;
position: relative;
font-size: $font-13px;
height: 20px;
line-height: 20px;
border-radius: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

&:hover {
background-color: rgba(141, 151, 165, 0.1);
}

&::after {
content: '';
position: absolute;
top: 10px;
right: 6px;
height: 20px;
width: 20px;
mask-repeat: no-repeat;
mask-position: center;
background-color: $icon-button-color;
transform: rotate(270deg);
mask-size: 20px;
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
}
}
}

.mx_BaseCard_footer {
padding-top: 4px;
text-align: center;
display: flex;
justify-content: space-around;

.mx_AccessibleButton_kind_secondary {
color: $secondary-fg-color;
background-color: rgba(141, 151, 165, 0.2);
font-weight: $font-semi-bold;
font-size: $font-14px;
}

.mx_AccessibleButton_disabled {
cursor: not-allowed;
}
}
}

.mx_FilePanel,
.mx_UserInfo,
.mx_NotificationPanel,
.mx_MemberList {
&.mx_BaseCard {
padding: 32px 0 0;

.mx_AutoHideScrollbar {
margin-right: unset;
padding-right: unset;
}
}
}
Loading