matrix-react-sdk
matrix-react-sdk copied to clipboard
Hide the "Message" button in the sidebar if the CreateRooms components should not be shown
When using ComponentVisibilityCustomisations
to hide certain features from the UI, the "Message" link in the people section of a room is still visible and leads to an error, if the room creation is disabled in the homeserver.
Before:
![]() |
![]() |
After:
Checklist
- [ ] Tests written for new code (and old code if feasible)
- [x] Linter and other CI checks pass
- [x] Sign-off given on the changes (see CONTRIBUTING.md)
Here's what your changelog entry will look like:
✨ Features
- Hide the "Message" button in the sidebar if the CreateRooms components should not be shown (#9271). Contributed by @dhenneke.
I could try to write a unit test tomorrow.
I could try to write a unit test tomorrow.
Absolutely awesome! Take the time you need and in case you need anything, be sure to visit https://matrix.to/#/#element-dev:matrix.org
I added additional test for the component. I never worked with enzyme
before and was surprised that it was used in this file while other components seem to use @testing-library/react
which I'm more familiar with. But I hope it's correct in this way.
@dhenneke enzyme is considered deprecated here, please use RTL instead. Enzyme is blocking our React 18 upgrade
Hey - apologies for this dropping off our radar. This looks fine now though. I'm assuming we don't have write permission to the fork: could you pull in the changes from develop so all the tests run?
Neither do I... Maybe @maheichyk could help out?
Hey - apologies for this dropping off our radar. This looks fine now though. I'm assuming we don't have write permission to the fork: could you pull in the changes from develop so all the tests run?
@dbkr branch is updated. Could you please have a look and merge if fine?