Page MenuHomePhabricator

Fix typeahead suggest token values, autoselect first completion
ClosedPublic

Authored by bengotow on Tue, Nov 19, 6:13 AM.

Details

Summary

This diff addresses the two issues that were making the typeahead search annoying. Rather than typing "pipeline:" and then seeing the available options, you can now type "airline_" and see "pipeline:airline_demo" right off the bat. When no chars are entered you see the available search space / keywords, but as soon as you start typing it suggests full autocompletions.

The second fix is that the typeahead autoselects the first autocompletion so you can press "Enter" to confirm your search without down-arrow first. To enter text that is NOT an autocompletion, you press esc to close the options and then press enter, but it's unclear if you'd really do that.

Test Plan

I added a few tests for this component's behavior. We should definitely write more, but I think we need to switch to a better React testing library like enzyme to test interactions efficiently and that might require another diff.

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

bengotow created this revision.Tue, Nov 19, 6:13 AM
bengotow edited the summary of this revision. (Show Details)Tue, Nov 19, 6:13 AM
bengotow updated this revision to Diff 6712.Tue, Nov 19, 7:34 AM
  • Add a few tests - we should probably add Enzyme soon
bengotow edited the test plan for this revision. (Show Details)Tue, Nov 19, 7:35 AM
alangenfeld accepted this revision.Wed, Nov 20, 5:25 PM
alangenfeld added a subscriber: alangenfeld.

yaytests

This revision is now accepted and ready to land.Wed, Nov 20, 5:25 PM