-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
111 - rm spaces option if spaces creation is disabled #161
Conversation
}; | ||
|
||
/** | ||
* TCHAP : disable space-related options if create space feature is not enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, we are losing future evolutions of element's JoinRuleSettings.tsx... 🤔 Maybe @jdauphant 's idea of using CSS to hide things would be easier to maintain...
But this works and moves forward. We can try the CSS way in another PR.
The e2e test is the same in both cases (yay e2e test !)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other idea : instead of customisations.json, use patch-package to add the if
into element's JoinRuleSettings.tsx.
It would not be too hard to maintain : at each upgrade of react-sdk, yarn install
triggers a patch-package warning, like "the patch was made for vX.X.X and you are now at v.Y.Y.Y, no garantees". And if the change is too great, the patching breaks and yarn install fails.
And the e2e test is STILL the same !
/** | ||
* TCHAP : disable space-related options if create space feature is not enabled | ||
*/ | ||
if (ComponentVisibilityCustomisations.shouldShowComponent(UIComponent.CreateSpaces)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we could contribute this to element-web, but it makes sense only for a project without spaces, which element doesn't allow.
(in the element-web situation, if spaces creation is disabled, the user can still have spaces, and chose the visibility of the room in these spaces.)
Duplicate of #166 |
For all 3 types of room :
Before :
After :
Checklist