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

Commit

Permalink
Implement new user onboarding screen
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Jul 20, 2022
1 parent 0374e2f commit e3741ff
Show file tree
Hide file tree
Showing 27 changed files with 976 additions and 257 deletions.
7 changes: 6 additions & 1 deletion res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
@import "./structures/_GenericDropdownMenu.pcss";
@import "./structures/_GenericErrorPage.pcss";
@import "./structures/_HeaderButtons.pcss";
@import "./structures/_HomePage.pcss";
@import "./structures/_LeftPanel.pcss";
@import "./structures/_MainSplit.pcss";
@import "./structures/_MatrixChat.pcss";
Expand Down Expand Up @@ -324,6 +323,12 @@
@import "./views/toasts/_IncomingCallToast.pcss";
@import "./views/toasts/_NonUrgentEchoFailureToast.pcss";
@import "./views/typography/_Heading.pcss";
@import "./views/user-onboarding/_UserOnboardingFeedback.pcss";
@import "./views/user-onboarding/_UserOnboardingHeader.pcss";
@import "./views/user-onboarding/_UserOnboardingList.pcss";
@import "./views/user-onboarding/_UserOnboardingPage.pcss";
@import "./views/user-onboarding/_UserOnboardingTask.pcss";
@import "./views/user-onboarding/_UserOnboardingButton.pcss";
@import "./views/verification/_VerificationShowSas.pcss";
@import "./views/voip/CallView/_CallViewButtons.pcss";
@import "./views/voip/_CallPreview.pcss";
Expand Down
2 changes: 2 additions & 0 deletions res/css/_spacing.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ $spacing-24: 24px;
$spacing-28: 28px;
$spacing-32: 32px;
$spacing-40: 40px;
$spacing-48: 48px;
$spacing-64: 64px;
108 changes: 0 additions & 108 deletions res/css/structures/_HomePage.pcss

This file was deleted.

64 changes: 64 additions & 0 deletions res/css/views/user-onboarding/_UserOnboardingButton.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.mx_UserOnboardingElement {
display: flex;
flex-direction: column;
align-content: stretch;
align-items: stretch;
border-radius: 8px;
margin: $spacing-8 $spacing-8 0;
padding: $spacing-12;
gap: $spacing-8;

&.mx_UserOnboardingElement_selected,
&:hover,
&:focus-within {
background-color: $panel-actions;
}

.mx_UserOnboardingElement_content {
display: flex;
flex-direction: row;
gap: 5px;
align-items: center;

.mx_Heading_h4 {
margin-right: auto;
font-size: $font-14px;
color: $primary-content;
}

.mx_UserOnboardingElement_percentage {
font-size: $font-12px;
color: $secondary-content;
}

.mx_UserOnboardingElement_close {
position: relative;
box-sizing: border-box;
width: 14px;
height: 14px;
border-radius: 7px;
border: 1px solid $secondary-content;
flex-shrink: 0;

&::before {
background-color: $secondary-content;
content: "";
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
width: 7px;
height: 7px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
mask-image: url("$(res)/img/element-icons/cancel-rounded.svg");
}
}
}

.mx_ProgressBar {
width: auto;
background: $background;
}
}
35 changes: 35 additions & 0 deletions res/css/views/user-onboarding/_UserOnboardingFeedback.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
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_UserOnboardingFeedback {
display: flex;
flex-direction: row;
padding: $spacing-32;
border-radius: 8px;
background: $system;
gap: $spacing-64;

.mx_UserOnboardingFeedback_content {
display: flex;
flex-direction: column;
margin-right: auto;
}

.mx_UserOnboardingFeedback_action.mx_AccessibleButton {
background: transparent;
min-width: 180px;
}
}
59 changes: 59 additions & 0 deletions res/css/views/user-onboarding/_UserOnboardingHeader.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
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_UserOnboardingHeader {
display: flex;
flex-direction: row;
padding: $spacing-32;
border-radius: 16px;
background: $system;
gap: $spacing-64;

@media (max-width: 1280px) {
margin: $spacing-32;
}

.mx_UserOnboardingHeader_content {
display: flex;
flex-direction: column;
flex-basis: 50%;
flex-shrink: 1;
flex-grow: 1;
min-width: 0;
gap: $spacing-24;
margin-right: auto;

.mx_AccessibleButton {
margin-top: auto;
align-self: flex-start;
padding: $spacing-12 $spacing-24;
}
}

.mx_UserOnboardingHeader_image {
flex-basis: 30%;
flex-shrink: 1;
flex-grow: 1;
align-self: center;
height: calc(100% + $spacing-64 + $spacing-64);
aspect-ratio: 4 / 3;
object-fit: contain;
min-width: 0;
min-height: 0;
margin-top: -$spacing-64;
margin-bottom: -$spacing-64;
}
}
55 changes: 55 additions & 0 deletions res/css/views/user-onboarding/_UserOnboardingList.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
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_UserOnboardingList {
display: flex;
flex-direction: column;

.mx_UserOnboardingList_header {
display: flex;
flex-direction: row;
gap: 12px;
align-items: center;

.mx_UserOnboardingList_hint {
color: $secondary-content;
}
}

.mx_ProgressBar {
width: auto;
margin-top: $spacing-16;
height: 16px;

@mixin ProgressBarBorderRadius 16px;
}

.mx_UserOnboardingFeedback {
margin-top: $spacing-16;
}

.mx_UserOnboardingList_list {
display: grid;
grid-template-columns: max-content 1fr max-content;

appearance: none;
list-style: none;
margin: $spacing-32 0 0;
padding: 0;

grid-gap: $spacing-24;
}
}
34 changes: 34 additions & 0 deletions res/css/views/user-onboarding/_UserOnboardingPage.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
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_UserOnboardingPage {
width: 100%;
height: 100%;

align-self: stretch;
margin-bottom: auto;

display: flex;
flex-direction: column;
box-sizing: border-box;

gap: $spacing-64;
padding: $spacing-64 100px;

@media (max-width: 1280px) {
padding: $spacing-48 $spacing-32;
}
}
Loading

0 comments on commit e3741ff

Please sign in to comment.