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

feat: Monaco Mode - Phase 2 - Mode & Worker #1459

Merged
merged 24 commits into from
Apr 15, 2020

Conversation

acao
Copy link
Member

@acao acao commented Apr 4, 2020

For the second phase, we will implement a monaco mode and worker, and we only support completion and maybe diagnostics. Summarized more completely in #1445

Outcomes

  • introduces packages/monaco-graphql and examples/monaco-webpack
  • Diagnostics (working), Completion Support (todo)
  • Required baseline: schema loading, primitive config loading

Todo

  • GraphQL Mode & contribution
  • GraphQL Worker Manager
  • GraphQL Worker - written but worker manager will not load it
  • GraphQL Language features
    • completion - mode providers work
    • Diagnostics - mode providers work

Another PR?

  • Create graphql-config loaders for browser config load by default
  • programatically provide graphql-config ala Programatic graphql config #1272?
  • handle schema loading/changing schema via monaco service

Scoped to only completion for now. Other features will be iterative

How to Develop/Test

  1. check out this branch
  2. from the root: yarn --force
  3. from the root: (watcher) yarn tsc --watch (one time) yarn build-ts
  4. in another terminal tab, from examples/monaco-graphql: yarn start

@codecov
Copy link

codecov bot commented Apr 4, 2020

Codecov Report

Merging #1459 into master will decrease coverage by 0.17%.
The diff coverage is 45.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1459      +/-   ##
==========================================
- Coverage   58.98%   58.80%   -0.18%     
==========================================
  Files          60       60              
  Lines        3023     3042      +19     
  Branches      796      811      +15     
==========================================
+ Hits         1783     1789       +6     
- Misses       1194     1207      +13     
  Partials       46       46              
Impacted Files Coverage Δ
packages/graphiql/src/components/QueryHistory.tsx 69.23% <ø> (ø)
packages/graphiql/src/components/ResultViewer.tsx 73.80% <ø> (ø)
...hql-language-service-interface/src/GraphQLCache.ts 51.45% <0.00%> (ø)
...-language-service-interface/src/findGraphQLTags.ts 64.86% <ø> (ø)
...ql-language-service-interface/src/parseDocument.ts 87.50% <ø> (ø)
...hql-language-service-interface/src/stringToHash.ts 0.00% <ø> (ø)
...hql-language-service-parser/src/CharacterStream.ts 68.75% <ø> (ø)
...kages/graphql-language-service-parser/src/Rules.ts 63.04% <ø> (ø)
...raphql-language-service-parser/src/onlineParser.ts 82.20% <ø> (ø)
...ql-language-service-server/src/MessageProcessor.ts 57.40% <ø> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fddc11d...8722551. Read the comment docs.

@acao acao changed the base branch from master to feat/pre-monaco-lsp April 5, 2020 18:41
@acao acao force-pushed the feat/pre-monaco-lsp branch 4 times, most recently from 87bd8b2 to f3a69f2 Compare April 6, 2020 00:58
@acao acao force-pushed the feat/monaco-service branch 4 times, most recently from a8e5f1e to 9ef2d47 Compare April 9, 2020 00:51
"typings": "dist/monaco.contribution.d.ts",
"contributors": [
{
"name": "Peng Lyu",
Copy link
Member Author

Choose a reason for hiding this comment

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

@rebornix gave you credit since you created most of the features! haha

@acao acao added this to In progress in Full Fledged Monaco Mode via automation Apr 10, 2020
@acao acao changed the base branch from feat/pre-monaco-lsp to master April 11, 2020 17:53
@acao
Copy link
Member Author

acao commented Apr 12, 2020

to preview the monaco branch, append the slash /monaco path:
https://deploy-preview-1459--graphiql-test.netlify.com/monaco/

@acao acao force-pushed the feat/monaco-service branch 2 times, most recently from 70614c0 to ae45033 Compare April 13, 2020 16:17
@acao acao force-pushed the feat/monaco-service branch 5 times, most recently from d1b1cc4 to 279c327 Compare April 15, 2020 03:48
{
"name": "monaco-graphql",
"description": "full service, official monaco mode for GraphQL",
"version": "2.3.4-alpha.5",
Copy link
Member Author

@acao acao Apr 15, 2020

Choose a reason for hiding this comment

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

we can decide what this should be before we release a stable version, but I'll probably just change it to something like 0.1.0 for the first pre-release

Co-authored-by: Rikki Schulte <rikki.schulte@gmail.com>
@acao acao changed the title Monaco Mode - Phase 2 - Mode & Worker feat: Monaco Mode - Phase 2 - Mode & Worker Apr 15, 2020
@acao acao merged commit bc95fb4 into graphql:master Apr 15, 2020
Full Fledged Monaco Mode automation moved this from In progress to Done Apr 15, 2020
@acao acao deleted the feat/monaco-service branch April 15, 2020 04:50
@acao acao linked an issue May 17, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2 participants