Deprecate mx_RightPanel_headerButton class (#10821)

* Replace: %s/mx_RightPanel_headerButton/mx_RoomHeader_button/g

* Conform the selectors to our naming policy: with flag (--)

- %s/mx_RoomHeader_button_highlight/mx_RoomHeader_button--highlight/g
- %s/mx_RoomHeader_button_unread/mx_RoomHeader_button--unread/g

* Update a Jest snapshot

* Move the declarations and Sass variables

- Move Sass variables to the place where they are used
This commit is contained in:
Suguru Hirahara 2023-05-16 15:42:58 +00:00 committed by GitHub
parent 6f1020bb92
commit e01d47923d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 61 additions and 101 deletions

View file

@ -75,10 +75,10 @@ describe("RoomHeaderButtons-test.tsx", function () {
it("thread notification does change the thread button", () => {
const { container } = getComponent(room);
expect(getThreadButton(container)!.className.includes("mx_RightPanel_headerButton_unread")).toBeFalsy();
expect(getThreadButton(container)!.className.includes("mx_RoomHeader_button--unread")).toBeFalsy();
room.setThreadUnreadNotificationCount("$123", NotificationCountType.Total, 1);
expect(getThreadButton(container)!.className.includes("mx_RightPanel_headerButton_unread")).toBeTruthy();
expect(getThreadButton(container)!.className.includes("mx_RoomHeader_button--unread")).toBeTruthy();
expect(isIndicatorOfType(container, "gray")).toBe(true);
room.setThreadUnreadNotificationCount("$123", NotificationCountType.Highlight, 1);

View file

@ -5,14 +5,14 @@ exports[`RoomHeaderButtons-test.tsx should render 1`] = `
<div
aria-current="false"
aria-label="Chat"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_timelineCardButton"
class="mx_AccessibleButton mx_RoomHeader_button mx_RightPanel_timelineCardButton"
role="button"
tabindex="0"
/>
<div
aria-current="false"
aria-label="Threads"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_threadsButton"
class="mx_AccessibleButton mx_RoomHeader_button mx_RightPanel_threadsButton"
data-testid="threadsButton"
role="button"
tabindex="0"
@ -20,14 +20,14 @@ exports[`RoomHeaderButtons-test.tsx should render 1`] = `
<div
aria-current="false"
aria-label="Notifications"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_notifsButton"
class="mx_AccessibleButton mx_RoomHeader_button mx_RightPanel_notifsButton"
role="button"
tabindex="0"
/>
<div
aria-current="false"
aria-label="Room info"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_roomSummaryButton"
class="mx_AccessibleButton mx_RoomHeader_button mx_RightPanel_roomSummaryButton"
role="button"
tabindex="0"
/>