Page MenuHomePhabricator

add autocomplete values for config for scalar union types
ClosedPublic

Authored by prha on Jan 15 2020, 12:24 AM.

Details

Summary

Test Plan

Generated solid with scalar inputs, made sure that autocompleted suggestions
worked for:

  • CompositeConfigType suggestions on the ScalarUnion field line
  • Scalar suggestions (for Bool) on the field line
  • CompositeConfigType only in the child
  • Nested CompositeConfigType in the child

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

prha added reviewers: schrockn, bengotow.

very nice. thanks

js_modules/dagit/src/configeditor/codemirror-yaml/mode.tsx
448

whats the prevToken check for? logic complicated enough to be comment-worthy i think

This revision is now accepted and ready to land.Jan 15 2020, 5:07 PM
js_modules/dagit/src/configeditor/codemirror-yaml/mode.tsx
448

contextually, we want to change the suggested fields depending on the cursor position (e.g. detecting whether or not we are on the same line as the type key or not).

scalarUnionKey: |

vs

scalarUnionKey:
  |

(where | is the cursor position)

I added some comments to make this more clear.