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

[Selection Input] Refactor auto-complete system. #27389

Open
wants to merge 25 commits into
base: salazarm/filter-out-kind-tags
Choose a base branch
from

Conversation

salazarm
Copy link
Contributor

@salazarm salazarm commented Jan 25, 2025

Summary & Motivation

The primary goal of this refactor is to decouple the auto-complete suggestion UI from the autocomplete visitor logic.

Before:

  • Visitor hard coded the types of the suggestions
  • UI rendering was tightly coupled to those types
  • The types were too restrictive, they required all of the values to be strings but that doesn't work well for tags which have a key and a value. Encoding the tags as a string (eg: "key"="value") created ambiguities, where we could not tell if the string was a tag of {key: "key", value: "value"} or a tag of {key: "key"="value", value: undefined}.

After:

  • Rendering is encapsulated in the SelectionAutoCompleteProvider which is also responsible for making auto-complete suggestions and can handle both string and tag object types.

How I Tested These Changes

Existing jest test in SelectionAutocomplete.ts. + Manual testing in cloud and OSS.

Copy link

github-actions bot commented Jan 25, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-jm0a332xo-elementl.vercel.app
https://salazarm-refactor-auto-complete-logic.core-storybook.dagster-docs.io

Built with commit 512ea3f.
This pull request is being automatically deployed with vercel-action

@salazarm salazarm changed the base branch from master to salazarm/filter-out-kind-tags January 25, 2025 23:25
@salazarm salazarm marked this pull request as ready for review January 26, 2025 01:29
@salazarm salazarm force-pushed the salazarm/refactor-auto-complete-logic branch from 794d7e3 to b8b7551 Compare January 28, 2025 05:14
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.

1 participant