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

Show resolved homeserver configuration on the mobile guide #9726

Merged
merged 2 commits into from May 17, 2019

Conversation

@turt2live
Copy link
Member

turt2live commented May 14, 2019

Reviewer: Note that this is pointed at the .well-known feature branch, not develop. This is intentional as the feature branch is still unsafe to merge to develop.

See #9290

This doesn't cover default_server_name because that pulls in a questionable amount of JS.

See #9290
@turt2live turt2live changed the title Show most homeserver options on the mobile guide Show resolved homeserver configuration on the mobile guide May 14, 2019
@turt2live turt2live marked this pull request as ready for review May 15, 2019
@turt2live turt2live requested a review from vector-im/riot-web May 15, 2019
@turt2live turt2live added this to In Review in Workflow May 15, 2019
Copy link
Member

dbkr left a comment

Looks fine, but ideally would be nice to have the duplicated code in common files (especially as the mobile guide is already webpack-ed for this purpose).

let config = await getVectorConfig('..');

// We manually parse the config similar to how validateServerConfig works because
// calling that function pulls in roughly 4mb of JS we don't use.

This comment has been minimized.

Copy link
@dbkr

dbkr May 16, 2019

Member

could move validateServerConfig to getconfig.js?

This comment has been minimized.

Copy link
@turt2live

turt2live May 16, 2019

Author Member

That'd cost us 4mb of JS because it pulls in most of the react-sdk and most of the js-sdk

This comment has been minimized.

Copy link
@turt2live

turt2live May 16, 2019

Author Member

to expand on that: the problem is that we use multiple webpack layers, so the 4mb consists of things like bluebird, browser-request, etc. If we had a single webpack for the 3 projects, we'd be able to dedupe/eliminate a lot of that cruft

This comment has been minimized.

Copy link
@dbkr

dbkr May 17, 2019

Member

yep, I was just suggesting taking validateServerConfig stuff you have here and putting it into a separate file so both things can use it (the js-sdk bit would have to stay duplicated) but if there's a reason that's not an option then lgtm.

This comment has been minimized.

Copy link
@turt2live

turt2live May 17, 2019

Author Member

yea, that's what I tried first and it's where the 4mb metric came from :(

The logic is slightly different in that here the goal is to resolve a homeserver as fast as possible with minimal safety whereas the validateServerConfig function tries to find a homeserver that's actually safe to use. It's not directly transferable without avoiding the js-sdk's implementation of stuff, which renders those classes nearly pointless.

@turt2live turt2live merged commit 7a65dc9 into travis/feature/wellknown2 May 17, 2019
4 checks passed
4 checks passed
buildkite/riot-web/pr Build #294 passed (4 minutes, 52 seconds)
Details
buildkite/riot-web/pr/eslint-lint Passed (1 minute, 8 seconds)
Details
buildkite/riot-web/pr/karma-tests Passed (3 minutes, 5 seconds)
Details
buildkite/riot-web/pr/pipeline Passed (3 seconds)
Details
Workflow automation moved this from In Review to In Test May 17, 2019
@turt2live turt2live deleted the travis/wk/mobileguide branch May 17, 2019
@jryans jryans moved this from In Test to Done in Workflow May 30, 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.