Add most used functions to suggestions when they open (#41267)
* Add list of most popular functions and aggregations * Render 'All functions' link on expression dropdown * Suggest popular functions when no input is given * Do not return focus to search bar * Default to not matching any substring * Open suggestions when the expression editor opens * Group expressions by group * Render group titles in dropdown * Match the expression suggestions height to the design * Add tests for popular functions * Convert tests to it-style * Only return supported popular functions * Limit most used functions group to 5 items * Make the suggestion footer keyboard-accessible * Make a different group for popular aggregations * Remove padding on suggestion list * Resize list * Add test for popular functions in suggest * Move showMetabaseLinks into args * Remove unneeded optional chain * Clarify popup issue in ACE hack * Use correct target for links * Reference correct method in comment * Split up popular expressions * Remove Set around popular functions/aggregations * Do not allow interacting with suggestion header * Do not use _ prefix for variable * Add verb in test * Remove unused async in test * Test if functions are in document * Move tests for suggestWithFooter to separate file * Use correct target in link * Fix typo in key * Allow picking suggestion when textbox is empty * Remove unnecessary cast * Avoid double scroll bars * Only show link to all functions when editor is empty * Split up popular functions between expressions and filters * Fix type of popular variable * Use the same heuristic for footer as for popular expressions * Close suggestions when the editor is not focused * Add missing open prop in test * Simplify test * Add selector for expression editor widget * Fix e2e tests Fix e2e tests * Avoid non-interactive clicks from closing the dropdown * Use custom expression helpers in broken test * Fix test * Remove should exist check for selector
Showing
- e2e/support/helpers/e2e-custom-column-helpers.js 4 additions, 0 deletionse2e/support/helpers/e2e-custom-column-helpers.js
- e2e/test/scenarios/custom-column/reproductions/13751-cc-allow-strings-in-filter.cy.spec.js 4 additions, 6 deletions...reproductions/13751-cc-allow-strings-in-filter.cy.spec.js
- e2e/test/scenarios/filters/filter.cy.spec.js 5 additions, 4 deletionse2e/test/scenarios/filters/filter.cy.spec.js
- e2e/test/scenarios/question/reproductions/17512.cy.spec.js 12 additions, 6 deletionse2e/test/scenarios/question/reproductions/17512.cy.spec.js
- e2e/test/scenarios/question/reproductions/18207-string-min-max.cy.spec.js 2 additions, 1 deletion...os/question/reproductions/18207-string-min-max.cy.spec.js
- e2e/test/scenarios/question/summarization.cy.spec.js 3 additions, 2 deletionse2e/test/scenarios/question/summarization.cy.spec.js
- e2e/test/scenarios/visualizations-tabular/table.cy.spec.js 2 additions, 1 deletione2e/test/scenarios/visualizations-tabular/table.cy.spec.js
- frontend/src/metabase-lib/v1/expressions/config.ts 25 additions, 0 deletionsfrontend/src/metabase-lib/v1/expressions/config.ts
- frontend/src/metabase-lib/v1/expressions/suggest.ts 66 additions, 1 deletionfrontend/src/metabase-lib/v1/expressions/suggest.ts
- frontend/src/metabase-lib/v1/expressions/suggest.unit.spec.ts 110 additions, 0 deletions...tend/src/metabase-lib/v1/expressions/suggest.unit.spec.ts
- frontend/src/metabase/query_builder/components/expressions/ExpressionEditorSuggestions/ExpressionEditorSuggestions.styled.tsx 47 additions, 4 deletions...nEditorSuggestions/ExpressionEditorSuggestions.styled.tsx
- frontend/src/metabase/query_builder/components/expressions/ExpressionEditorSuggestions/ExpressionEditorSuggestions.tsx 175 additions, 19 deletions...pressionEditorSuggestions/ExpressionEditorSuggestions.tsx
- frontend/src/metabase/query_builder/components/expressions/ExpressionEditorSuggestions/ExpressionEditorSuggestions.unit.spec.tsx 26 additions, 7 deletions...itorSuggestions/ExpressionEditorSuggestions.unit.spec.tsx
- frontend/src/metabase/query_builder/components/expressions/ExpressionEditorTextfield/ExpressionEditorTextfield.tsx 115 additions, 16 deletions...s/ExpressionEditorTextfield/ExpressionEditorTextfield.tsx
- frontend/src/metabase/query_builder/components/expressions/ExpressionEditorTextfield/ExpressionEditorTextfield.unit.spec.tsx 63 additions, 0 deletions...onEditorTextfield/ExpressionEditorTextfield.unit.spec.tsx
- frontend/src/metabase/query_builder/components/expressions/ExpressionEditorTextfield/index.ts 4 additions, 1 deletion...components/expressions/ExpressionEditorTextfield/index.ts
- frontend/src/metabase/query_builder/components/expressions/ExpressionWidget.tsx 1 addition, 1 deletion...query_builder/components/expressions/ExpressionWidget.tsx
Loading
Please register or sign in to comment