Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 18, 2024
  2. Apr 17, 2024
  3. Apr 16, 2024
    • Denis Berezin's avatar
      Embedding SDK - Fix table header styles calculation (#41449) · caac0cb6
      Denis Berezin authored
      * Fix table styles calculation
      
      * Review fixes
      
      * Fix unit tests
      caac0cb6
    • Braden Shepherdson's avatar
      Use cached Malli validators/explainers; make `:fn` schemas cacheable (#39947) · 8c2c556a
      Braden Shepherdson authored
      This improves our Malli performance substantially! Many of our code paths were calling vanilla `malli.core/validate` or `malli.core/explain`; these redo the (possibly expensive) compilation of the schema into a validator or explainer for every call.
      
      We should use the caching versions in `metabase.util.malli.registry` everywhere, and our runtime performance will be much improved.
      
      However when I started using these cached versions, I found that the memory use was growing out of control. Eventually I tracked this down to `:fn` schemas. Functions are only comparable by pointer equality, so they make poor cache keys. `(fn ...)` or `comp` calls in a schema on a `mu/defn` function **get re-created for every call of the `mu/defn`'d function**! That's a big time sink recompiling the schemas if we're *not* caching, and a huge memory sink if we *are* caching!
      
      This PR pulls every such schema I could find out into a `def` so it uses the same closure and is cacheable. I'd like to automate that in some part of the Malli pipeline, or maybe a linter rule, but I haven't found a good way to do it yet.
      
      Part of #39946.
      8c2c556a
    • Nemanja Glumac's avatar
      Re-wire the `Users` entity to use RTK Query under the hood (#41312) · 093308d2
      Nemanja Glumac authored
      * Define the types for the `create` user request
      
      * First draft for the create user API using RTK Query
      
      * Export RTK user API
      
      * Define explicit `create` api for the user entity
      
      * Define `updatePassword` mutation
      
      * Wire users entity `resetPasswordManual` to use RTK under the hood
      
      * Use `updatePassword` mutation
      
      * Wire users list calls
      
      * Remove unused `update_password` from services
      
      * Fix the dispatch used to list users
      
      * Dispatch the action type and the payload
      
      * Wire `deactivateUser` to work with RTK
      
      * Wire `reactivateUser` to work with RTK
      
      * Delete unused entries from `UserApi`
      
      * Convert the reducer to use `switch` statement
      
      * Remove unused user `send_invite` endpoint from FE
      
      * Wire `resetPasswordEmail` in users entity to work with RTK
      
      * Provide cache invalidation for the `userApi`
      
      * Add `provideUserListTags` helper
      
      * Pass `email` as a sole argument
      
      * Throw on `get` a user
      
      This endpoint hasn't been used in a long itme.
      Removed in https://github.com/metabase/metabase/pull/41334/files#diff-241e0afa11f03a0942eb322aa47695e58496379b0b6d42e6e59ecf6a20fe623cL448
      
      * Use RTK Query to `updateUser`
      
      * Fix wrong syntax
      
      * Use RTK Query to `getUser`
      
      It was used by `.load` and `fetch` after all.
      
      * Export `useUpdateUserMutation`
      
      * Refactor `getRecipientsList`
      
      * Fix response type for the `getUser`
      
      * Pass user id as a sole argument instead of in an object
      
      * Fix users entity `get` method
      
      * Fix the user update password form
      
      * Fix unit tests
      
      * Fix deactivate and reactivate query invocations
      
      See e949812.
      
      * Adjust types according to the feedback
      
      * Order utils alphabetically
      
      * Throw on `delete`
      
      * Revert "Fix unit tests"
      
      This reverts commit 2c329e836427010ad08bfd0511eb1a9df4ba95d6.
      
      * Fix FE unit test mocks
      
      * Rename imports to use plural for consistency
      
      * Fix one last remaining FE unit test
      093308d2
    • Nemanja Glumac's avatar
      da9125f8
    • Romeo Van Snick's avatar
      Add most used functions to suggestions when they open (#41267) · 176f6317
      Romeo Van Snick authored
      * 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
      176f6317
    • Chris Truter's avatar
    • Uladzimir Havenchyk's avatar
      03e9e1c6
    • Alexander Solovyov's avatar
    • Ngoc Khuat's avatar
    • Oisin Coveney's avatar
    • Nicolò Pretto's avatar
    • Phoomparin Mano's avatar
    • Oisin Coveney's avatar
      19420a2b
    • Ngoc Khuat's avatar
  4. Apr 15, 2024
Loading