Skip to content
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

Closed
wants to merge 6 commits into from

Conversation

odelcroi
Copy link
Member

@odelcroi odelcroi commented Sep 8, 2022

For all 3 types of room :

Before :

Capture d’écran 2022-09-08 à 11 22 38

After :

Capture d’écran 2022-09-08 à 11 18 48

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

@odelcroi odelcroi linked an issue Sep 8, 2022 that may be closed by this pull request
11 tasks
};

/**
* TCHAP : disable space-related options if create space feature is not enabled
Copy link
Contributor

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 !)

Copy link
Contributor

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)) {
Copy link
Contributor

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.)

@odelcroi odelcroi changed the title rm spaces option if spaces creation is disabled 111 - rm spaces option if spaces creation is disabled Sep 13, 2022
@odelcroi
Copy link
Member Author

Duplicate of #166

@odelcroi odelcroi marked this as a duplicate of #166 Sep 14, 2022
@odelcroi odelcroi closed this Sep 14, 2022
@odelcroi odelcroi deleted the 111-remove-spaces-options branch March 31, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate : Room options allows changing public/private status of room
2 participants