Remove topic from new room header and expand right panel topic (#12842)
* Remove topic from new Room Header Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Hide topic edit in right panel unless user has permission to edit Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Expand right panel room topic by default Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix text align of topic in right panel Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix topic colour in right panel Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Exclude `Add topic` from text-align Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Don't show `Add topic` if !perms Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
2defb1041e
commit
fae5bf1612
8 changed files with 30 additions and 69 deletions
|
@ -125,7 +125,7 @@ describe("<RoomSummaryCard />", () => {
|
|||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("has button to edit topic when expanded", () => {
|
||||
it("has button to edit topic", () => {
|
||||
room.currentState.setStateEvents([
|
||||
new MatrixEvent({
|
||||
type: "m.room.topic",
|
||||
|
@ -138,7 +138,6 @@ describe("<RoomSummaryCard />", () => {
|
|||
}),
|
||||
]);
|
||||
const { container, getByText } = getComponent();
|
||||
fireEvent.click(screen.getByText("This is the room's topic."));
|
||||
expect(getByText("Edit")).toBeInTheDocument();
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue