Remove "Add Space" button in RoomListHeader when user cannot createSpaces#9002
Remove "Add Space" button in RoomListHeader when user cannot createSpaces#9002estellecomment wants to merge 15 commits into
Conversation
|
@weeman1337 who follows this issue 👋 |
weeman1337
left a comment
There was a problem hiding this comment.
It would be good to have a test covering the changes.
There is already a RoomListHeader test that can be extended: https://github.com/matrix-org/matrix-react-sdk/blob/develop/test/components/views/rooms/RoomListHeader-test.tsx
If you need help on this just send me a message.
|
@weeman1337 Done with tests, ready for re-review ! |
a7da141 to
f0c5159
Compare
robintown
left a comment
There was a problem hiding this comment.
Thanks for following through with the tests, this looks really good! My comments are mostly just about types, and places where we have a more modern way of doing things.
eb4d917 to
ffc0ea9
Compare
robintown
left a comment
There was a problem hiding this comment.
The loading-test suite appears to be failing
e8d9182 to
533fb31
Compare
This is now fixed |
|
Great, could you please merge develop to restart CI? |
|
Also, for future reference, please don't force push to a branch after it's been reviewed, as that makes it more difficult to tell what changes were reviewed and which weren't. |
…ove-add-space-button
robintown
left a comment
There was a problem hiding this comment.
We're still trying to get our CI to work but everything looks good to go in theory
|
Our CI is currently unable to test this change, as it's matching with a branch of the same name in the Tchap element-web fork which disables space creation entirely. @estellecomment or @mcalinghee, you'll need to rename either this branch or the element-web branch in your forks, so that they no longer get matched. |
|
Thanks for updating everything 👍 I will trigger the builds again. |
Thanks a lot, this is now done |
|
One of our CI checks wasn't able to run because of this PR being a month old, so I've opened a new PR with the same changes. |
Pull request was closed
Problem description :
When using ComponentVilisbility to disable UIComponent.CreateSpaces, buttons for creating spaces should be hidden.
But there is one that is still displayed, in RoomListHeader, for creating a subspace :

This is incoherent with SpaceContextMenu, where you can also create a subspace, which does hide the button (as expected) :

Expected : the button for adding subspaces is hidden everywhere.
Obtained : one button for adding subspaces is hidden (in SpaceContextMenu), the other is shown (in RoomListHeader).
Proposed fix : hide the button for adding subspaces in RoomListHeader. Reuse similar code as SpaceContextMenu to harmonize.
Notes for reviewers : in order to see the fix in element-web, you need to use ComponentVisibility to get
shouldShowComponent(UIComponent.CreateSpaces) == false.Example PR to do this, in a fork of element-web : https://github.com/tchapgouv/element-web/pull/2/files
Signed-off-by: Estelle Comment estelle.comment@gmail.com
Here's what your changelog entry will look like:
✨ Features