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

Commit 84eba59

Browse files
committed
Merge branch 'develop' into improve-codeblock
2 parents 257b881 + cf5ec77 commit 84eba59

File tree

156 files changed

+7050
-5123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+7050
-5123
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module.exports = {
2222
"files": ["src/**/*.{ts,tsx}"],
2323
"extends": ["matrix-org/ts"],
2424
"rules": {
25+
// We're okay being explicit at the moment
26+
"@typescript-eslint/no-empty-interface": "off",
2527
// We disable this while we're transitioning
2628
"@typescript-eslint/no-explicit-any": "off",
2729
// We'd rather not do this but we do

CHANGELOG.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,132 @@
1+
Changes in [3.13.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.13.1) (2021-02-04)
2+
=====================================================================================================
3+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.13.0...v3.13.1)
4+
5+
* [Release] Fix z-index of stickerpicker
6+
[\#5618](https://github.com/matrix-org/matrix-react-sdk/pull/5618)
7+
8+
Changes in [3.13.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.13.0) (2021-02-03)
9+
=====================================================================================================
10+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.13.0-rc.1...v3.13.0)
11+
12+
* Upgrade to JS SDK 9.6.0
13+
* [Release] Fix flair height after accent changes
14+
[\#5612](https://github.com/matrix-org/matrix-react-sdk/pull/5612)
15+
* [Release] Iterate Social Logins work around edge cases and branding
16+
[\#5610](https://github.com/matrix-org/matrix-react-sdk/pull/5610)
17+
* [Release] Lock widget room ID when added
18+
[\#5608](https://github.com/matrix-org/matrix-react-sdk/pull/5608)
19+
* [Release] Better errors for SSO failures
20+
[\#5606](https://github.com/matrix-org/matrix-react-sdk/pull/5606)
21+
* [Release] Fix RoomView re-mounting breaking peeking
22+
[\#5603](https://github.com/matrix-org/matrix-react-sdk/pull/5603)
23+
24+
Changes in [3.13.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.13.0-rc.1) (2021-01-29)
25+
===============================================================================================================
26+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.12.1...v3.13.0-rc.1)
27+
28+
* Upgrade to JS SDK 9.6.0-rc.1
29+
* Translations update from Weblate
30+
[\#5597](https://github.com/matrix-org/matrix-react-sdk/pull/5597)
31+
* Support managed hybrid widgets from config
32+
[\#5596](https://github.com/matrix-org/matrix-react-sdk/pull/5596)
33+
* Add managed hybrid call widgets when supported
34+
[\#5594](https://github.com/matrix-org/matrix-react-sdk/pull/5594)
35+
* Tweak mobile guide toast copy
36+
[\#5595](https://github.com/matrix-org/matrix-react-sdk/pull/5595)
37+
* Improve SSO auth flow
38+
[\#5578](https://github.com/matrix-org/matrix-react-sdk/pull/5578)
39+
* Add optional mobile guide toast
40+
[\#5586](https://github.com/matrix-org/matrix-react-sdk/pull/5586)
41+
* Fix invisible text after logging out in the dark theme
42+
[\#5588](https://github.com/matrix-org/matrix-react-sdk/pull/5588)
43+
* Fix escape for cancelling replies
44+
[\#5591](https://github.com/matrix-org/matrix-react-sdk/pull/5591)
45+
* Update widget-api to beta.12
46+
[\#5589](https://github.com/matrix-org/matrix-react-sdk/pull/5589)
47+
* Add commands for DM conversion
48+
[\#5540](https://github.com/matrix-org/matrix-react-sdk/pull/5540)
49+
* Run a UI refresh over the OIDC Exchange confirmation dialog
50+
[\#5580](https://github.com/matrix-org/matrix-react-sdk/pull/5580)
51+
* Allow stickerpickers the legacy "visibility" capability
52+
[\#5581](https://github.com/matrix-org/matrix-react-sdk/pull/5581)
53+
* Hide local video if it is muted
54+
[\#5529](https://github.com/matrix-org/matrix-react-sdk/pull/5529)
55+
* Don't use name width in reply thread for IRC layout
56+
[\#5518](https://github.com/matrix-org/matrix-react-sdk/pull/5518)
57+
* Update code_style.md
58+
[\#5554](https://github.com/matrix-org/matrix-react-sdk/pull/5554)
59+
* Fix Czech capital letters like ŠČŘ...
60+
[\#5569](https://github.com/matrix-org/matrix-react-sdk/pull/5569)
61+
* Add optional search shortcut
62+
[\#5548](https://github.com/matrix-org/matrix-react-sdk/pull/5548)
63+
* Fix Sudden 'find a room' UI shows up when the only room moves to favourites
64+
[\#5584](https://github.com/matrix-org/matrix-react-sdk/pull/5584)
65+
* Increase PersistedElement's z-index
66+
[\#5568](https://github.com/matrix-org/matrix-react-sdk/pull/5568)
67+
* Remove check that prevents Jitsi widgets from being unpinned
68+
[\#5582](https://github.com/matrix-org/matrix-react-sdk/pull/5582)
69+
* Fix Jitsi widgets causing localized tile crashes
70+
[\#5583](https://github.com/matrix-org/matrix-react-sdk/pull/5583)
71+
* Log candidates for calls
72+
[\#5573](https://github.com/matrix-org/matrix-react-sdk/pull/5573)
73+
* Upgrade deps 2021-01
74+
[\#5579](https://github.com/matrix-org/matrix-react-sdk/pull/5579)
75+
* Fix "Continuing without email" dialog bug
76+
[\#5566](https://github.com/matrix-org/matrix-react-sdk/pull/5566)
77+
* Require registration for verification actions
78+
[\#5574](https://github.com/matrix-org/matrix-react-sdk/pull/5574)
79+
* Don't play the hangup sound when the call is answered from elsewhere
80+
[\#5572](https://github.com/matrix-org/matrix-react-sdk/pull/5572)
81+
* Move to newer base image for end-to-end tests
82+
[\#5570](https://github.com/matrix-org/matrix-react-sdk/pull/5570)
83+
* Update widgets in the room upon join
84+
[\#5564](https://github.com/matrix-org/matrix-react-sdk/pull/5564)
85+
* Update AuxPanel and related buttons when widgets change or on reload
86+
[\#5563](https://github.com/matrix-org/matrix-react-sdk/pull/5563)
87+
* Add VoIP user mapper
88+
[\#5560](https://github.com/matrix-org/matrix-react-sdk/pull/5560)
89+
* Improve styling of SSO Buttons for multiple IdPs
90+
[\#5558](https://github.com/matrix-org/matrix-react-sdk/pull/5558)
91+
* Fixes for the general tab in the room dialog
92+
[\#5522](https://github.com/matrix-org/matrix-react-sdk/pull/5522)
93+
* fix issue 16226 to allow switching back to default HS.
94+
[\#5561](https://github.com/matrix-org/matrix-react-sdk/pull/5561)
95+
* Support room-defined widget layouts
96+
[\#5553](https://github.com/matrix-org/matrix-react-sdk/pull/5553)
97+
* Change a bunch of strings from Recovery Key/Phrase to Security Key/Phrase
98+
[\#5533](https://github.com/matrix-org/matrix-react-sdk/pull/5533)
99+
* Give a bigger target area to AppsDrawer vertical resizer
100+
[\#5557](https://github.com/matrix-org/matrix-react-sdk/pull/5557)
101+
* Fix minimized left panel avatar alignment
102+
[\#5493](https://github.com/matrix-org/matrix-react-sdk/pull/5493)
103+
* Ensure component index has been written before renaming
104+
[\#5556](https://github.com/matrix-org/matrix-react-sdk/pull/5556)
105+
* Fixed continue button while selecting home-server
106+
[\#5552](https://github.com/matrix-org/matrix-react-sdk/pull/5552)
107+
* Wire up MSC2931 widget navigation
108+
[\#5527](https://github.com/matrix-org/matrix-react-sdk/pull/5527)
109+
* Various fixes for Bridge Info page (MSC2346)
110+
[\#5454](https://github.com/matrix-org/matrix-react-sdk/pull/5454)
111+
* Use room-specific listeners for message preview and community prototype
112+
[\#5547](https://github.com/matrix-org/matrix-react-sdk/pull/5547)
113+
* Fix some misc. React warnings when viewing timeline
114+
[\#5546](https://github.com/matrix-org/matrix-react-sdk/pull/5546)
115+
* Use device storage for allowed widgets if account data not supported
116+
[\#5544](https://github.com/matrix-org/matrix-react-sdk/pull/5544)
117+
* Fix incoming call box on dark theme
118+
[\#5542](https://github.com/matrix-org/matrix-react-sdk/pull/5542)
119+
* Convert DMRoomMap to typescript
120+
[\#5541](https://github.com/matrix-org/matrix-react-sdk/pull/5541)
121+
* Add in-call dialpad for DTMF sending
122+
[\#5532](https://github.com/matrix-org/matrix-react-sdk/pull/5532)
123+
124+
Changes in [3.12.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.12.1) (2021-01-26)
125+
=====================================================================================================
126+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.12.0...v3.12.1)
127+
128+
* Upgrade to JS SDK 9.5.1
129+
1130
Changes in [3.12.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.12.0) (2021-01-18)
2131
=====================================================================================================
3132
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.12.0-rc.1...v3.12.0)

code_style.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ General Style
3535
- lowerCamelCase for functions and variables.
3636
- Single line ternary operators are fine.
3737
- UPPER_SNAKE_CASE for constants
38-
- Single quotes for strings by default, for consistency with most JavaScript styles:
39-
40-
```javascript
41-
"bad" // Bad
42-
'good' // Good
43-
```
4438
- Use parentheses or `` ` `` instead of `\` for line continuation where ever possible
4539
- Open braces on the same line (consistent with Node):
4640

@@ -162,7 +156,14 @@ ECMAScript
162156
- Be careful mixing arrow functions and regular functions, eg. if one function in a promise chain is an
163157
arrow function, they probably all should be.
164158
- Apart from that, newer ES features should be used whenever the author deems them to be appropriate.
165-
- Flow annotations are welcome and encouraged.
159+
160+
TypeScript
161+
----------
162+
- TypeScript is preferred over the use of JavaScript
163+
- It's desirable to convert existing JavaScript files to TypeScript. TypeScript conversions should be done in small
164+
chunks without functional changes to ease the review process.
165+
- Use full type definitions for function parameters and return values.
166+
- Avoid `any` types and `any` casts
166167

167168
React
168169
-----
@@ -201,6 +202,8 @@ React
201202
this.state = { counter: 0 };
202203
}
203204
```
205+
- Prefer class components over function components and hooks (not a strict rule though)
206+
204207
- Think about whether your component really needs state: are you duplicating
205208
information in component state that could be derived from the model?
206209

docs/widget-layouts.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Widget layout support
2+
3+
Rooms can have a default widget layout to auto-pin certain widgets, make the container different
4+
sizes, etc. These are defined through the `io.element.widgets.layout` state event (empty state key).
5+
6+
Full example content:
7+
```json5
8+
{
9+
"widgets": {
10+
"first-widget-id": {
11+
"container": "top",
12+
"index": 0,
13+
"width": 60,
14+
"height": 40
15+
},
16+
"second-widget-id": {
17+
"container": "right"
18+
}
19+
}
20+
}
21+
```
22+
23+
As shown, there are two containers possible for widgets. These containers have different behaviour
24+
and interpret the other options differently.
25+
26+
## `top` container
27+
28+
This is the "App Drawer" or any pinned widgets in a room. This is by far the most versatile container
29+
though does introduce potential usability issues upon members of the room (widgets take up space and
30+
therefore fewer messages can be shown).
31+
32+
The `index` for a widget determines which order the widgets show up in from left to right. Widgets
33+
without an `index` will show up as the rightmost widgets. Tiebreaks (same `index` or multiple defined
34+
without an `index`) are resolved by comparing widget IDs. A maximum of 3 widgets can be in the top
35+
container - any which exceed this will be ignored (placed into the `right` container). Smaller numbers
36+
represent leftmost widgets.
37+
38+
The `width` is relative width within the container in percentage points. This will be clamped to a
39+
range of 0-100 (inclusive). The widgets will attempt to scale to relative proportions when more than
40+
100% space is allocated. For example, if 3 widgets are defined at 40% width each then the client will
41+
attempt to show them at 33% width each.
42+
43+
Note that the client may impose minimum widths on the widgets, such as a 10% minimum to avoid pinning
44+
hidden widgets. In general, widgets defined in the 30-70% range each will be free of these restrictions.
45+
46+
The `height` is not in fact applied per-widget but is recorded per-widget for potential future
47+
capabilities in future containers. The top container will take the tallest `height` and use that for
48+
the height of the whole container, and thus all widgets in that container. The `height` is relative
49+
to the container, like with `width`, meaning that 100% will consume as much space as the client is
50+
willing to sacrifice to the widget container. Like with `width`, the client may impose minimums to avoid
51+
the container being uselessly small. Heights in the 30-100% range are generally acceptable. The height
52+
is also clamped to be within 0-100, inclusive.
53+
54+
## `right` container
55+
56+
This is the default container and has no special configuration. Widgets which overflow from the top
57+
container will be put in this container instead. Putting a widget in the right container does not
58+
automatically show it - it only mentions that widgets should not be in another container.
59+
60+
The behaviour of this container may change in the future.

0 commit comments

Comments
 (0)