Skip to content

Conversation

@Half-Shot
Copy link
Member

@Half-Shot Half-Shot commented Dec 11, 2025

Refactoring the room status bar into a proper shared-component / MVVM thing work will be used to eventually start rendering safety errors for MSC4387.

This also changes the styling of quite a few of our room status banners into proper Compound ones, utilising the Banner.

See snapshots for changes

import { MatrixClientPeg } from "../../src/MatrixClientPeg";
import { mkThread } from "../test-utils/threads";

describe("getUnsentMessages", () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a copy paste of the tests to match the move of getUnsentMessages to the other file.

describe("computed attributes", () => {
beforeEach(() => {
jest.spyOn(RoomStatusBarModule, "getUnsentMessages").mockReturnValue([]);
jest.spyOn(room, "getPendingEvents").mockReturnValue([]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spying on the whole module was unnessacery when the influencing factor of getUnsentMessages was mostly whether getPendingEvents had any events.

It also broke due to the fragility mocking whole imports, so I've converted it to a much more stable mock.

Copy link
Member

@amshakal amshakal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Half-Shot Half-Shot removed the X-Needs-Product More input needed from the Product team label Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants