-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[1/n][Selection syntax] Move off of hint addon #27161
Conversation
export type Suggestion = | ||
| { | ||
text: string; | ||
displayText?: string; | ||
type: 'function' | 'logical_operator' | 'parenthesis'; | ||
} | ||
| { | ||
text: string; | ||
displayText?: string; | ||
type: 'attribute'; | ||
attributeName?: string; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in preparation for adding icons and other useful information in the results list
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 34bf11b. |
…move-off-of-hint-add-on
<Menu style={{maxHeight: '300px', overflowY: 'auto'}} onScroll={scheduleUpdateValue}> | ||
{results?.list.map((result, index) => ( | ||
<MenuItem | ||
key={result.text} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance there might be identical text for two distinct results? Or is this always reliably unique? (Thinking of typeahead results for named items, for instance.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there shouldn't be in this case. I'm planning to rework things though so will update this when that happens
## Summary & Motivation The hint add-on we're using to show auto-complete results is not very flexible and doesn't allow us to use React to render the results. This is an issue for bringing elastic search filter results into the results dropdown since these are going to be loaded asynchronously and it'll be much easier to do if we control the rendering ourselves instead and can use React. ## How I Tested These Changes <img width="1260" alt="Screenshot 2025-01-16 at 11 20 43 AM" src="https://github.com/user-attachments/assets/95e9fc34-aa44-4f02-968a-732865ea579b" /> https://github.com/user-attachments/assets/d656b3da-00bf-472e-80b6-1aa8a99c3d2d
Summary & Motivation
The hint add-on we're using to show auto-complete results is not very flexible and doesn't allow us to use React to render the results. This is an issue for bringing elastic search filter results into the results dropdown since these are going to be loaded asynchronously and it'll be much easier to do if we control the rendering ourselves instead and can use React.
How I Tested These Changes
Screen.Recording.2025-01-16.at.11.23.12.AM.mov