diff --git a/.stylelintrc.js b/.stylelintrc.js
index 1690f2186f..313102ea83 100644
--- a/.stylelintrc.js
+++ b/.stylelintrc.js
@@ -17,7 +17,7 @@ module.exports = {
"at-rule-no-unknown": null,
"no-descending-specificity": null,
"scss/at-rule-no-unknown": [true, {
- // https://github.com/vector-im/riot-web/issues/10544
+ // https://github.com/vector-im/element-web/issues/10544
"ignoreAtRules": ["define-mixin"],
}],
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d944d58f36..468d7d211a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,57 @@
+Changes in [3.1.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.1.0) (2020-08-05)
+===================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.1.0-rc.1...v3.1.0)
+
+ * Upgrade JS SDK to 8.0.1
+ * Fix room list scrolling in Safari
+ [\#5091](https://github.com/matrix-org/matrix-react-sdk/pull/5091)
+ * Add null guard in InviteDialog
+ [\#5084](https://github.com/matrix-org/matrix-react-sdk/pull/5084)
+ * Add null guard in InviteDialog
+ [\#5082](https://github.com/matrix-org/matrix-react-sdk/pull/5082)
+ * Handle tag changes in sticky room updates
+ [\#5080](https://github.com/matrix-org/matrix-react-sdk/pull/5080)
+
+Changes in [3.1.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.1.0-rc.1) (2020-07-31)
+=============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.0.0...v3.1.0-rc.1)
+
+ * Upgrade JS SDK to 8.0.1-rc.1
+ * Update from Weblate
+ [\#5071](https://github.com/matrix-org/matrix-react-sdk/pull/5071)
+ * Add local echo for notifications in the new room list
+ [\#5065](https://github.com/matrix-org/matrix-react-sdk/pull/5065)
+ * Fix various small regressions in the room list's behaviour
+ [\#5070](https://github.com/matrix-org/matrix-react-sdk/pull/5070)
+ * Remove redundant lint dependencies
+ [\#5059](https://github.com/matrix-org/matrix-react-sdk/pull/5059)
+ * Fix key backup warning on soft logout page
+ [\#5069](https://github.com/matrix-org/matrix-react-sdk/pull/5069)
+ * Bump elliptic from 6.5.2 to 6.5.3
+ [\#5066](https://github.com/matrix-org/matrix-react-sdk/pull/5066)
+ * Fix crash on logging in again after soft logout
+ [\#5068](https://github.com/matrix-org/matrix-react-sdk/pull/5068)
+ * Convert right_panel to TS
+ [\#5036](https://github.com/matrix-org/matrix-react-sdk/pull/5036)
+ * Remove all unreferenced images
+ [\#5063](https://github.com/matrix-org/matrix-react-sdk/pull/5063)
+ * Provide nicer error for no known servers error when accepting an invite
+ [\#5061](https://github.com/matrix-org/matrix-react-sdk/pull/5061)
+ * add logging for keytar/pickle key
+ [\#5057](https://github.com/matrix-org/matrix-react-sdk/pull/5057)
+ * Don't speak the outgoing message if it is in the Sending state.
+ [\#4075](https://github.com/matrix-org/matrix-react-sdk/pull/4075)
+ * Remove poorly contrasted "dark style" heading in Room Preview Bar
+ [\#5052](https://github.com/matrix-org/matrix-react-sdk/pull/5052)
+ * Fix Query Matcher regression with certain unhomoglyph'd characters
+ [\#5050](https://github.com/matrix-org/matrix-react-sdk/pull/5050)
+ * Fix handlebar interaction
+ [\#4989](https://github.com/matrix-org/matrix-react-sdk/pull/4989)
+ * Minor improvements to filtering performance
+ [\#5054](https://github.com/matrix-org/matrix-react-sdk/pull/5054)
+ * Fix TextWithTooltip "leaking" tooltip wrappers
+ [\#5055](https://github.com/matrix-org/matrix-react-sdk/pull/5055)
+
Changes in [3.0.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.0.0) (2020-07-27)
===================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v2.10.1...v3.0.0)
diff --git a/README.md b/README.md
index 5f5da9a40d..e468d272d0 100644
--- a/README.md
+++ b/README.md
@@ -11,14 +11,14 @@ a 'skin'. A skin provides:
* The containing application
* Zero or more 'modules' containing non-UI functionality
-As of Aug 2018, the only skin that exists is `vector-im/riot-web`; it and
+As of Aug 2018, the only skin that exists is `vector-im/element-web`; it and
`matrix-org/matrix-react-sdk` should effectively
be considered as a single project (for instance, matrix-react-sdk bugs
-are currently filed against vector-im/riot-web rather than this project).
+are currently filed against vector-im/element-web rather than this project).
Translation Status
==================
-[](https://translate.riot.im/engage/riot-web/?utm_source=widget)
+[](https://translate.riot.im/engage/element-web/?utm_source=widget)
Developer Guide
===============
@@ -41,10 +41,10 @@ https://github.com/matrix-org/matrix-react-sdk/blob/master/code_style.md
Code should be committed as follows:
* All new components: https://github.com/matrix-org/matrix-react-sdk/tree/master/src/components
- * Riot-specific components: https://github.com/vector-im/riot-web/tree/master/src/components
+ * Element-specific components: https://github.com/vector-im/element-web/tree/master/src/components
* In practice, `matrix-react-sdk` is still evolving so fast that the maintenance
- burden of customising and overriding these components for Riot can seriously
- impede development. So right now, there should be very few (if any) customisations for Riot.
+ burden of customising and overriding these components for Element can seriously
+ impede development. So right now, there should be very few (if any) customisations for Element.
* CSS: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/css
* Theme specific CSS & resources: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/themes
@@ -71,7 +71,7 @@ practices that anyone working with the SDK needs to be be aware of and uphold:
* The view's CSS file MUST have the same name (e.g. view/rooms/MessageTile.css).
CSS for matrix-react-sdk currently resides in
- https://github.com/vector-im/riot-web/tree/master/src/skins/vector/css/matrix-react-sdk.
+ https://github.com/vector-im/element-web/tree/master/src/skins/vector/css/matrix-react-sdk.
* Per-view CSS is optional - it could choose to inherit all its styling from
the context of the rest of the app, although this is unusual for any but
@@ -125,7 +125,7 @@ from it.
Github Issues
=============
-All issues should be filed under https://github.com/vector-im/riot-web/issues
+All issues should be filed under https://github.com/vector-im/element-web/issues
for now.
Development
@@ -174,5 +174,5 @@ yarn test
## End-to-End tests
-Make sure you've got your Riot development server running (by doing `yarn start` in riot-web), and then in this project, run `yarn run e2etests`.
+Make sure you've got your Element development server running (by doing `yarn start` in element-web), and then in this project, run `yarn run e2etests`.
See `test/end-to-end-tests/README.md` for more information.
diff --git a/docs/ciderEditor.md b/docs/ciderEditor.md
index 00033b5b8c..f522dc2fc4 100644
--- a/docs/ciderEditor.md
+++ b/docs/ciderEditor.md
@@ -1,6 +1,6 @@
# The CIDER (Contenteditable-Input-Diff-Error-Reconcile) editor
-The CIDER editor is a custom editor written for Riot.
+The CIDER editor is a custom editor written for Element.
Most of the code can be found in the `/editor/` directory of the `matrix-react-sdk` project.
It is used to power the composer main composer (both to send and edit messages), and might be used for other usecases where autocomplete is desired (invite box, ...).
diff --git a/docs/jitsi.md b/docs/jitsi.md
index 779ef79d3a..2b63ce0f72 100644
--- a/docs/jitsi.md
+++ b/docs/jitsi.md
@@ -25,7 +25,7 @@ which takes several parameters:
be null.
The react-sdk will assume that `jitsi.html` is at the path of wherever it is currently
-being served. For example, `https://riot.im/develop/jitsi.html` or `vector://webapp/jitsi.html`.
+being served. For example, `https://develop.element.io/jitsi.html` or `vector://webapp/jitsi.html`.
The `jitsi.html` wrapper can use the react-sdk's `WidgetApi` to communicate, making
it easier to actually implement the feature.
diff --git a/docs/room-list-store.md b/docs/room-list-store.md
index 53f0527209..fa849e2505 100644
--- a/docs/room-list-store.md
+++ b/docs/room-list-store.md
@@ -55,7 +55,7 @@ timestamp contained within the event (generated server-side by the sender's serv
This is the easiest of the algorithms to understand because it does essentially nothing. It imposes no
behavioural changes over the tag sorting algorithm and is by far the simplest way to order a room list.
-Historically, it's been the only option in Riot and extremely common in most chat applications due to
+Historically, it's been the only option in Element and extremely common in most chat applications due to
its relative deterministic behaviour.
### List ordering algorithm: Importance
diff --git a/docs/scrolling.md b/docs/scrolling.md
index 71329e5c32..a5232359a7 100644
--- a/docs/scrolling.md
+++ b/docs/scrolling.md
@@ -13,7 +13,7 @@ ScrollPanel supports a mode to prevent it shrinking. This is used to prevent a j
BACAT scrolling implements a different way of restoring the scroll position in the timeline while tiles out of view are changing height or tiles are being added or removed. It was added in https://github.com/matrix-org/matrix-react-sdk/pull/2842.
-The motivation for the changes is having noticed that setting scrollTop while scrolling tends to not work well, with it interrupting ongoing scrolling and also querying scrollTop reporting outdated values and consecutive scroll adjustments cancelling each out previous ones. This seems to be worse on macOS than other platforms, presumably because of a higher resolution in scroll events there. Also see https://github.com/vector-im/riot-web/issues/528. The BACAT approach allows to only have to change the scroll offset when adding or removing tiles.
+The motivation for the changes is having noticed that setting scrollTop while scrolling tends to not work well, with it interrupting ongoing scrolling and also querying scrollTop reporting outdated values and consecutive scroll adjustments cancelling each out previous ones. This seems to be worse on macOS than other platforms, presumably because of a higher resolution in scroll events there. Also see https://github.com/vector-im/element-web/issues/528. The BACAT approach allows to only have to change the scroll offset when adding or removing tiles.
The approach taken instead is to vertically align the timeline tiles to the bottom of the scroll container (using flexbox) and give the timeline inside the scroll container an explicit height, initially set to a multiple of the PAGE_SIZE (400px at time of writing) as needed by the content. When scrolled up, we can compensate for anything that grew below the viewport by changing the height of the timeline to maintain what's currently visible in the viewport without adjusting the scrollTop and hence without jumping.
diff --git a/docs/usercontent.md b/docs/usercontent.md
index e54851dd0d..db0e34e5fa 100644
--- a/docs/usercontent.md
+++ b/docs/usercontent.md
@@ -5,9 +5,9 @@ letting the browser and user interact with the resulting data may be dangerous,
previously `usercontent.riot.im` was used to act as a sandbox on a different origin to close the attack surface,
it is now possible to do by using a combination of a sandboxed iframe and some code written into the app which consumes this SDK.
-Usercontent is an iframe sandbox target for allowing a user to safely download a decrypted attachment from a sandboxed origin where it cannot be used to XSS your riot session out from under you.
+Usercontent is an iframe sandbox target for allowing a user to safely download a decrypted attachment from a sandboxed origin where it cannot be used to XSS your Element session out from under you.
-Its function is to create an Object URL for the user/browser to use but bound to an origin different to that of the riot instance to protect against XSS.
+Its function is to create an Object URL for the user/browser to use but bound to an origin different to that of the Element instance to protect against XSS.
It exposes a function over a postMessage API, when sent an object with the matching fields to render a download link with the Object URL:
@@ -24,4 +24,4 @@ It exposes a function over a postMessage API, when sent an object with the match
If only imgSrc, imgStyle and style are passed then just update the existing link without overwriting other things about it.
-It is expected that this target be available at `usercontent/` relative to the root of the app, this can be seen in riot-web's webpack config.
+It is expected that this target be available at `usercontent/` relative to the root of the app, this can be seen in element-web's webpack config.
diff --git a/package.json b/package.json
index 71f48fbf3b..c6f744912c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "matrix-react-sdk",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "SDK for matrix.org using React",
"author": "matrix.org",
"repository": {
@@ -106,6 +106,7 @@
"devDependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.10.5",
+ "@babel/parser": "^7.11.0",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-decorators": "^7.10.5",
"@babel/plugin-proposal-export-default-from": "^7.10.4",
@@ -118,6 +119,7 @@
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@babel/register": "^7.10.5",
+ "@babel/traverse": "^7.11.0",
"@peculiar/webcrypto": "^1.1.2",
"@types/classnames": "^2.2.10",
"@types/counterpart": "^0.18.1",
@@ -147,9 +149,7 @@
"eslint-plugin-flowtype": "^2.50.3",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "^2.5.1",
- "estree-walker": "^0.9.0",
"file-loader": "^3.0.1",
- "flow-parser": "0.57.3",
"glob": "^5.0.15",
"jest": "^24.9.0",
"jest-canvas-mock": "^2.2.0",
diff --git a/res/css/_common.scss b/res/css/_common.scss
index f2d3a0e54b..a22d77f3d3 100644
--- a/res/css/_common.scss
+++ b/res/css/_common.scss
@@ -38,7 +38,7 @@ body {
margin: 0px;
// needed to match the designs correctly on macOS
- // see https://github.com/vector-im/riot-web/issues/11425
+ // see https://github.com/vector-im/element-web/issues/11425
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@@ -436,7 +436,7 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
// TODO: Review mx_GeneralButton usage to see if it can use a different class
// These classes were brought in from the old UserSettings and are included here to avoid
// breaking the app.
-// Ref: https://github.com/vector-im/riot-web/issues/8420
+// Ref: https://github.com/vector-im/element-web/issues/8420
.mx_GeneralButton {
@mixin mx_DialogButton;
display: inline;
@@ -585,93 +585,6 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
max-width: 120px;
}
-// A context menu that largely fits the | [icon] [label] | format.
-.mx_IconizedContextMenu {
- min-width: 146px;
-
- .mx_IconizedContextMenu_optionList {
- & > * {
- padding-left: 20px;
- padding-right: 20px;
- }
-
- // the notFirst class is for cases where the optionList might be under a header of sorts.
- &:nth-child(n + 2), .mx_IconizedContextMenu_optionList_notFirst {
- // This is a bit of a hack when we could just use a simple border-top property,
- // however we have a (kinda) good reason for doing it this way: we need opacity.
- // To get the right color, we need an opacity modifier which means we have to work
- // around the problem. PostCSS doesn't support the opacity() function, and if we
- // use something like postcss-functions we quickly run into an issue where the
- // function we would define gets passed a CSS variable for custom themes, which
- // can't be converted easily even when considering https://stackoverflow.com/a/41265350/7037379
- //
- // Therefore, we just hack in a line and border the thing ourselves
- &::before {
- border-top: 1px solid $primary-fg-color;
- opacity: 0.1;
- content: '';
-
- // Counteract the padding problems (width: 100% ignores the 40px padding,
- // unless we position it absolutely then it does the right thing).
- width: 100%;
- position: absolute;
- left: 0;
- }
- }
-
- // round the top corners of the top button for the hover effect to be bounded
- &:first-child .mx_AccessibleButton:first-child {
- border-radius: 8px 8px 0 0; // radius matches .mx_ContextualMenu
- }
-
- // round the bottom corners of the bottom button for the hover effect to be bounded
- &:last-child .mx_AccessibleButton:last-child {
- border-radius: 0 0 8px 8px; // radius matches .mx_ContextualMenu
- }
-
- .mx_AccessibleButton {
- // pad the inside of the button so that the hover background is padded too
- padding-top: 12px;
- padding-bottom: 12px;
- text-decoration: none;
- color: $primary-fg-color;
- font-size: $font-15px;
- line-height: $font-24px;
-
- // Create a flexbox to more easily define the list items
- display: flex;
- align-items: center;
-
- &:hover {
- background-color: $menu-selected-color;
- }
-
- img, .mx_IconizedContextMenu_icon { // icons
- width: 16px;
- min-width: 16px;
- max-width: 16px;
- }
-
- span.mx_IconizedContextMenu_label { // labels
- padding-left: 14px;
- width: 100%;
- flex: 1;
-
- // Ellipsize any text overflow
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- }
- }
- }
-
- &.mx_IconizedContextMenu_compact {
- .mx_IconizedContextMenu_optionList > * {
- padding: 8px 16px 8px 11px;
- }
- }
-}
-
@define-mixin ProgressBarColour $colour {
color: $colour;
&::-moz-progress-bar {
@@ -692,3 +605,15 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
border-radius: $radius;
}
}
+
+@define-mixin unreal-focus {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: Highlight;
+
+ /* WebKit gets its native focus styles. */
+ @media (-webkit-min-device-pixel-ratio: 0) {
+ outline-color: -webkit-focus-ring-color;
+ outline-style: auto;
+ }
+}
diff --git a/res/css/_components.scss b/res/css/_components.scss
index fcc87e2061..7dd8a2034d 100644
--- a/res/css/_components.scss
+++ b/res/css/_components.scss
@@ -50,6 +50,7 @@
@import "./views/avatars/_DecoratedRoomAvatar.scss";
@import "./views/avatars/_MemberStatusMessageAvatar.scss";
@import "./views/avatars/_PulsedAvatar.scss";
+@import "./views/context_menus/_IconizedContextMenu.scss";
@import "./views/context_menus/_MessageContextMenu.scss";
@import "./views/context_menus/_RoomTileContextMenu.scss";
@import "./views/context_menus/_StatusMessageContextMenu.scss";
@@ -71,7 +72,6 @@
@import "./views/dialogs/_KeyboardShortcutsDialog.scss";
@import "./views/dialogs/_MessageEditHistoryDialog.scss";
@import "./views/dialogs/_NewSessionReviewDialog.scss";
-@import "./views/dialogs/_RebrandDialog.scss";
@import "./views/dialogs/_RoomSettingsDialog.scss";
@import "./views/dialogs/_RoomSettingsDialogBridges.scss";
@import "./views/dialogs/_RoomUpgradeDialog.scss";
diff --git a/res/css/structures/_FilePanel.scss b/res/css/structures/_FilePanel.scss
index 859ee28035..21b30d804a 100644
--- a/res/css/structures/_FilePanel.scss
+++ b/res/css/structures/_FilePanel.scss
@@ -41,13 +41,19 @@ limitations under the License.
.mx_FilePanel .mx_EventTile {
word-break: break-word;
+ margin-top: 32px;
}
.mx_FilePanel .mx_EventTile .mx_MImageBody {
margin-right: 0px;
}
+.mx_FilePanel .mx_EventTile .mx_MFileBody {
+ line-height: 2.4rem;
+}
+
.mx_FilePanel .mx_EventTile .mx_MFileBody_download {
+ padding-top: 8px;
display: flex;
font-size: $font-14px;
color: $event-timestamp-color;
@@ -60,7 +66,7 @@ limitations under the License.
.mx_FilePanel .mx_EventTile .mx_MImageBody_size {
flex: 1 0 0;
- font-size: $font-11px;
+ font-size: $font-14px;
text-align: right;
white-space: nowrap;
}
@@ -80,7 +86,7 @@ limitations under the License.
flex: 1 1 auto;
line-height: initial;
padding: 0px;
- font-size: $font-11px;
+ font-size: $font-14px;
opacity: 1.0;
color: $event-timestamp-color;
}
@@ -90,7 +96,7 @@ limitations under the License.
text-align: right;
visibility: visible;
position: initial;
- font-size: $font-11px;
+ font-size: $font-14px;
opacity: 1.0;
color: $event-timestamp-color;
}
@@ -109,3 +115,7 @@ limitations under the License.
.mx_FilePanel .mx_EventTile:hover .mx_EventTile_line {
background-color: $primary-bg-color;
}
+
+.mx_FilePanel_empty::before {
+ mask-image: url('$(res)/img/element-icons/room/files.svg');
+}
diff --git a/res/css/structures/_LeftPanel.scss b/res/css/structures/_LeftPanel.scss
index db531cf088..354dc87b8f 100644
--- a/res/css/structures/_LeftPanel.scss
+++ b/res/css/structures/_LeftPanel.scss
@@ -137,6 +137,7 @@ $tagPanelWidth: 56px; // only applies in this file, used for calculations
.mx_LeftPanel_roomListWrapper {
overflow: hidden;
margin-top: 10px; // so we're not up against the search/filter
+ flex: 1 0 0; // needed in Safari to properly set flex-basis
&.mx_LeftPanel_roomListWrapper_stickyBottom {
padding-bottom: 32px;
diff --git a/res/css/structures/_MatrixChat.scss b/res/css/structures/_MatrixChat.scss
index af6f6c79e9..f4e46a8e94 100644
--- a/res/css/structures/_MatrixChat.scss
+++ b/res/css/structures/_MatrixChat.scss
@@ -72,7 +72,7 @@ limitations under the License.
flex: 1 1 0;
min-width: 0;
- /* To fix https://github.com/vector-im/riot-web/issues/3298 where Safari
+ /* To fix https://github.com/vector-im/element-web/issues/3298 where Safari
needed height 100% all the way down to the HomePage. Height does not
have to be auto, empirically.
*/
diff --git a/res/css/structures/_NotificationPanel.scss b/res/css/structures/_NotificationPanel.scss
index 561ab1446f..715a94fe2c 100644
--- a/res/css/structures/_NotificationPanel.scss
+++ b/res/css/structures/_NotificationPanel.scss
@@ -99,3 +99,7 @@ limitations under the License.
.mx_NotificationPanel .mx_EventTile_content {
margin-right: 0px;
}
+
+.mx_NotificationPanel_empty::before {
+ mask-image: url('$(res)/img/element-icons/notifications.svg');
+}
diff --git a/res/css/structures/_RightPanel.scss b/res/css/structures/_RightPanel.scss
index cab32476ff..c7c0d6fac4 100644
--- a/res/css/structures/_RightPanel.scss
+++ b/res/css/structures/_RightPanel.scss
@@ -64,7 +64,7 @@ limitations under the License.
left: 4px; // center with parent of 32px
height: 24px;
width: 24px;
- background-color: $rightpanel-button-color;
+ background-color: $icon-button-color;
mask-repeat: no-repeat;
mask-size: contain;
}
@@ -99,7 +99,7 @@ limitations under the License.
background: rgba($accent-color, 0.25);
// make the icon the accent color too
&::before {
- background-color: $accent-color;
+ background-color: $accent-color !important;
}
}
@@ -144,3 +144,28 @@ limitations under the License.
order: 2;
margin: auto;
}
+
+.mx_RightPanel_empty {
+ margin-right: -42px;
+
+ h2 {
+ font-weight: 700;
+ margin: 16px 0;
+ }
+
+ h2, p {
+ font-size: $font-14px;
+ }
+
+ &::before {
+ content: '';
+ display: block;
+ margin: 11px auto 29px auto;
+ height: 42px;
+ width: 42px;
+ background-color: $rightpanel-button-color;
+ mask-repeat: no-repeat;
+ mask-size: contain;
+ mask-position: center;
+ }
+}
diff --git a/res/css/structures/_ToastContainer.scss b/res/css/structures/_ToastContainer.scss
index e798e4ac52..544dcbc180 100644
--- a/res/css/structures/_ToastContainer.scss
+++ b/res/css/structures/_ToastContainer.scss
@@ -80,10 +80,6 @@ limitations under the License.
}
}
- &.mx_Toast_icon_element_logo::after {
- background-image: url("$(res)/img/element-logo.svg");
- }
-
.mx_Toast_title, .mx_Toast_body {
grid-column: 2;
}
diff --git a/res/css/structures/_UserMenu.scss b/res/css/structures/_UserMenu.scss
index 81a10ee1d0..78795c85a2 100644
--- a/res/css/structures/_UserMenu.scss
+++ b/res/css/structures/_UserMenu.scss
@@ -89,15 +89,10 @@ limitations under the License.
.mx_UserMenu_contextMenu {
width: 247px;
- .mx_UserMenu_contextMenu_redRow {
+ &.mx_IconizedContextMenu .mx_IconizedContextMenu_optionList_red {
.mx_AccessibleButton {
padding-top: 16px;
padding-bottom: 16px;
- color: $warning-color !important; // !important to override styles from context menu
- }
-
- .mx_IconizedContextMenu_icon::before {
- background-color: $warning-color;
}
}
diff --git a/res/css/views/avatars/_BaseAvatar.scss b/res/css/views/avatars/_BaseAvatar.scss
index e59598278f..1a1e14e7ac 100644
--- a/res/css/views/avatars/_BaseAvatar.scss
+++ b/res/css/views/avatars/_BaseAvatar.scss
@@ -22,7 +22,7 @@ limitations under the License.
// different results during full reflow of the page vs. incremental reflow
// of small portions. While that's surely a browser bug, we can avoid it by
// using `inline-block` instead of the default `inline`.
- // https://github.com/vector-im/riot-web/issues/5594
+ // https://github.com/vector-im/element-web/issues/5594
// https://bugzilla.mozilla.org/show_bug.cgi?id=1535053
// https://bugzilla.mozilla.org/show_bug.cgi?id=255139
display: inline-block;
diff --git a/res/css/views/context_menus/_IconizedContextMenu.scss b/res/css/views/context_menus/_IconizedContextMenu.scss
new file mode 100644
index 0000000000..7913058995
--- /dev/null
+++ b/res/css/views/context_menus/_IconizedContextMenu.scss
@@ -0,0 +1,148 @@
+/*
+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.
+*/
+
+// A context menu that largely fits the | [icon] [label] | format.
+.mx_IconizedContextMenu {
+ min-width: 146px;
+
+ .mx_IconizedContextMenu_optionList {
+ & > * {
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+
+ // the notFirst class is for cases where the optionList might be under a header of sorts.
+ &:nth-child(n + 2), .mx_IconizedContextMenu_optionList_notFirst {
+ // This is a bit of a hack when we could just use a simple border-top property,
+ // however we have a (kinda) good reason for doing it this way: we need opacity.
+ // To get the right color, we need an opacity modifier which means we have to work
+ // around the problem. PostCSS doesn't support the opacity() function, and if we
+ // use something like postcss-functions we quickly run into an issue where the
+ // function we would define gets passed a CSS variable for custom themes, which
+ // can't be converted easily even when considering https://stackoverflow.com/a/41265350/7037379
+ //
+ // Therefore, we just hack in a line and border the thing ourselves
+ &::before {
+ border-top: 1px solid $primary-fg-color;
+ opacity: 0.1;
+ content: '';
+
+ // Counteract the padding problems (width: 100% ignores the 40px padding,
+ // unless we position it absolutely then it does the right thing).
+ width: 100%;
+ position: absolute;
+ left: 0;
+ }
+ }
+
+ // round the top corners of the top button for the hover effect to be bounded
+ &:first-child .mx_AccessibleButton:first-child {
+ border-radius: 8px 8px 0 0; // radius matches .mx_ContextualMenu
+ }
+
+ // round the bottom corners of the bottom button for the hover effect to be bounded
+ &:last-child .mx_AccessibleButton:last-child {
+ border-radius: 0 0 8px 8px; // radius matches .mx_ContextualMenu
+ }
+
+ .mx_AccessibleButton {
+ // pad the inside of the button so that the hover background is padded too
+ padding-top: 12px;
+ padding-bottom: 12px;
+ text-decoration: none;
+ color: $primary-fg-color;
+ font-size: $font-15px;
+ line-height: $font-24px;
+
+ // Create a flexbox to more easily define the list items
+ display: flex;
+ align-items: center;
+
+ &:hover {
+ background-color: $menu-selected-color;
+ }
+
+ img, .mx_IconizedContextMenu_icon { // icons
+ width: 16px;
+ min-width: 16px;
+ max-width: 16px;
+ }
+
+ span.mx_IconizedContextMenu_label { // labels
+ padding-left: 14px;
+ width: 100%;
+ flex: 1;
+
+ // Ellipsize any text overflow
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ }
+ }
+
+ .mx_IconizedContextMenu_icon {
+ position: relative;
+ width: 16px;
+ height: 16px;
+
+ &::before {
+ content: '';
+ width: 16px;
+ height: 16px;
+ position: absolute;
+ mask-position: center;
+ mask-size: contain;
+ mask-repeat: no-repeat;
+ background: $primary-fg-color;
+ }
+ }
+
+ .mx_IconizedContextMenu_optionList_red {
+ .mx_AccessibleButton {
+ color: $warning-color !important;
+ }
+
+ .mx_IconizedContextMenu_icon::before {
+ background-color: $warning-color;
+ }
+ }
+
+ .mx_IconizedContextMenu_active {
+ &.mx_AccessibleButton, .mx_AccessibleButton {
+ color: $accent-color !important;
+ }
+
+ .mx_IconizedContextMenu_icon::before {
+ background-color: $accent-color;
+ }
+ }
+
+ &.mx_IconizedContextMenu_compact {
+ .mx_IconizedContextMenu_optionList > * {
+ padding: 8px 16px 8px 11px;
+ }
+ }
+
+ .mx_IconizedContextMenu_checked {
+ margin-left: 16px;
+ margin-right: -5px;
+
+ &::before {
+ mask-image: url('$(res)/img/element-icons/roomlist/checkmark.svg');
+ }
+ }
+}
diff --git a/res/css/views/dialogs/_RebrandDialog.scss b/res/css/views/dialogs/_RebrandDialog.scss
deleted file mode 100644
index 6c916e0f1d..0000000000
--- a/res/css/views/dialogs/_RebrandDialog.scss
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-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_RebrandDialog {
- text-align: center;
-
- a:link,
- a:hover,
- a:visited {
- @mixin mx_Dialog_link;
- }
-
- .mx_Dialog_buttons {
- margin-top: 43px;
- text-align: center;
- }
-}
-
-.mx_RebrandDialog_body {
- width: 550px;
- margin-left: auto;
- margin-right: auto;
-}
-
-.mx_RebrandDialog_logoContainer {
- margin-top: 35px;
- margin-bottom: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.mx_RebrandDialog_logo {
- margin-left: 28px;
- margin-right: 28px;
- width: 64px;
- height: 64px;
-}
-
-.mx_RebrandDialog_chevron::after {
- content: '';
- display: inline-block;
- width: 24px;
- height: 24px;
- mask-position: center;
- mask-size: contain;
- mask-repeat: no-repeat;
- background-color: $muted-fg-color;
- mask-image: url('$(res)/img/feather-customised/chevron-right.svg');
-}
diff --git a/res/css/views/dialogs/_ShareDialog.scss b/res/css/views/dialogs/_ShareDialog.scss
index d2fe98e8f9..c343b872fd 100644
--- a/res/css/views/dialogs/_ShareDialog.scss
+++ b/res/css/views/dialogs/_ShareDialog.scss
@@ -51,7 +51,8 @@ limitations under the License.
display: inherit;
}
.mx_ShareDialog_matrixto_copy > div {
- background-image: url($copy-button-url);
+ mask-image: url($copy-button-url);
+ background-color: $message-action-bar-fg-color;
margin-left: 5px;
width: 20px;
height: 20px;
diff --git a/res/css/views/directory/_NetworkDropdown.scss b/res/css/views/directory/_NetworkDropdown.scss
index bd5c67c7ed..ae0927386a 100644
--- a/res/css/views/directory/_NetworkDropdown.scss
+++ b/res/css/views/directory/_NetworkDropdown.scss
@@ -145,13 +145,14 @@ limitations under the License.
&::after {
content: "";
position: absolute;
- width: 24px;
- height: 24px;
- right: -28px; // - (24 + 4)
+ width: 26px;
+ height: 26px;
+ right: -27.5px; // - (width: 26 + spacing to align with X above: 1.5)
+ top: -3px;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
- mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
+ mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
background-color: $primary-fg-color;
}
diff --git a/res/css/views/elements/_StyledCheckbox.scss b/res/css/views/elements/_StyledCheckbox.scss
index 60f1bf0277..e2d61c033b 100644
--- a/res/css/views/elements/_StyledCheckbox.scss
+++ b/res/css/views/elements/_StyledCheckbox.scss
@@ -80,5 +80,11 @@ limitations under the License.
background-color: $accent-color;
border-color: $accent-color;
}
+
+ &.focus-visible {
+ & + label .mx_Checkbox_background {
+ @mixin unreal-focus;
+ }
+ }
}
}
diff --git a/res/css/views/elements/_StyledRadioButton.scss b/res/css/views/elements/_StyledRadioButton.scss
index ffa1337ebb..62fb5c5512 100644
--- a/res/css/views/elements/_StyledRadioButton.scss
+++ b/res/css/views/elements/_StyledRadioButton.scss
@@ -63,6 +63,7 @@ limitations under the License.
box-sizing: border-box;
height: $font-16px;
width: $font-16px;
+ margin-left: 2px; // For the highlight on focus
border: $font-1-5px solid $radio-circle-color;
border-radius: $font-16px;
@@ -77,6 +78,12 @@ limitations under the License.
}
}
+ &.focus-visible {
+ & + div {
+ @mixin unreal-focus;
+ }
+ }
+
&:checked {
& + div {
border-color: $active-radio-circle-color;
diff --git a/res/css/views/messages/_MImageBody.scss b/res/css/views/messages/_MImageBody.scss
index 547b16e9ad..2faea41709 100644
--- a/res/css/views/messages/_MImageBody.scss
+++ b/res/css/views/messages/_MImageBody.scss
@@ -34,6 +34,8 @@ limitations under the License.
// Make sure the _thumbnail is positioned relative to the _container
position: relative;
+
+ border-radius: 4px;
}
.mx_MImageBody_thumbnail_spinner {
diff --git a/res/css/views/messages/_MessageActionBar.scss b/res/css/views/messages/_MessageActionBar.scss
index e3ccd99611..d2ff551668 100644
--- a/res/css/views/messages/_MessageActionBar.scss
+++ b/res/css/views/messages/_MessageActionBar.scss
@@ -24,7 +24,7 @@ limitations under the License.
line-height: $font-24px;
border-radius: 4px;
background: $message-action-bar-bg-color;
- top: -18px;
+ top: -26px;
right: 8px;
user-select: none;
// Ensure the action bar appears above over things, like the read marker.
diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss
index 2a2191b799..eb0e1dd7b0 100644
--- a/res/css/views/rooms/_EventTile.scss
+++ b/res/css/views/rooms/_EventTile.scss
@@ -536,11 +536,12 @@ $left-gutter: 64px;
display: inline-block;
visibility: hidden;
cursor: pointer;
- top: 8px;
+ top: 6px;
right: 6px;
width: 19px;
height: 19px;
- background-image: url($copy-button-url);
+ mask-image: url($copy-button-url);
+ background-color: $message-action-bar-fg-color;
}
.mx_EventTile_body .mx_EventTile_pre_container:focus-within .mx_EventTile_copyButton,
diff --git a/res/css/views/rooms/_IRCLayout.scss b/res/css/views/rooms/_IRCLayout.scss
index ed60c220e7..958d718b11 100644
--- a/res/css/views/rooms/_IRCLayout.scss
+++ b/res/css/views/rooms/_IRCLayout.scss
@@ -54,7 +54,7 @@ $irc-line-height: $font-18px;
flex-shrink: 0;
width: var(--name-width);
text-overflow: ellipsis;
- text-align: right;
+ text-align: left;
display: flex;
align-items: center;
overflow: visible;
diff --git a/res/css/views/rooms/_JumpToBottomButton.scss b/res/css/views/rooms/_JumpToBottomButton.scss
index 4659442d9b..6cb3b6bce9 100644
--- a/res/css/views/rooms/_JumpToBottomButton.scss
+++ b/res/css/views/rooms/_JumpToBottomButton.scss
@@ -67,9 +67,8 @@ limitations under the License.
bottom: 0;
left: 0;
right: 0;
- mask: url('$(res)/img/icon-jump-to-bottom.svg');
+ mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
mask-repeat: no-repeat;
- mask-position: center;
- mask-size: 50%;
+ mask-size: contain;
background: $muted-fg-color;
}
diff --git a/res/css/views/rooms/_MessageComposer.scss b/res/css/views/rooms/_MessageComposer.scss
index ec95403262..a403a8dc4c 100644
--- a/res/css/views/rooms/_MessageComposer.scss
+++ b/res/css/views/rooms/_MessageComposer.scss
@@ -21,6 +21,7 @@ limitations under the License.
border-top: 1px solid $primary-hairline-color;
position: relative;
padding-left: 82px;
+ padding-right: 6px;
}
.mx_MessageComposer_replaced_wrapper {
@@ -178,25 +179,44 @@ limitations under the License.
color: $accent-color;
}
+.mx_MessageComposer_button_highlight {
+ background: rgba($accent-color, 0.25);
+ // make the icon the accent color too
+ &::before {
+ background-color: $accent-color !important;
+ }
+}
+
.mx_MessageComposer_button {
position: relative;
- margin-right: 12px;
+ margin-right: 6px;
cursor: pointer;
- height: 20px;
- width: 20px;
+ height: 26px;
+ width: 26px;
+ border-radius: 100%;
&::before {
content: '';
position: absolute;
+ top: 3px;
+ left: 3px;
height: 20px;
width: 20px;
- background-color: $composer-button-color;
+ background-color: $icon-button-color;
mask-repeat: no-repeat;
mask-size: contain;
mask-position: center;
}
+ &:hover {
+ background: rgba($accent-color, 0.1);
+
+ &::before {
+ background-color: $accent-color;
+ }
+ }
+
&.mx_MessageComposer_hangup::before {
background-color: $warning-color;
}
@@ -288,7 +308,7 @@ limitations under the License.
mask-size: contain;
mask-position: center;
mask-repeat: no-repeat;
- background-color: $composer-button-color;
+ background-color: $icon-button-color;
&.mx_MessageComposer_markdownDisabled {
opacity: 0.2;
diff --git a/res/css/views/rooms/_RoomHeader.scss b/res/css/views/rooms/_RoomHeader.scss
index ba46100ea6..a880a7bee2 100644
--- a/res/css/views/rooms/_RoomHeader.scss
+++ b/res/css/views/rooms/_RoomHeader.scss
@@ -222,7 +222,7 @@ limitations under the License.
left: 4px; // center with parent of 32px
height: 24px;
width: 24px;
- background-color: $roomheader-button-color;
+ background-color: $icon-button-color;
mask-repeat: no-repeat;
mask-size: contain;
}
diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss
index b907d06d36..fe80dfca22 100644
--- a/res/css/views/rooms/_RoomSublist.scss
+++ b/res/css/views/rooms/_RoomSublist.scss
@@ -142,26 +142,24 @@ limitations under the License.
.mx_RoomSublist_collapseBtn {
display: inline-block;
position: relative;
- width: 12px;
- height: 12px;
- margin-right: 8px;
+ width: 14px;
+ height: 14px;
+ margin-right: 6px;
&::before {
content: '';
- width: 12px;
- height: 12px;
+ width: 18px;
+ height: 18px;
position: absolute;
- top: 1px;
- left: 1px;
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
- background-color: $primary-fg-color;
+ background-color: $roomlist-header-color;
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
}
&.mx_RoomSublist_collapseBtn_collapsed::before {
- mask-image: url('$(res)/img/feather-customised/chevron-right.svg');
+ transform: rotate(-90deg);
}
}
}
@@ -171,7 +169,7 @@ limitations under the License.
// that the sublists below them do not jump. However, that leaves a gap
// when scrolled to the top above the first sublist (whose header can only
// ever stick to top), so we force height to 0 for only that first header.
- // See also https://github.com/vector-im/riot-web/issues/14429.
+ // See also https://github.com/vector-im/element-web/issues/14429.
&:first-child .mx_RoomSublist_headerContainer {
height: 0;
padding-bottom: 4px;
@@ -251,22 +249,24 @@ limitations under the License.
.mx_RoomSublist_showNButtonChevron {
position: relative;
- width: 16px;
- height: 16px;
+ width: 18px;
+ height: 18px;
margin-left: 12px;
- margin-right: 18px;
+ margin-right: 16px;
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
- background: $roomtile-preview-color;
+ background: $roomlist-header-color;
+ left: -1px; // adjust for image position
}
- .mx_RoomSublist_showMoreButtonChevron {
+ .mx_RoomSublist_showMoreButtonChevron,
+ .mx_RoomSublist_showLessButtonChevron {
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
}
.mx_RoomSublist_showLessButtonChevron {
- mask-image: url('$(res)/img/feather-customised/chevron-up.svg');
+ transform: rotate(180deg);
}
}
diff --git a/res/css/views/rooms/_RoomTile.scss b/res/css/views/rooms/_RoomTile.scss
index f22228602d..8eca3f1efa 100644
--- a/res/css/views/rooms/_RoomTile.scss
+++ b/res/css/views/rooms/_RoomTile.scss
@@ -175,48 +175,8 @@ limitations under the License.
.mx_RoomTile_iconBellMentions::before {
mask-image: url('$(res)/img/element-icons/roomlist/notifications-dm.svg');
}
-.mx_RoomTile_iconCheck::before {
- mask-image: url('$(res)/img/element-icons/roomlist/checkmark.svg');
-}
.mx_RoomTile_contextMenu {
- .mx_RoomTile_contextMenu_redRow {
- .mx_AccessibleButton {
- color: $warning-color !important; // !important to override styles from context menu
- }
-
- .mx_IconizedContextMenu_icon::before {
- background-color: $warning-color;
- }
- }
-
- .mx_RoomTile_contextMenu_activeRow {
- &.mx_AccessibleButton, .mx_AccessibleButton {
- color: $accent-color !important; // !important to override styles from context menu
- }
-
- .mx_IconizedContextMenu_icon::before {
- background-color: $accent-color;
- }
- }
-
- .mx_IconizedContextMenu_icon {
- position: relative;
- width: 16px;
- height: 16px;
-
- &::before {
- content: '';
- width: 16px;
- height: 16px;
- position: absolute;
- mask-position: center;
- mask-size: contain;
- mask-repeat: no-repeat;
- background: $primary-fg-color;
- }
- }
-
.mx_RoomTile_iconStar::before {
mask-image: url('$(res)/img/element-icons/roomlist/favorite.svg');
}
diff --git a/res/css/views/rooms/_TopUnreadMessagesBar.scss b/res/css/views/rooms/_TopUnreadMessagesBar.scss
index d9970ef037..8841b042a0 100644
--- a/res/css/views/rooms/_TopUnreadMessagesBar.scss
+++ b/res/css/views/rooms/_TopUnreadMessagesBar.scss
@@ -51,11 +51,11 @@ limitations under the License.
position: absolute;
width: 36px;
height: 36px;
- mask-image: url('$(res)/img/icon-jump-to-first-unread.svg');
+ mask-image: url('$(res)/img/feather-customised/chevron-down-thin.svg');
mask-repeat: no-repeat;
- mask-position: center;
- mask-size: 50%;
+ mask-size: contain;
background: $muted-fg-color;
+ transform: rotate(180deg);
}
.mx_TopUnreadMessagesBar_markAsRead {
diff --git a/res/css/views/settings/tabs/room/_SecurityRoomSettingsTab.scss b/res/css/views/settings/tabs/room/_SecurityRoomSettingsTab.scss
index b5a57dfefb..23dcc532b2 100644
--- a/res/css/views/settings/tabs/room/_SecurityRoomSettingsTab.scss
+++ b/res/css/views/settings/tabs/room/_SecurityRoomSettingsTab.scss
@@ -14,10 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-.mx_SecurityRoomSettingsTab label {
- display: block;
-}
-
.mx_SecurityRoomSettingsTab_warning {
display: block;
diff --git a/res/img/element-logo.svg b/res/img/element-logo.svg
deleted file mode 100644
index 2cd11ed193..0000000000
--- a/res/img/element-logo.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/res/img/feather-customised/chevron-down-thin.svg b/res/img/feather-customised/chevron-down-thin.svg
new file mode 100644
index 0000000000..109c83def6
--- /dev/null
+++ b/res/img/feather-customised/chevron-down-thin.svg
@@ -0,0 +1,3 @@
+
diff --git a/res/img/feather-customised/chevron-down.svg b/res/img/feather-customised/chevron-down.svg
index bcb185ede7..a091913b42 100644
--- a/res/img/feather-customised/chevron-down.svg
+++ b/res/img/feather-customised/chevron-down.svg
@@ -1,3 +1,3 @@
-