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 commented Jun 4, 2019

turt2live added a commit to matrix-org/matrix-react-sdk that referenced this pull request Jun 4, 2019
See vector-im/riot-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 vector-im/riot-web Jun 4, 2019
@jryans jryans requested review from jryans and removed request for vector-im/riot-web Jun 5, 2019
@jryans
jryans approved these changes Jun 5, 2019
Copy link
Member

jryans left a comment

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

This comment has been minimized.

Copy link
@jryans

jryans Jun 5, 2019

Member

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

This comment has been minimized.

Copy link
@turt2live
@turt2live turt2live merged commit 8ec1c1c into develop Jun 5, 2019
4 checks passed
4 checks passed
buildkite/riot-web Build #433 passed (2 minutes, 29 seconds)
Details
buildkite/riot-web/eslint-lint Passed (54 seconds)
Details
buildkite/riot-web/karma-tests Passed (2 minutes, 20 seconds)
Details
buildkite/riot-web/pipeline Passed (5 seconds)
Details
@turt2live turt2live deleted the travis/no-button-guest branch Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.