New user profile UI in User Settings (#12548)
* New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix room profile display * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year
This commit is contained in:
parent
c4c1faff97
commit
cfa322cd62
25 changed files with 919 additions and 307 deletions
|
@ -597,7 +597,10 @@ legend {
|
|||
* 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):not([class|="maplibregl"]):not(.mx_AccessibleButton),
|
||||
.mx_Dialog
|
||||
button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):not(
|
||||
.mx_ProfileSettings button
|
||||
),
|
||||
.mx_Dialog input[type="submit"],
|
||||
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
|
||||
.mx_Dialog_buttons input[type="submit"] {
|
||||
|
@ -614,11 +617,17 @@ legend {
|
|||
font-family: inherit;
|
||||
}
|
||||
|
||||
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):last-child {
|
||||
.mx_Dialog
|
||||
button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):not(
|
||||
.mx_ProfileSettings button
|
||||
):last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):focus,
|
||||
.mx_Dialog
|
||||
button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):not(
|
||||
.mx_ProfileSettings button
|
||||
):focus,
|
||||
.mx_Dialog input[type="submit"]:focus,
|
||||
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):focus,
|
||||
.mx_Dialog_buttons input[type="submit"]:focus {
|
||||
|
@ -627,7 +636,8 @@ legend {
|
|||
|
||||
.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:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
|
||||
.mx_Dialog_buttons
|
||||
button.mx_Dialog_primary:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):not(.mx_ProfileSettings button),
|
||||
.mx_Dialog_buttons input[type="submit"].mx_Dialog_primary {
|
||||
color: var(--cpd-color-text-on-solid-primary);
|
||||
background-color: var(--cpd-color-bg-action-primary-rest);
|
||||
|
@ -637,7 +647,8 @@ legend {
|
|||
|
||||
.mx_Dialog button.danger:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]),
|
||||
.mx_Dialog input[type="submit"].danger,
|
||||
.mx_Dialog_buttons button.danger:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
|
||||
.mx_Dialog_buttons
|
||||
button.danger:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):not(.mx_ProfileSettings button),
|
||||
.mx_Dialog_buttons input[type="submit"].danger {
|
||||
background-color: var(--cpd-color-bg-critical-primary);
|
||||
border: solid 1px var(--cpd-color-bg-critical-primary);
|
||||
|
@ -650,7 +661,10 @@ legend {
|
|||
color: var(--cpd-color-text-critical-primary);
|
||||
}
|
||||
|
||||
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):disabled,
|
||||
.mx_Dialog
|
||||
button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):not(
|
||||
.mx_ProfileSettings button
|
||||
):disabled,
|
||||
.mx_Dialog input[type="submit"]:disabled,
|
||||
.mx_Dialog_buttons button:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton):disabled,
|
||||
.mx_Dialog_buttons input[type="submit"]:disabled {
|
||||
|
|
|
@ -337,7 +337,7 @@
|
|||
@import "./views/settings/_Notifications.pcss";
|
||||
@import "./views/settings/_PhoneNumbers.pcss";
|
||||
@import "./views/settings/_PowerLevelSelector.pcss";
|
||||
@import "./views/settings/_ProfileSettings.pcss";
|
||||
@import "./views/settings/_RoomProfileSettings.pcss";
|
||||
@import "./views/settings/_SecureBackupPanel.pcss";
|
||||
@import "./views/settings/_SetIdServer.pcss";
|
||||
@import "./views/settings/_SetIntegrationManager.pcss";
|
||||
|
@ -345,6 +345,7 @@
|
|||
@import "./views/settings/_SpellCheckLanguages.pcss";
|
||||
@import "./views/settings/_ThemeChoicePanel.pcss";
|
||||
@import "./views/settings/_UpdateCheckButton.pcss";
|
||||
@import "./views/settings/_UserProfileSettings.pcss";
|
||||
@import "./views/settings/tabs/_SettingsBanner.pcss";
|
||||
@import "./views/settings/tabs/_SettingsIndent.pcss";
|
||||
@import "./views/settings/tabs/_SettingsSection.pcss";
|
||||
|
|
|
@ -14,6 +14,14 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_SettingsDialog_toastContainer {
|
||||
position: absolute;
|
||||
bottom: var(--cpd-space-10x);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ICONS */
|
||||
/* ========================================================== */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2019, 2020, 2024 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.
|
||||
|
@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_ProfileSettings {
|
||||
.mx_RoomProfileSettings {
|
||||
border-bottom: 1px solid $quinary-content;
|
||||
|
||||
.mx_ProfileSettings_profile {
|
||||
.mx_RoomProfileSettings_profile {
|
||||
display: flex;
|
||||
|
||||
.mx_ProfileSettings_profile_controls {
|
||||
.mx_RoomProfileSettings_profile_controls {
|
||||
flex-grow: 1;
|
||||
margin-inline-end: 54px;
|
||||
|
||||
|
@ -28,7 +28,7 @@ limitations under the License.
|
|||
margin-top: $spacing-8;
|
||||
}
|
||||
|
||||
.mx_ProfileSettings_profile_controls_topic {
|
||||
.mx_RoomProfileSettings_profile_controls_topic {
|
||||
margin-top: $spacing-8;
|
||||
|
||||
& > textarea {
|
||||
|
@ -36,18 +36,18 @@ limitations under the License.
|
|||
resize: vertical;
|
||||
}
|
||||
|
||||
&.mx_ProfileSettings_profile_controls_topic--room textarea {
|
||||
&.mx_RoomProfileSettings_profile_controls_topic--room textarea {
|
||||
min-height: 4em;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_ProfileSettings_profile_controls_userId {
|
||||
.mx_RoomProfileSettings_profile_controls_userId {
|
||||
margin-inline-end: $spacing-20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mx_ProfileSettings_buttons {
|
||||
.mx_RoomProfileSettings_buttons {
|
||||
display: flex;
|
||||
gap: var(--cpd-space-4x);
|
||||
margin-top: 10px; /* 18px is already accounted for by the <p> above the buttons */
|
58
res/css/views/settings/_UserProfileSettings.pcss
Normal file
58
res/css/views/settings/_UserProfileSettings.pcss
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
Copyright 2019, 2020, 2024 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_UserProfileSettings {
|
||||
border-bottom: 1px solid $quinary-content;
|
||||
|
||||
.mx_UserProfileSettings_profile {
|
||||
display: flex;
|
||||
margin-top: var(--cpd-space-6x);
|
||||
gap: 16px;
|
||||
/* This is temporary until the 'Remove' link is replaced by a context menu. */
|
||||
margin-bottom: 20px;
|
||||
|
||||
.mx_UserProfileSettings_profile_displayName {
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_UserProfileSettings_profile_controls {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.mx_UserProfileSettings_profile_controls_userId {
|
||||
width: 100%;
|
||||
.mx_CopyableText {
|
||||
margin-top: var(--cpd-space-1x);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_UserProfileSettings_profile_controls_userId_label {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.mx_UserProfileSettings_profile {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 30px;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue