-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add most used functions to suggestions when they open #41267
Conversation
|
4043029
to
353d366
Compare
5335797
to
3c6be77
Compare
84dc86b
to
1c2c4ba
Compare
1c2c4ba
to
87837ce
Compare
helpText?: HelpText; | ||
}; | ||
|
||
function suggestWithFooters( |
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.
Adding the footer seemed misplaced in metabase-lib/v1/expressions
, so I decided to do it here.
I wanted to keep the footers in the list of suggestions to avoid having to jump trough hoops to add the footer to the up/down arrow flow.
...query_builder/components/expressions/ExpressionEditorTextfield/ExpressionEditorTextfield.tsx
Show resolved
Hide resolved
Fix e2e tests
b98d921
to
1f356ad
Compare
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.
Works really well with 2 small exceptions.
Nice work! 🚀
}) { | ||
function handleMouseDownCapture(evt: MouseEvent) { | ||
// prevent the dropdown from closing | ||
evt.preventDefault(); |
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.
Still unresolved. I don't think it should prevent this PR from being merged, but let's keep it somewhere in the backlog as a P3 bug.
type SuggestArgs = { | ||
export const GROUPS = { | ||
popularExpressions: { | ||
displayName: t`Most used functions`, |
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.
Clicking the group title causes the popover to disappear. Not critical, but if it's easy to fix we should do it.
Closes #41237
Description
Adds the most used functions to the list of suggestions when the expression editor opens.
To accomplish this, this PR:
How to verify
Describe the steps to verify that the changes are working as expected.
Demo
Checklist
Note
This PR is a follow up of #41236, so it contains changes from it.