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

Hide guest functions on the welcome page if not logged in #9957

Merged
merged 1 commit into from Jun 5, 2019

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Jun 4, 2019

turt2live added a commit to matrix-org/matrix-react-sdk that referenced this pull request Jun 4, 2019
See element-hq/element-web#9957

The two hacks introduced here are for different reasons, mostly related to the welcome page. If you land directly on the welcome page, the app's lifecycle is highly unlikely to have a bootstrapped client. This results in the loggedIn class being false. When the client is later set up (loaded from session, new guest account registered, etc) the context fails to update for the EmbeddedPage, and we need to give it a kick to re-render. It's arguable if we should even keep using the context here.
@turt2live turt2live requested a review from a team June 4, 2019 22:12
@jryans jryans requested review from jryans and removed request for a team June 5, 2019 08:37
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems like a good approach! 😁

@@ -169,9 +178,9 @@ <h4 class="mx_Header_subtitle">_t("Decentralised, encrypted chat &amp; collabora
<!-- The comments below are meant to be used by Ansible as a quick way
to strip out the marked content when desired.
See https://github.com/vector-im/riot-web/issues/8622.
TODO: Convert to config option if possible. -->
TODO: Strip out these comments and rely on the guest flag -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you file a new issue to do that? It seems much cleaner, but also likely to be forgotten...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@turt2live turt2live merged commit 8ec1c1c into develop Jun 5, 2019
@turt2live turt2live deleted the travis/no-button-guest branch June 5, 2019 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Room Directory and Chat with Riot Biot from welcome broken when HS disables guest access
2 participants