Compound Typography pass (#11103)
* Integrate compound design tokens The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here * Delete unused or incorrect - sass variables * Typography pass * Deprecate _font-weights.pcss and use Compound instead * lint fix * Fix snapshot * Fix typography pass feedback * Remove unwanted e2e test cypress tests should test functionality not visual output. And we should not test visual output by inspecting CSS properties * lintfix * Migration script for baseFontSize * Updates after design review * Update font scaling panel to use min/max size * Fix custom font * Fix font slider e2e test * Update custom font * Update new baseFontSizeV2 * Disambiguate heading props * Fix appearance test * change max font size * fix e2ee test * fix tests * test baseFontSize migration code * typescript strict * Migrate baseFontSize account setting * Change assertion for font size * Fix font size controller test
This commit is contained in:
parent
ce479c5774
commit
9c7d935aae
199 changed files with 606 additions and 608 deletions
|
@ -18,7 +18,7 @@ exports[`<ChangelogDialog /> should fetch github proxy url for each repo with ol
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Changelog
|
||||
|
|
|
@ -17,7 +17,7 @@ exports[`DevtoolsDialog renders the devtools dialog 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Developer Tools
|
||||
|
|
|
@ -12,7 +12,7 @@ exports[`<ExportDialog /> renders export dialog 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Export Chat
|
||||
|
|
|
@ -18,7 +18,7 @@ exports[`FeedbackDialog should respect feedback config 1`] = `
|
|||
class="mx_Dialog_header"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Feedback
|
||||
|
|
|
@ -18,7 +18,7 @@ exports[`ManualDeviceKeyVerificationDialog should display the device 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Verify session
|
||||
|
@ -133,7 +133,7 @@ exports[`ManualDeviceKeyVerificationDialog should display the device of another
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Verify session
|
||||
|
|
|
@ -17,7 +17,7 @@ exports[`<MessageEditHistory /> should match the snapshot 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Message edits
|
||||
|
@ -133,7 +133,7 @@ exports[`<MessageEditHistory /> should support events with 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Message edits
|
||||
|
|
|
@ -18,7 +18,7 @@ exports[`<ServerPickerDialog /> should render dialog 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Sign into your homeserver
|
||||
|
|
|
@ -17,7 +17,7 @@ exports[`CreateKeyBackupDialog should display the error message when backup crea
|
|||
class="mx_Dialog_header"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Starting backup…
|
||||
|
@ -77,7 +77,7 @@ exports[`CreateKeyBackupDialog should display the spinner when creating backup 1
|
|||
class="mx_Dialog_header"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Starting backup…
|
||||
|
@ -124,7 +124,7 @@ exports[`CreateKeyBackupDialog should display the success dialog when the key ba
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Success!
|
||||
|
|
|
@ -17,7 +17,7 @@ exports[`ImportE2eKeysDialog renders 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Import room keys
|
||||
|
|
|
@ -43,10 +43,10 @@ describe("FontScalingPanel", () => {
|
|||
await waitFor(() => {
|
||||
expect(container.querySelector("input[checked]")).toBeDefined();
|
||||
});
|
||||
fireEvent.change(container.querySelector("#font_size_field")!, { target: { value: "20" } });
|
||||
fireEvent.change(container.querySelector("#font_size_field")!, { target: { value: "25" } });
|
||||
fireEvent.click(getByText("Use custom size"));
|
||||
await waitFor(() => {
|
||||
expect(container.querySelector("#font_size_field")).toHaveValue(18);
|
||||
expect(container.querySelector("#font_size_field")).toHaveValue(21);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@ exports[`FontScalingPanel renders the font scaling UI 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Font size
|
||||
</h3>
|
||||
|
@ -47,20 +47,20 @@ exports[`FontScalingPanel renders the font scaling UI 1`] = `
|
|||
<input
|
||||
aria-label="Font size"
|
||||
autocomplete="off"
|
||||
max="18"
|
||||
min="13"
|
||||
max="21"
|
||||
min="11"
|
||||
step="1"
|
||||
type="range"
|
||||
value="15"
|
||||
value="16"
|
||||
/>
|
||||
<output
|
||||
class="mx_Slider_selection"
|
||||
style="left: calc(2px + 40% + 1.2em - 0.96em);"
|
||||
style="left: calc(2px + 50% + 1.2em - 1.2em);"
|
||||
>
|
||||
<span
|
||||
class="mx_Slider_selection_label"
|
||||
>
|
||||
15
|
||||
16
|
||||
</span>
|
||||
</output>
|
||||
</div>
|
||||
|
@ -100,9 +100,9 @@ exports[`FontScalingPanel renders the font scaling UI 1`] = `
|
|||
disabled=""
|
||||
id="font_size_field"
|
||||
label="Font size"
|
||||
placeholder="15"
|
||||
placeholder="16"
|
||||
type="number"
|
||||
value="15"
|
||||
value="16"
|
||||
/>
|
||||
<label
|
||||
for="font_size_field"
|
||||
|
|
|
@ -10,7 +10,7 @@ exports[`ThemeChoicePanel renders the theme choice UI 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Theme
|
||||
</h3>
|
||||
|
|
|
@ -131,7 +131,7 @@ exports[`<CurrentDeviceSection /> handles when device is falsy 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Current session
|
||||
</h3>
|
||||
|
@ -167,7 +167,7 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Current session
|
||||
</h3>
|
||||
|
@ -310,7 +310,7 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Current session
|
||||
</h3>
|
||||
|
|
|
@ -17,7 +17,7 @@ exports[`<LoginWithQRSection /> should render panel MSC3882 + MSC3886 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Sign in with QR code
|
||||
</h3>
|
||||
|
@ -55,7 +55,7 @@ exports[`<LoginWithQRSection /> should render panel MSC3882 r1 + MSC3886 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Sign in with QR code
|
||||
</h3>
|
||||
|
|
|
@ -10,7 +10,7 @@ exports[`<SecurityRecommendations /> renders both cards when user has both unver
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Security recommendations
|
||||
</h3>
|
||||
|
@ -135,7 +135,7 @@ exports[`<SecurityRecommendations /> renders inactive devices section when user
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Security recommendations
|
||||
</h3>
|
||||
|
@ -260,7 +260,7 @@ exports[`<SecurityRecommendations /> renders unverified devices section when use
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Security recommendations
|
||||
</h3>
|
||||
|
|
|
@ -9,7 +9,7 @@ exports[`<EmailAddresses /> should handle no email addresses 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Email addresses
|
||||
</h3>
|
||||
|
@ -36,7 +36,7 @@ exports[`<EmailAddresses /> should render a loader while loading 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Email addresses
|
||||
</h3>
|
||||
|
@ -67,7 +67,7 @@ exports[`<EmailAddresses /> should render email addresses 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Email addresses
|
||||
</h3>
|
||||
|
|
|
@ -10,7 +10,7 @@ exports[`<PhoneNumbers /> should handle no numbers 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Phone numbers
|
||||
</h3>
|
||||
|
@ -38,7 +38,7 @@ exports[`<PhoneNumbers /> should render a loader while loading 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Phone numbers
|
||||
</h3>
|
||||
|
@ -70,7 +70,7 @@ exports[`<PhoneNumbers /> should render phone numbers 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Phone numbers
|
||||
</h3>
|
||||
|
|
|
@ -9,7 +9,7 @@ exports[`<SettingsSubsection /> renders with plain text description 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Test
|
||||
</h3>
|
||||
|
@ -43,7 +43,7 @@ exports[`<SettingsSubsection /> renders with plain text heading 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Test
|
||||
</h3>
|
||||
|
@ -68,7 +68,7 @@ exports[`<SettingsSubsection /> renders with react element description 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Test
|
||||
</h3>
|
||||
|
@ -128,7 +128,7 @@ exports[`<SettingsSubsection /> renders without description 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Test
|
||||
</h3>
|
||||
|
|
|
@ -7,7 +7,7 @@ exports[`<SettingsSubsectionHeading /> renders with children 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
test
|
||||
</h3>
|
||||
|
@ -28,7 +28,7 @@ exports[`<SettingsSubsectionHeading /> renders without children 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
test
|
||||
</h3>
|
||||
|
|
|
@ -26,7 +26,7 @@ exports[`AdvancedRoomSettingsTab should render as expected 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Room information
|
||||
</h3>
|
||||
|
@ -59,7 +59,7 @@ exports[`AdvancedRoomSettingsTab should render as expected 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Room version
|
||||
</h3>
|
||||
|
|
|
@ -122,7 +122,7 @@ exports[`<SecurityRoomSettingsTab /> join rule handles error when updating join
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Failed to update the join rules
|
||||
|
@ -164,7 +164,7 @@ exports[`<SecurityRoomSettingsTab /> join rule warns when trying to make an encr
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Are you sure you want to make this encrypted room public?
|
||||
|
|
|
@ -33,7 +33,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Theme
|
||||
</h3>
|
||||
|
@ -99,7 +99,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Message layout
|
||||
</h3>
|
||||
|
@ -239,7 +239,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Font size
|
||||
</h3>
|
||||
|
@ -276,20 +276,20 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
<input
|
||||
aria-label="Font size"
|
||||
autocomplete="off"
|
||||
max="18"
|
||||
min="13"
|
||||
max="21"
|
||||
min="11"
|
||||
step="1"
|
||||
type="range"
|
||||
value="15"
|
||||
value="16"
|
||||
/>
|
||||
<output
|
||||
class="mx_Slider_selection"
|
||||
style="left: calc(2px + 40% + 1.2em - 0.96em);"
|
||||
style="left: calc(2px + 50% + 1.2em - 1.2em);"
|
||||
>
|
||||
<span
|
||||
class="mx_Slider_selection_label"
|
||||
>
|
||||
15
|
||||
16
|
||||
</span>
|
||||
</output>
|
||||
</div>
|
||||
|
@ -329,9 +329,9 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
disabled=""
|
||||
id="font_size_field"
|
||||
label="Font size"
|
||||
placeholder="15"
|
||||
placeholder="16"
|
||||
type="number"
|
||||
value="15"
|
||||
value="16"
|
||||
/>
|
||||
<label
|
||||
for="font_size_field"
|
||||
|
@ -364,7 +364,7 @@ exports[`AppearanceUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Image size in the timeline
|
||||
</h3>
|
||||
|
|
|
@ -75,7 +75,7 @@ exports[`<GeneralUserSettingsTab /> deactive account should render section when
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Account management
|
||||
</h3>
|
||||
|
|
|
@ -26,7 +26,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Composer
|
||||
</h3>
|
||||
|
@ -387,7 +387,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Calls
|
||||
</h3>
|
||||
|
@ -448,7 +448,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Room
|
||||
</h3>
|
||||
|
@ -617,7 +617,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Room List
|
||||
</h3>
|
||||
|
@ -708,7 +708,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Accessibility
|
||||
</h3>
|
||||
|
@ -757,7 +757,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Navigation
|
||||
</h3>
|
||||
|
@ -1002,7 +1002,7 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Autocomplete
|
||||
</h3>
|
||||
|
|
|
@ -47,7 +47,7 @@ exports[`<MjolnirUserSettingsTab /> renders correctly when user has no ignored u
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Personal ban list
|
||||
</h3>
|
||||
|
@ -104,7 +104,7 @@ exports[`<MjolnirUserSettingsTab /> renders correctly when user has no ignored u
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Subscribed lists
|
||||
</h3>
|
||||
|
|
|
@ -27,7 +27,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Room list
|
||||
</h3>
|
||||
|
@ -69,7 +69,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Spaces
|
||||
</h3>
|
||||
|
@ -116,7 +116,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Keyboard shortcuts
|
||||
</h3>
|
||||
|
@ -177,7 +177,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Displaying time
|
||||
</h3>
|
||||
|
@ -244,7 +244,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Presence
|
||||
</h3>
|
||||
|
@ -320,7 +320,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Composer
|
||||
</h3>
|
||||
|
@ -523,7 +523,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Code blocks
|
||||
</h3>
|
||||
|
@ -615,7 +615,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Images, GIFs and videos
|
||||
</h3>
|
||||
|
@ -732,7 +732,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Timeline
|
||||
</h3>
|
||||
|
@ -1024,7 +1024,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Room directory
|
||||
</h3>
|
||||
|
@ -1066,7 +1066,7 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
General
|
||||
</h3>
|
||||
|
|
|
@ -26,7 +26,7 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Secure Backup
|
||||
</h3>
|
||||
|
@ -109,7 +109,7 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Message search
|
||||
</h3>
|
||||
|
@ -145,7 +145,7 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Cross-signing
|
||||
</h3>
|
||||
|
@ -242,7 +242,7 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Cryptography
|
||||
</h3>
|
||||
|
@ -329,7 +329,7 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Ignored users
|
||||
</h3>
|
||||
|
@ -351,7 +351,7 @@ exports[`<SecurityUserSettingsTab /> renders security section 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Encryption
|
||||
</h3>
|
||||
|
|
|
@ -62,7 +62,7 @@ exports[`<SessionManagerTab /> current session section renders current session s
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Current session
|
||||
</h3>
|
||||
|
@ -191,7 +191,7 @@ exports[`<SessionManagerTab /> current session section renders current session s
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Current session
|
||||
</h3>
|
||||
|
|
|
@ -26,7 +26,7 @@ exports[`<SidebarUserSettingsTab /> renders sidebar settings 1`] = `
|
|||
class="mx_SettingsSubsectionHeading"
|
||||
>
|
||||
<h3
|
||||
class="mx_Heading_h3 mx_SettingsSubsectionHeading_heading"
|
||||
class="mx_Heading_h4 mx_SettingsSubsectionHeading_heading"
|
||||
>
|
||||
Spaces to show
|
||||
</h3>
|
||||
|
|
|
@ -18,7 +18,7 @@ exports[`<AddExistingToSpaceDialog /> looks as expected 1`] = `
|
|||
class="mx_Dialog_header mx_Dialog_headerWithCancel"
|
||||
>
|
||||
<h2
|
||||
class="mx_Heading_h2 mx_Dialog_title"
|
||||
class="mx_Heading_h4 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
<div
|
||||
|
|
|
@ -20,7 +20,7 @@ import React from "react";
|
|||
import Heading from "../../../../src/components/views/typography/Heading";
|
||||
describe("<Heading />", () => {
|
||||
const defaultProps = {
|
||||
"size": "h1",
|
||||
"size": "1",
|
||||
"children": <div>test</div>,
|
||||
"data-testid": "test",
|
||||
"className": "test",
|
||||
|
@ -30,16 +30,20 @@ describe("<Heading />", () => {
|
|||
};
|
||||
|
||||
it("renders h1 with correct attributes", () => {
|
||||
expect(getComponent({ size: "h1" }).asFragment()).toMatchSnapshot();
|
||||
expect(getComponent({ size: "1" }).asFragment()).toMatchSnapshot();
|
||||
});
|
||||
it("renders h2 with correct attributes", () => {
|
||||
expect(getComponent({ size: "h2" }).asFragment()).toMatchSnapshot();
|
||||
expect(getComponent({ size: "2" }).asFragment()).toMatchSnapshot();
|
||||
});
|
||||
it("renders h3 with correct attributes", () => {
|
||||
expect(getComponent({ size: "h3" }).asFragment()).toMatchSnapshot();
|
||||
expect(getComponent({ size: "3" }).asFragment()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("renders h4 with correct attributes", () => {
|
||||
expect(getComponent({ size: "h4" }).asFragment()).toMatchSnapshot();
|
||||
expect(getComponent({ size: "4" }).asFragment()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("can have different appearance to its heading level", () => {
|
||||
expect(getComponent({ size: "4", as: "h1" }).asFragment()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Heading /> can have different appearance to its heading level 1`] = `
|
||||
<DocumentFragment>
|
||||
<h1
|
||||
class="mx_Heading_h4 test"
|
||||
data-testid="test"
|
||||
>
|
||||
<div>
|
||||
test
|
||||
</div>
|
||||
</h1>
|
||||
</DocumentFragment>
|
||||
`;
|
||||
|
||||
exports[`<Heading /> renders h1 with correct attributes 1`] = `
|
||||
<DocumentFragment>
|
||||
<h1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue