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

Commit

Permalink
Merge branch 'develop' into sticky-video-rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Apr 20, 2022
2 parents 783ba83 + 6e86a14 commit 658b4d3
Show file tree
Hide file tree
Showing 97 changed files with 2,862 additions and 512 deletions.
4 changes: 3 additions & 1 deletion __mocks__/maplibre-gl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EventEmitter = require("events");
const { LngLat, NavigationControl } = require('maplibre-gl');
const { LngLat, NavigationControl, LngLatBounds } = require('maplibre-gl');

class MockMap extends EventEmitter {
addControl = jest.fn();
Expand All @@ -8,6 +8,7 @@ class MockMap extends EventEmitter {
zoomOut = jest.fn();
setCenter = jest.fn();
setStyle = jest.fn();
fitBounds = jest.fn();
}
const MockMapInstance = new MockMap();

Expand All @@ -24,5 +25,6 @@ module.exports = {
GeolocateControl: jest.fn().mockReturnValue(MockGeolocateInstance),
Marker: jest.fn().mockReturnValue(MockMarker),
LngLat,
LngLatBounds,
NavigationControl,
};
6 changes: 6 additions & 0 deletions res/css/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -692,3 +692,9 @@ legend {
}
}
}

@define-mixin ListResetDefault {
list-style: none;
padding: 0;
margin: 0;
}
2 changes: 2 additions & 0 deletions res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
@import "./_font-sizes.scss";
@import "./_font-weights.scss";
@import "./_spacing.scss";
@import "./components/views/beacon/_BeaconListItem.scss";
@import "./components/views/beacon/_BeaconStatus.scss";
@import "./components/views/beacon/_BeaconViewDialog.scss";
@import "./components/views/beacon/_DialogSidebar.scss";
@import "./components/views/beacon/_LeftPanelLiveShareWarning.scss";
@import "./components/views/beacon/_LiveTimeRemaining.scss";
@import "./components/views/beacon/_OwnBeaconStatus.scss";
Expand Down
61 changes: 61 additions & 0 deletions res/css/components/views/beacon/_BeaconListItem.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
Copyright 2022 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_BeaconListItem {
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: flex-start;
padding: $spacing-12 0;

border-bottom: 1px solid $system;
}

.mx_BeaconListItem_avatarIcon {
flex: 0 0;
height: 32px;
width: 32px;
}

.mx_BeaconListItem_avatar {
flex: 0 0;
box-sizing: border-box;

margin-right: $spacing-8;
border: 2px solid $location-live-color;
}

.mx_BeaconListItem_info {
flex: 1 1 0;
display: flex;
flex-direction: column;
align-items: stretch;
}

.mx_BeaconListItem_status {
// override beacon status padding
padding: 0 !important;
margin-bottom: $spacing-8;

.mx_BeaconStatus_label {
font-weight: $font-semi-bold;
}
}

.mx_BeaconListItem_lastUpdated {
color: $tertiary-content;
font-size: $font-10px;
}
4 changes: 4 additions & 0 deletions res/css/components/views/beacon/_BeaconStatus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ limitations under the License.
.mx_BeaconStatus_expiryTime {
color: $secondary-content;
}

.mx_BeaconStatus_label {
margin-bottom: 2px;
}
33 changes: 32 additions & 1 deletion res/css/components/views/beacon/_BeaconViewDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ limitations under the License.
height: calc(80vh - 0.5px);
overflow: hidden;

// sidebar is absolutely positioned inside
position: relative;

.mx_Dialog_header {
margin: 0px;
padding: 0px;
Expand All @@ -40,7 +43,7 @@ limitations under the License.

.mx_Dialog_cancelButton {
z-index: 4010;
position: absolute;
position: fixed;
right: 5vw;
top: 5vh;
width: 20px;
Expand All @@ -55,3 +58,31 @@ limitations under the License.
height: 80vh;
border-radius: 8px;
}

.mx_BeaconViewDialog_mapFallback {
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

background: url('$(res)/img/location/map.svg');
background-size: cover;
}

.mx_BeaconViewDialog_mapFallbackIcon {
width: 65px;
margin-bottom: $spacing-16;
color: $quaternary-content;
}

.mx_BeaconViewDialog_mapFallbackMessage {
color: $secondary-content;
margin-bottom: $spacing-16;
}

.mx_BeaconViewDialog_viewListButton {
position: absolute;
top: $spacing-24;
left: $spacing-24;
}
60 changes: 60 additions & 0 deletions res/css/components/views/beacon/_DialogSidebar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
Copyright 2022 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_DialogSidebar {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 265px;

display: flex;
flex-direction: column;

box-sizing: border-box;
padding: $spacing-16;

background-color: $background;
box-shadow: 0px 4px 4px $menu-box-shadow-color;
}

.mx_DialogSidebar_header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;

flex: 0 0;
margin-bottom: $spacing-16;

color: $primary-content;
}

