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' of github.com:matrix-org/matrix-react-sdk into…
Browse files Browse the repository at this point in the history
… t3chguy/fix/9547

� Conflicts:
�	src/i18n/strings/en_EN.json
  • Loading branch information
t3chguy committed Jan 14, 2022
2 parents 9b4ec31 + 6444aae commit 7b95202
Show file tree
Hide file tree
Showing 204 changed files with 8,157 additions and 3,348 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ module.exports = {
// There are too many a11y violations to fix at once
// Turn violated rules off until they are fixed
"jsx-a11y/alt-text": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/aria-activedescendant-has-tabindex": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/iframe-has-title": "off",
Expand Down
1 change: 1 addition & 0 deletions __mocks__/browser-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const en = require("../src/i18n/strings/en_EN");
const de = require("../src/i18n/strings/de_DE");
const lv = {
"Save": "Saglabāt",
"Uploading %(filename)s and %(count)s others|one": "Качване на %(filename)s и %(count)s друг",
};

// Mock the browser-request for the languageHandler tests to return
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"matrix_src_main": "./src/index.ts",
"matrix_lib_main": "./lib/index.ts",
"matrix_lib_typings": "./lib/index.d.ts",
"matrix_i18n_extra_translation_funcs": [
"newTranslatableError"
],
"scripts": {
"prepublishOnly": "yarn build",
"i18n": "matrix-gen-i18n",
Expand Down Expand Up @@ -71,7 +74,6 @@
"emojibase-data": "^6.2.0",
"emojibase-regex": "^5.1.3",
"escape-html": "^1.0.3",
"eslint-plugin-import": "^2.25.2",
"file-saver": "^2.0.5",
"filesize": "6.1.0",
"flux": "2.1.1",
Expand All @@ -87,6 +89,7 @@
"lodash": "^4.17.20",
"maplibre-gl": "^1.15.2",
"matrix-analytics-events": "https://github.com/matrix-org/matrix-analytics-events.git#1eab4356548c97722a183912fda1ceabbe8cc7c1",
"matrix-events-sdk": "^0.0.1-beta.2",
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
"matrix-widget-api": "^0.1.0-beta.18",
"minimist": "^1.2.5",
Expand Down Expand Up @@ -166,8 +169,9 @@
"enzyme-to-json": "^3.6.2",
"eslint": "7.18.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-matrix-org": "github:matrix-org/eslint-plugin-matrix-org#2fc59ae12ff551e91c41a1b185be25c77ad02190",
"eslint-plugin-matrix-org": "^0.4.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"glob": "^7.1.6",
Expand All @@ -178,7 +182,7 @@
"jest-raw-loader": "^1.0.1",
"matrix-mock-request": "^1.2.3",
"matrix-react-test-utils": "^0.2.3",
"matrix-web-i18n": "github:matrix-org/matrix-web-i18n",
"matrix-web-i18n": "^1.2.0",
"raw-loader": "^4.0.2",
"react-test-renderer": "^17.0.2",
"rimraf": "^3.0.2",
Expand Down
43 changes: 29 additions & 14 deletions res/css/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,13 @@ legend {
* in the app look the same by being AccessibleButtons, or possibly by having explict button classes.
* We should go through and have one consistent set of styles for buttons throughout the app.
* For now, I am duplicating the selectors here for mx_Dialog and mx_DialogButtons.
*
* Elements that should not be styled like a dialog button are mentioned in a :not() pseudo-class.
* For the widest browser support, we use multiple :not pseudo-classes instead of :not(.a, .b).
*/
.mx_Dialog button:not(.mx_Dialog_nonDialogButton),
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]):not(.mx_AccessibleButton),
.mx_Dialog input[type="submit"],
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton),
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
.mx_Dialog_buttons input[type="submit"] {
@mixin mx_DialogButton;
margin-left: 0px;
Expand All @@ -440,51 +443,51 @@ legend {
font-family: inherit;
}

.mx_Dialog button:not(.mx_Dialog_nonDialogButton):last-child {
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]):not(.mx_AccessibleButton):last-child {
margin-right: 0px;
}

