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

external services UI #1103

Merged
merged 25 commits into from Dec 6, 2018
Merged

external services UI #1103

merged 25 commits into from Dec 6, 2018

Conversation

nicksnyder
Copy link
Contributor

@nicksnyder nicksnyder commented Nov 21, 2018

Part of #914
screen recording 2018-11-27 at 11 40 pm

@nicksnyder
Copy link
Contributor Author

I would like to merge this today but I assume there will be review comments. Please be clear about which comments you think block merging.

In the very short term this UI will use useful in dogfood and sourcegraph.com to help me migrate.

@felixfbecker
Copy link
Contributor

What is an "external service"? Is it a code host? Or what else can it "service"?

@nicksnyder
Copy link
Contributor Author

Yes, they are basically code hosts for now. See #1077 (comment)

@slimsag
Copy link
Member

slimsag commented Nov 28, 2018

+1 Nice

@dadlerj
Copy link
Member

dadlerj commented Nov 28, 2018

Sorry I haven't been involved in this project at all, but I'm a bit confused. Is this replacing having code host connections in site config? Or will there just be two UIs for adding them now?

@slimsag
Copy link
Member

slimsag commented Nov 28, 2018

@dadlerj it is the replacement long term, but I think temporarily we will have both (not sure what we will have for 3.0 preview though)

@nicksnyder
Copy link
Contributor Author

Is this replacing having code host connections in site config?

Yes, we are moving this out of site config. Users will never be in a state where there are two sources of truth.

@sqs sqs added the roadmap label Dec 4, 2018
@sqs sqs added this to the 3.0-preview milestone Dec 4, 2018
@nicksnyder
Copy link
Contributor Author

@felixfbecker can you review my resolutions to your comments?

},
].concat(extraSchemas),
})
setDiagnosticsOptions(monaco, this.props)
Copy link
Contributor

Choose a reason for hiding this comment

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

Above you use this.monaco, here you use monaco. I think you need to use this.monaco everywhere in all value positions or else monaco will not be lazy-loaded but bundled into the main bundle. The import monaco is only for the type I think. To prevent these mistakes I usually do something like

import * as _monaco from 'monaco'
type Monaco = typeof _monaco // Type only!

With the underscore making it clear that this should not be used anywhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's also now TS import types which can import a type without creating a value binding:

interface State {
  monaco: import('monaco'),
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

monaco is just a pre-existing variable that is assigned on L144, so I don't think I have changed any semantics with respect to how monaco is imported here.

@codecov-io
Copy link

Codecov Report

Merging #1103 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted Files Coverage Δ
cmd/frontend/graphqlbackend/external_services.go 0% <0%> (ø) ⬆️
cmd/frontend/db/external_services.go 0% <0%> (ø) ⬆️
pkg/search/backend/backend.go 97.29% <0%> (-2.71%) ⬇️

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.

None yet

7 participants