.mx_DialogSidebar_closeButton {
@mixin ButtonResetDefault;
}

.mx_DialogSidebar_closeButtonIcon {
color: $tertiary-content;
height: 12px;
}

.mx_DialogSidebar_list {
@mixin ListResetDefault;
flex: 1 1 0;
width: 100%;
overflow: auto;
}
157 changes: 86 additions & 71 deletions res/css/views/dialogs/_RoomSettingsDialogBridges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,84 +22,99 @@ limitations under the License.
margin: 0;
padding: 0;
}
}

.mx_RoomSettingsDialog_BridgeList li {
list-style-type: none;
padding: 5px;
margin-bottom: 8px;
border-width: 1px 1px;
border-color: $primary-hairline-color;
border-style: solid;
border-radius: 5px;
li {
list-style-type: none;

.column-icon {
float: left;
padding-right: 10px;
&.mx_RoomSettingsDialog_BridgeList_listItem {
display: flex;
flex-wrap: wrap;
gap: $spacing-8;
padding: 5px;
margin-bottom: $spacing-8;

* {
// border-style around each bridge list item
border-width: 1px 1px;
border-color: $primary-hairline-color;
border-style: solid;
border-radius: 5px;
border: 1px solid $input-darker-bg-color;
}

.noProtocolIcon {
width: 48px;
height: 48px;
background: $input-darker-bg-color;
border-radius: 5px;
}

.protocol-icon {
float: left;
margin-right: 5px;
img {
border-radius: 5px;
border-width: 1px 1px;
border-color: $primary-hairline-color;
.mx_RoomSettingsDialog_column_icon {
.mx_RoomSettingsDialog_protocolIcon,
.mx_RoomSettingsDialog_protocolIcon span,
.mx_RoomSettingsDialog_noProtocolIcon {
box-sizing: border-box;
border-radius: 5px;
border: 1px solid $input-darker-bg-color;
}

.mx_RoomSettingsDialog_noProtocolIcon,
.mx_RoomSettingsDialog_protocolIcon img {
border-radius: 5px;
}

.mx_RoomSettingsDialog_noProtocolIcon {
width: 48px;
height: 48px;
background: $input-darker-bg-color;
}

.mx_RoomSettingsDialog_protocolIcon {
img {
border-width: 1px 1px;
border-color: $primary-hairline-color;
}

span {
/* Correct letter placement */
left: auto;
}
}
}
span {
/* Correct letter placement */
left: auto;
}
}
}

.column-data {
display: inline-block;
width: 85%;

> h3 {
margin-top: 0px;
margin-bottom: 0px;
font-size: 16pt;
color: $primary-content;
}

> * {
margin-top: 4px;
margin-bottom: 0;
}

.workspace-channel-details {
color: $primary-content;
font-weight: 600;

.channel {
margin-left: 5px;
}
}

.metadata {
color: $muted-fg-color;
margin-bottom: 0;
overflow-y: visible;
text-overflow: ellipsis;
white-space: normal;
padding: 0;

> li {
padding: 0;
border: 0;
.mx_RoomSettingsDialog_column_data {
display: inline-block;
width: 85%;

.mx_RoomSettingsDialog_column_data_details,
.mx_RoomSettingsDialog_column_data_metadata,
.mx_RoomSettingsDialog_column_data_metadata li,
.mx_RoomSettingsDialog_column_data_protocolName {
margin-bottom: 0;
}

.mx_RoomSettingsDialog_column_data_details,
.mx_RoomSettingsDialog_column_data_metadata {
margin-top: $spacing-4;
}

.mx_RoomSettingsDialog_column_data_metadata li {
margin-top: $spacing-8;
}

.mx_RoomSettingsDialog_column_data_protocolName {
margin-top: 0;
font-size: 16pt;
color: $primary-content;
}

.mx_RoomSettingsDialog_workspace_channel_details {
color: $primary-content;
font-weight: $font-semi-bold;

.mx_RoomSettingsDialog_channel {
margin-inline-start: 5px;
}
}

.mx_RoomSettingsDialog_metadata {
color: $muted-fg-color;
margin-bottom: 0;
overflow-y: visible;
text-overflow: ellipsis;
white-space: normal;
padding: 0;
}
}
}
}
Expand Down
Loading

0 comments on commit 658b4d3

Please sign in to comment.