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

[1/n][Selection syntax] Move off of hint addon #27161

Merged
merged 5 commits into from
Jan 21, 2025

Conversation

salazarm
Copy link
Contributor

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

Screenshot 2025-01-16 at 11 20 43 AM
Screen.Recording.2025-01-16.at.11.23.12.AM.mov

Comment on lines 35 to 46
export type Suggestion =
| {
text: string;
displayText?: string;
type: 'function' | 'logical_operator' | 'parenthesis';
}
| {
text: string;
displayText?: string;
type: 'attribute';
attributeName?: string;
};
Copy link
Contributor Author

@salazarm salazarm Jan 16, 2025

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

Copy link

github-actions bot commented Jan 16, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-c8ajxzxws-elementl.vercel.app
https://salazarm-move-off-of-hint-add-on.core-storybook.dagster-docs.io

Built with commit 34bf11b.
This pull request is being automatically deployed with vercel-action

<Menu style={{maxHeight: '300px', overflowY: 'auto'}} onScroll={scheduleUpdateValue}>
{results?.list.map((result, index) => (
<MenuItem
key={result.text}
Copy link
Member

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.)

Copy link
Contributor Author

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

@salazarm salazarm merged commit 289c514 into master Jan 21, 2025
2 checks passed
@salazarm salazarm deleted the salazarm/move-off-of-hint-add-on branch January 21, 2025 17:25
marijncv pushed a commit to marijncv/dagster that referenced this pull request Jan 21, 2025
## 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
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.

2 participants