.mx_Dialog button:not(.mx_Dialog_nonDialogButton):hover,
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]):not(.mx_AccessibleButton):hover,
.mx_Dialog input[type="submit"]:hover,
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):hover,
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):hover,
.mx_Dialog_buttons input[type="submit"]:hover {
@mixin mx_DialogButton_hover;
}

.mx_Dialog button:not(.mx_Dialog_nonDialogButton):focus,
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]):not(.mx_AccessibleButton):focus,
.mx_Dialog input[type="submit"]:focus,
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):focus,
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):focus,
.mx_Dialog_buttons input[type="submit"]:focus {
filter: brightness($focus-brightness);
}

.mx_Dialog button.mx_Dialog_primary,
.mx_Dialog button.mx_Dialog_primary:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]),
.mx_Dialog input[type="submit"].mx_Dialog_primary,
.mx_Dialog_buttons button.mx_Dialog_primary,
.mx_Dialog_buttons button.mx_Dialog_primary:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
.mx_Dialog_buttons input[type="submit"].mx_Dialog_primary {
color: $accent-fg-color;
background-color: $accent;
min-width: 156px;
}

.mx_Dialog button.danger,
.mx_Dialog button.danger:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]),
.mx_Dialog input[type="submit"].danger,
.mx_Dialog_buttons button.danger,
.mx_Dialog_buttons button.danger:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
.mx_Dialog_buttons input[type="submit"].danger {
background-color: $alert;
border: solid 1px $alert;
color: $accent-fg-color;
}

.mx_Dialog button.warning,
.mx_Dialog button.warning:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]),
.mx_Dialog input[type="submit"].warning {
border: solid 1px $alert;
color: $alert;
}

.mx_Dialog button:not(.mx_Dialog_nonDialogButton):disabled,
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|=maplibregl]):not(.mx_AccessibleButton):disabled,
.mx_Dialog input[type="submit"]:disabled,
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):disabled,
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):disabled,
.mx_Dialog_buttons input[type="submit"]:disabled {
background-color: $light-fg-color;
border: solid 1px $light-fg-color;
Expand Down Expand Up @@ -655,3 +658,15 @@ legend {
outline-style: auto;
}
}

@define-mixin ButtonResetDefault {
appearance: none;
background: none;
border: none;
padding: 0;
margin: 0;
font-size: inherit;
font-family: inherit;
line-height: inherit;
cursor: pointer;
}
3 changes: 2 additions & 1 deletion res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
@import "./views/dialogs/_JoinRuleDropdown.scss";
@import "./views/dialogs/_KeyboardShortcutsDialog.scss";
@import "./views/dialogs/_LeaveSpaceDialog.scss";
@import "./views/dialogs/_LocationViewDialog.scss";
@import "./views/dialogs/_ManageRestrictedJoinRuleDialog.scss";
@import "./views/dialogs/_MessageEditHistoryDialog.scss";
@import "./views/dialogs/_ModalWidgetDialog.scss";
Expand Down Expand Up @@ -303,7 +304,6 @@
@import "./views/typography/_Heading.scss";
@import "./views/verification/_VerificationShowSas.scss";
@import "./views/voip/CallView/_CallViewButtons.scss";
@import "./views/voip/_CallContainer.scss";
@import "./views/voip/_CallPreview.scss";
@import "./views/voip/_CallView.scss";
@import "./views/voip/_CallViewForRoom.scss";
Expand All @@ -312,4 +312,5 @@
@import "./views/voip/_DialPad.scss";
@import "./views/voip/_DialPadContextMenu.scss";
@import "./views/voip/_DialPadModal.scss";
@import "./views/voip/_PiPContainer.scss";
@import "./views/voip/_VideoFeed.scss";
31 changes: 1 addition & 30 deletions res/css/structures/_SpaceHierarchy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,6 @@ limitations under the License.
*/

