mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 12:54:39 +00:00
refactor(profile): drop extended-profile editing, keep right-panel display
Extended-profile fields (io.element.profile.*) are no longer edited in the client, so remove the edit form and the dead code that came with it, keeping only the read-only right-panel display (UserExtendedProfileInfo). - Remove ExtendedProfileSettings (edit form) + its Settings integration and CSS - Remove ExtendedProfileView (never-rendered, dead) + its CSS - Inline the EXT_PROFILE_KEY_* constants into UserExtendedProfileInfo so it no longer depends on the deleted settings component - Drop now-unused set/deleteExtendedProfileProperty from UserProfilesStore - Prune dead settings|extended_profile_settings|* i18n keys (and the unused user_info.extended_profile header/not_provided keys) across all locales - Regenerate _components.pcss - Revert UserProfileSettings/AccountUserSettingsTab tests (+snapshot) to master, since their adaptations existed only for the removed edit form
This commit is contained in:
@@ -18,7 +18,6 @@ import { mkStubRoom, stubClient } from "../../../../test-utils";
|
||||
import { ToastContext, type ToastRack } from "../../../../../src/contexts/ToastContext";
|
||||
import { OwnProfileStore } from "../../../../../src/stores/OwnProfileStore";
|
||||
import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext";
|
||||
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
|
||||
import Modal from "../../../../../src/Modal";
|
||||
|
||||
interface MockedAvatarSettingProps {
|
||||
@@ -87,9 +86,6 @@ describe("ProfileSettings", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
client = stubClient();
|
||||
// HealthChat's ExtendedProfileSettings reads the global SdkContextClass.instance.userProfilesStore,
|
||||
// which requires the singleton client to be set (it is, on login, in the real app).
|
||||
SdkContextClass.instance.client = client;
|
||||
toastRack = {
|
||||
displayToast: jest.fn().mockReturnValue(jest.fn()),
|
||||
};
|
||||
|
||||
-3
@@ -85,9 +85,6 @@ describe("<AccountUserSettingsTab />", () => {
|
||||
|
||||
stores = new SdkContextClass();
|
||||
stores.client = mockClient;
|
||||
// HealthChat's ExtendedProfileSettings (mounted via UserProfileSettings) reads the global
|
||||
// SdkContextClass.instance.userProfilesStore, which requires the singleton client to be set.
|
||||
SdkContextClass.instance.client = mockClient;
|
||||
// stub out this store completely to avoid mocking initialisation
|
||||
const mockOidcClientStore = {} as unknown as OidcClientStore;
|
||||
jest.spyOn(stores, "oidcClientStore", "get").mockReturnValue(mockOidcClientStore);
|
||||
|
||||
+4
-4
@@ -42,14 +42,14 @@ exports[`<AccountUserSettingsTab /> 3pids should display 3pid email addresses an
|
||||
>
|
||||
<input
|
||||
autocomplete="email"
|
||||
id="mx_Field_113"
|
||||
id="mx_Field_3"
|
||||
label="Email Address"
|
||||
placeholder="Email Address"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
<label
|
||||
for="mx_Field_113"
|
||||
for="mx_Field_3"
|
||||
>
|
||||
Email Address
|
||||
</label>
|
||||
@@ -154,14 +154,14 @@ exports[`<AccountUserSettingsTab /> 3pids should display 3pid email addresses an
|
||||
</span>
|
||||
<input
|
||||
autocomplete="tel-national"
|
||||
id="mx_Field_114"
|
||||
id="mx_Field_4"
|
||||
label="Phone Number"
|
||||
placeholder="Phone Number"
|
||||
type="text"
|
||||
value=""
|
||||
/>
|
||||
<label
|
||||
for="mx_Field_114"
|
||||
for="mx_Field_4"
|
||||
>
|
||||
Phone Number
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user