Skip to content

Commit 59e526e

Browse files
authored
Update unsupported browser react component to new designs (#27857)
1 parent 31345dd commit 59e526e

File tree

16 files changed

+553
-455
lines changed

16 files changed

+553
-455
lines changed

docs/config.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ Starting with `desktop_builds`, the following subproperties are available:
167167
1. `available`: Required. When `true`, the desktop app can be downloaded from somewhere.
168168
2. `logo`: Required. A URL to a logo (SVG), intended to be shown at 24x24 pixels.
169169
3. `url`: Required. The download URL for the app. This is used as a hyperlink.
170+
4. `url_macos`: Optional. Direct link to download macOS desktop app.
171+
5. `url_win32`: Optional. Direct link to download Windows 32-bit desktop app.
172+
6. `url_win64`: Optional. Direct link to download Windows 64-bit desktop app.
173+
7. `url_linux`: Optional. Direct link to download Linux desktop app.
170174

171175
When `desktop_builds` is not specified at all, the app will assume desktop downloads are available from https://element.io
172176

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,17 @@
6868
},
6969
"resolutions": {
7070
"@types/react-dom": "17.0.25",
71-
"@types/react": "17.0.80"
71+
"@types/react": "17.0.80",
72+
"@vector-im/compound-design-tokens": "1.7.0",
73+
"@vector-im/compound-web": "5.5.0",
74+
"@floating-ui/react": "0.26.11",
75+
"@radix-ui/react-id": "1.1.0"
7276
},
7377
"dependencies": {
7478
"@formatjs/intl-segmenter": "^11.5.7",
7579
"@matrix-org/react-sdk-module-api": "^2.3.0",
80+
"@vector-im/compound-design-tokens": "^1.6.1",
81+
"@vector-im/compound-web": "^5.5.0",
7682
"jsrsasign": "^11.0.0",
7783
"katex": "^0.16.0",
7884
"lodash": "^4.17.21",

res/css/structures/ErrorView.pcss

Lines changed: 34 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -14,94 +14,61 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
/* import font-size variables manually,
18-
ideally this file would get loaded by the theme which has all variables in context */
19-
@import "../../../node_modules/matrix-react-sdk/res/css/_font-sizes.pcss";
20-
2117
.mx_ErrorView {
22-
background: #c5e0f7;
23-
background: -moz-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
24-
background: -webkit-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
25-
background: linear-gradient(to bottom, #c5e0f7 0%, #ffffff 100%);
26-
/* stylelint-disable-next-line function-no-unknown */
27-
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#c5e0f7', endColorstr='#ffffff', GradientType=0);
18+
--width: 520px;
19+
--cpd-separator-inset: calc(50% - (var(--width) / 2));
20+
--cpd-separator-spacing: var(--cpd-space-8x);
21+
2822
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
2923
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
30-
color: #000;
24+
text-align: center;
25+
color: var(--cpd-color-text-primary);
3126
width: 100%;
3227
height: 100%;
33-
overflow: auto;
34-
padding: 0 20px;
3528
box-sizing: border-box;
29+
overflow: auto;
30+
padding: var(--cpd-space-20x);
3631

37-
.mx_ErrorView_container {
38-
max-width: 680px;
39-
margin: auto;
40-
}
32+
background-color: var(--cpd-color-theme-bg);
33+
background-image: url("../../themes/element/img/compound/fade-arc-light.png");
34+
background-repeat: no-repeat;
35+
background-size: 100% 100%;
4136

42-
.mx_Button {
43-
border: 0;
44-
border-radius: 4px;
45-
font-size: $font-18px;
46-
margin-left: 4px;
47-
margin-right: 4px;
48-
min-width: 80px;
49-
background-color: #03b381;
50-
color: #fff;
51-
cursor: pointer;
52-
padding: 12px 22px;
53-
word-break: break-word;
54-
text-decoration: none;
37+
.mx_ErrorView_logo {
38+
display: block;
39+
margin: 0 auto;
5540
}
5641

57-
.mx_Center {
58-
justify-content: center;
42+
.mx_ErrorView_container {
43+
max-width: var(--width);
44+
margin: 0 auto var(--cpd-space-8x);
5945
}
6046

61-
.mx_HomePage_header {
62-
color: #2e2f32;
63-
display: flex;
64-
align-items: center;
65-
justify-content: center;
47+
h1,
48+
h2 {
49+
color: var(--cpd-color-text-primary);
6650
}
6751

68-
font-size: $font-16px;
69-
h1 {
70-
font-size: $font-32px;
71-
}
7252
h2 {
73-
font-size: $font-24px;
74-
color: #000;
53+
margin: var(--cpd-space-8x) 0;
54+
/* Workaround for heading sm being broken in Compound design tokens */
55+
font-size: var(--cpd-font-size-heading-sm);
56+
line-height: var(--cpd-font-line-height-tight);
57+
font-weight: var(--cpd-font-weight-semibold);
7558
}
7659

77-
.mx_HomePage_col {
78-
display: flex;
79-
flex-direction: row;
60+
p {
61+
color: var(--cpd-color-text-secondary);
8062
}
8163

82-
.mx_HomePage_row {
83-
flex: 1 1 0;
84-
display: flex;
85-
flex-direction: row;
64+
.mx_Flex {
65+
margin: 0 auto;
66+
max-width: max-content;
8667
flex-wrap: wrap;
68+
justify-content: space-evenly;
8769
}
8870

89-
.mx_HomePage_logo {
90-
margin: auto 20px auto 0;
91-
}
92-
93-
h1,
94-
h2 {
95-
font-weight: 600;
96-
margin-bottom: 32px;
97-
}
98-
99-
.mx_Spacer {
100-
margin-top: 24px;
101-
}
102-
103-
.mx_FooterLink {
104-
color: #368bd6;
105-
text-decoration: none;
71+
.mx_ErrorView_buttons {
72+
margin-top: var(--cpd-space-6x);
10673
}
10774
}
Lines changed: 3 additions & 0 deletions
Loading
5.96 KB
Loading
Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
132 KB
Loading

src/async-components/structures/CompatibilityView.tsx

Lines changed: 0 additions & 149 deletions
This file was deleted.

0 commit comments

Comments
 (0)