.mx_SpaceRoomView_landing {
.mx_Dialog_title {
display: flex;

.mx_BaseAvatar {
margin-right: 12px;
align-self: center;
}

.mx_BaseAvatar_image {
border-radius: 8px;
}

> div {
> h1 {
font-weight: $font-semi-bold;
font-size: $font-18px;
line-height: $font-22px;
margin: 0;
}

> div {
font-weight: 400;
color: $secondary-content;
font-size: $font-15px;
line-height: $font-24px;
}
}
}

.mx_AccessibleButton_kind_link {
padding: 0;
font-size: inherit;
Expand Down Expand Up @@ -249,7 +220,7 @@ limitations under the License.
line-height: $font-18px;
color: $secondary-content;
grid-row: 2;
grid-column: 1/3;
grid-column: 2/3;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
Expand Down
4 changes: 4 additions & 0 deletions res/css/structures/_SpaceRoomView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ $SpaceRoomViewInnerWidth: 428px;
flex-direction: column;
min-width: 0;

> .mx_BaseAvatar {
width: 80px;
}

> .mx_BaseAvatar_image,
> .mx_BaseAvatar > .mx_BaseAvatar_image {
border-radius: 12px;
Expand Down
7 changes: 4 additions & 3 deletions res/css/structures/auth/_SetupEncryptionBody.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
.mx_SetupEncryptionBody_reset {
color: $light-fg-color;
margin-top: $font-14px;
}

a.mx_SetupEncryptionBody_reset_link:is(:link, :hover, :visited) {
color: $alert;
}
.mx_SetupEncryptionBody_reset_link {
@mixin ButtonResetDefault;
color: $alert;
}
7 changes: 7 additions & 0 deletions res/css/views/dialogs/_DevtoolsDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,10 @@ limitations under the License.
margin-bottom: 8px;
}
}

.mx_DevTools_SettingsExplorer_setting {
// override default link button color
// as it is the same as the background highlight
// used on focus
color: $links !important;
}
96 changes: 96 additions & 0 deletions res/css/views/dialogs/_LocationViewDialog.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/*
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_LocationViewDialog_wrapper .mx_Dialog {
padding: 0px;

/* Unset contain and position to allow the close button
to appear outside the dialog */
contain: unset;
position: unset;
}

.mx_LocationViewDialog {
/* subtract 0.5px to prevent single-pixel margin due to rounding */
width: calc(80vw - 0.5px);
height: calc(80vh - 0.5px);
overflow: hidden;

.mx_Dialog_header {
margin: 0px;
padding: 0px;
position: unset;

.mx_Dialog_title {
display: none;
}

.mx_Dialog_cancelButton {
z-index: 4010;
position: absolute;
right: 5vw;
top: 5vh;
width: 20px;
height: 20px;
background-color: $dialog-close-external-color;
}
}

.mx_MLocationBody {
position: absolute;

.mx_MLocationBody_map {
width: 80vw;
height: 80vh;
}

.mx_MLocationBody_zoomButtons {
position: absolute;
display: grid;
grid-template-columns: auto;
grid-row-gap: 8px;

right: 24px;
bottom: 48px;

.mx_AccessibleButton {
background-color: $background;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);
border-radius: 4px;
width: 24px;
height: 24px;

.mx_MLocationBody_zoomButton {
background-color: $primary-content;
margin: 4px;
width: 16px;
height: 16px;
mask-repeat: no-repeat;
mask-size: contain;
mask-position: center;
}

.mx_MLocationBody_plusButton {
mask-image: url('$(res)/img/element-icons/plus-button.svg');
}

.mx_MLocationBody_minusButton {
mask-image: url('$(res)/img/element-icons/minus-button.svg');
}
}
}
}
}
16 changes: 6 additions & 10 deletions res/css/views/dialogs/_SpaceSettingsDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ limitations under the License.
}

& + .mx_SettingsTab_subheading {
border-top: 1px solid $quinary-content;
border-top: 1px solid $menu-border-color;
margin-top: 0;
padding-top: 24px;
}
Expand All @@ -60,15 +60,6 @@ limitations under the License.
margin-left: 26px;
}
}

.mx_SettingsTab_showAdvanced {
margin: 16px 0;
padding: 0;
}

.mx_SettingsFlag {
margin-top: 24px;
}
}

.mx_SpaceSettingsDialog_buttons {
Expand All @@ -86,6 +77,11 @@ limitations under the License.

.mx_AccessibleButton_hasKind {
padding: 8px 22px;

&.mx_SettingsTab_showAdvanced {
margin: 16px 0;
padding: 0;
}
}

.mx_TabbedView_tabLabel {
Expand Down
Loading

0 comments on commit 7b95202

Please sign in to comment.