diff --git a/cypress/e2e/settings/general-user-settings-tab.spec.ts b/cypress/e2e/settings/general-user-settings-tab.spec.ts index 2bdfb1b77d..96cf9ad184 100644 --- a/cypress/e2e/settings/general-user-settings-tab.spec.ts +++ b/cypress/e2e/settings/general-user-settings-tab.spec.ts @@ -83,12 +83,12 @@ describe("General user settings tab", () => { }); // Wait until spinners disappear - cy.get(".mx_GeneralUserSettingsTab_accountSection .mx_Spinner").should("not.exist"); - cy.get(".mx_GeneralUserSettingsTab_discovery .mx_Spinner").should("not.exist"); + cy.get(".mx_GeneralUserSettingsTab_section--account .mx_Spinner").should("not.exist"); + cy.get(".mx_GeneralUserSettingsTab_section--discovery .mx_Spinner").should("not.exist"); - cy.get(".mx_GeneralUserSettingsTab_accountSection").within(() => { + cy.get(".mx_GeneralUserSettingsTab_section--account").within(() => { // Assert that input areas for changing a password exists - cy.get("form.mx_GeneralUserSettingsTab_changePassword") + cy.get("form.mx_GeneralUserSettingsTab_section--account_changePassword") .scrollIntoView() .within(() => { cy.findByLabelText("Current password").should("be.visible"); @@ -120,7 +120,7 @@ describe("General user settings tab", () => { }); // Check language and region setting dropdown - cy.get(".mx_GeneralUserSettingsTab_languageInput") + cy.get(".mx_GeneralUserSettingsTab_section_languageInput") .scrollIntoView() .within(() => { // Check the default value diff --git a/res/css/views/settings/_PhoneNumbers.pcss b/res/css/views/settings/_PhoneNumbers.pcss index c0ad9d7a2f..a2e2021108 100644 --- a/res/css/views/settings/_PhoneNumbers.pcss +++ b/res/css/views/settings/_PhoneNumbers.pcss @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_GeneralUserSettingsTab_discovery_existing_verification { +.mx_GeneralUserSettingsTab_section--discovery_existing_verification { display: inline-flex; align-items: center; diff --git a/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.pcss b/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.pcss index 89015df3b6..eed53cb6b9 100644 --- a/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.pcss +++ b/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.pcss @@ -14,54 +14,58 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_GeneralUserSettingsTab_changePassword .mx_Field { - margin-inline-end: var(--SettingsTab_fullWidthField-margin-inline-end); -} +.mx_GeneralUserSettingsTab_section--account_changePassword { + .mx_Field { + margin-inline-end: var(--SettingsTab_fullWidthField-margin-inline-end); -.mx_GeneralUserSettingsTab_changePassword .mx_Field:first-child { - margin-top: 0; + &:first-child { + margin-top: 0; + } + } } /* TODO: Make this selector less painful */ -.mx_GeneralUserSettingsTab_accountSection .mx_SettingsTab_subheading:nth-child(n + 1), -.mx_GeneralUserSettingsTab_discovery .mx_SettingsTab_subheading:nth-child(n + 2), +.mx_GeneralUserSettingsTab_section--account .mx_SettingsTab_subheading:nth-child(n + 1), +.mx_GeneralUserSettingsTab_section--discovery .mx_SettingsTab_subheading:nth-child(n + 2), .mx_SetIdServer .mx_SettingsTab_subheading { margin-top: 24px; } -.mx_GeneralUserSettingsTab_accountSection .mx_Spinner, -.mx_GeneralUserSettingsTab_discovery .mx_Spinner { - /* Move the spinner to the left side of the container (default center) */ - justify-content: left; +.mx_GeneralUserSettingsTab_section--account, +.mx_GeneralUserSettingsTab_section--discovery { + .mx_Spinner { + /* Move the spinner to the left side of the container (default center) */ + justify-content: flex-start; + } } -.mx_GeneralUserSettingsTab_accountSection .mx_EmailAddresses, -.mx_GeneralUserSettingsTab_accountSection .mx_PhoneNumbers, -.mx_GeneralUserSettingsTab_discovery .mx_GeneralUserSettingsTab_discovery_existing, -.mx_GeneralUserSettingsTab_languageInput { +.mx_GeneralUserSettingsTab_section--account .mx_EmailAddresses, +.mx_GeneralUserSettingsTab_section--account .mx_PhoneNumbers, +.mx_GeneralUserSettingsTab_section--discovery .mx_GeneralUserSettingsTab_section--discovery_existing, +.mx_GeneralUserSettingsTab_section_languageInput { margin-inline-end: var(--SettingsTab_fullWidthField-margin-inline-end); } -.mx_GeneralUserSettingsTab_discovery_existing { +.mx_GeneralUserSettingsTab_section--discovery_existing { display: flex; align-items: center; margin-bottom: 5px; } -.mx_GeneralUserSettingsTab_discovery_existing_address, -.mx_GeneralUserSettingsTab_discovery_existing_promptText { +.mx_GeneralUserSettingsTab_section--discovery_existing_address, +.mx_GeneralUserSettingsTab_section--discovery_existing_promptText { flex: 1; margin-right: 10px; } -.mx_GeneralUserSettingsTab_discovery_existing_button { +.mx_GeneralUserSettingsTab_section--discovery_existing_button { margin-left: 5px; } -.mx_GeneralUserSettingsTab_warningIcon { - vertical-align: middle; -} - -.mx_SettingsTab_section_spellcheck .mx_ToggleSwitch { +.mx_GeneralUserSettingsTab_section--spellcheck .mx_ToggleSwitch { float: right; } + +.mx_GeneralUserSettingsTab_heading_warningIcon { + vertical-align: middle; +} diff --git a/src/components/views/settings/account/EmailAddresses.tsx b/src/components/views/settings/account/EmailAddresses.tsx index 3d72becf33..e407170116 100644 --- a/src/components/views/settings/account/EmailAddresses.tsx +++ b/src/components/views/settings/account/EmailAddresses.tsx @@ -94,21 +94,21 @@ export class ExistingEmailAddress extends React.Component - +
+ {_t("Remove %(email)s?", { email: this.props.email.address })} {_t("Remove")} {_t("Cancel")} @@ -117,8 +117,10 @@ export class ExistingEmailAddress extends React.Component - {this.props.email.address} +
+ + {this.props.email.address} + {_t("Remove")} diff --git a/src/components/views/settings/account/PhoneNumbers.tsx b/src/components/views/settings/account/PhoneNumbers.tsx index 212148be6e..3d9f070973 100644 --- a/src/components/views/settings/account/PhoneNumbers.tsx +++ b/src/components/views/settings/account/PhoneNumbers.tsx @@ -89,21 +89,21 @@ export class ExistingPhoneNumber extends React.Component - +
+ {_t("Remove %(phone)s?", { phone: this.props.msisdn.address })} {_t("Remove")} {_t("Cancel")} @@ -112,8 +112,8 @@ export class ExistingPhoneNumber extends React.Component - +
+ +{this.props.msisdn.address} diff --git a/src/components/views/settings/discovery/EmailAddresses.tsx b/src/components/views/settings/discovery/EmailAddresses.tsx index 8bc13bf187..3a34156083 100644 --- a/src/components/views/settings/discovery/EmailAddresses.tsx +++ b/src/components/views/settings/discovery/EmailAddresses.tsx @@ -217,7 +217,7 @@ export class EmailAddress extends React.Component {_t("Verify the link in your inbox")} @@ -239,7 +239,7 @@ export class EmailAddress extends React.Component @@ -249,8 +249,8 @@ export class EmailAddress extends React.Component - {address} +
+ {address} {status}
); diff --git a/src/components/views/settings/discovery/PhoneNumbers.tsx b/src/components/views/settings/discovery/PhoneNumbers.tsx index 7c61db8cd3..29e5184301 100644 --- a/src/components/views/settings/discovery/PhoneNumbers.tsx +++ b/src/components/views/settings/discovery/PhoneNumbers.tsx @@ -222,7 +222,7 @@ export class PhoneNumber extends React.Component + {_t("Please enter verification code sent via text.")}
@@ -243,7 +243,7 @@ export class PhoneNumber extends React.Component @@ -253,7 +253,7 @@ export class PhoneNumber extends React.Component @@ -263,8 +263,8 @@ export class PhoneNumber extends React.Component - +{address} +
+ +{address} {status}
); diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx index 7b10119705..d0bbb86b51 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx @@ -324,7 +324,7 @@ export default class GeneralUserSettingsTab extends React.Component +
{_t("Account")} {externalAccountManagement}

{passwordChangeText}

@@ -417,7 +417,7 @@ export default class GeneralUserSettingsTab extends React.Component {_t("Language and region")} @@ -427,7 +427,7 @@ export default class GeneralUserSettingsTab extends React.Component +
{_t("Spell check")} @@ -471,17 +471,17 @@ export default class GeneralUserSettingsTab extends React.Component : ; const threepidSection = this.state.haveIdServer ? ( -
+ <> {_t("Email addresses")} {emails} {_t("Phone numbers")} {msisdns} -
+ ) : null; return ( -
+
{threepidSection} {/* has its own heading as it includes the current identity server */} @@ -521,7 +521,7 @@ export default class GeneralUserSettingsTab extends React.Component