Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 12, 2024
  2. Aug 09, 2024
  3. Aug 06, 2024
  4. Aug 02, 2024
    • Sloan Sparger's avatar
    • Sloan Sparger's avatar
      [Auto Clean-up] Clean-up modal (#44512) · 1d277035
      Sloan Sparger authored
      
      * wip
      
      * moves code to enterprise folder, adds enterprise guards, updates conditionals as to when to show the feature
      
      * impls filter date logic, improves styling, mocks out real endpoint with collection items endpoint, updates table with isLink boolean rath
      er than using custom item renderer, removes dead code
      
      * use the actual url for stale
      
      * so many things... updated design, custom table component, polish, misc. refactors, more correct api typing
      
      * updates to pagination component and reverts some now unused changes to the base items table
      
      * impls pr feedback
      
      * fixes
      
      * fixes failing unit test
      
      * completes pr feedback from raffi
      
      * implements second round of feedback from raffi
      
      * adds tests and couple of small fixes / feedback
      
      * migrate clean up action to enterprise plugin and fix related e2e test, also skip the collection items count query when we do not need the value
      
      * finish main base case e2e test
      
      * clean up helper code for manual testing and add OSS test to make sure feature is not available in OSS
      
      * better handling of min-height on smaller screens
      
      * adds internal undo notification for bulk archiving in the clean up modal
      
      * reset pagination when items are archived/unarchived to keep users from getting stuck on a page beyond the current view
      
      * pr feedback
      
      * further cleanup
      
      * unit test fix
      
      * fixes issue where archiving all items in the modal and then undoing does not result in the stale items list getting refetched
      
      ---------
      
      Co-authored-by: default avatarJohn Swanson <john.swanson@metabase.com>
      Unverified
      1d277035
    • Ryan Laurie's avatar
      Properly handle SMTP Settings environment variables (#46302) · 1c7de429
      Ryan Laurie authored
      * properly handle SMTP environment variables
      
      * disable clear button when set by env var
      
      * allow the SMTP form to validate with any combination of environment variables
      
      * add unit tests for SMTP connection form
      
      * BONUS: fix console error for jt keys
      
      * fix types
      Unverified
      1c7de429
  5. Jul 31, 2024
  6. Jul 25, 2024
  7. Jul 23, 2024
  8. Jul 19, 2024
  9. Jul 16, 2024
    • Nicolò Pretto's avatar
      Embed pdf export - MS2 (#44463) · f4d1d873
      Nicolò Pretto authored
      
      * add pdf export button to static embed and public sharing (#43743)
      
      * add export button to embed frame, it works on static embed and public sharing
      
      * move css around to make dashcard border show up on static/public embed pdf exports
      the library we use to render an html node to an image doesn't seem to support box shadow
      the original fix was done in ParametersAndCardsContainer, but that component is not used in the static/public embeds
      
      * fix types
      
      * fix night theme pdf export
      - use padding for the title instead of starting to draw the image from 60px, to keep the bg color
      - change the css to also apply the bg-color to the first child of the EmbedFrame, to make it work when exporting to pdfs, where the EmbedFrame is not part of the exported dom
      
      * refactor: exportTabAsPdfButtonText function
      
      * give a default to the filename, even though it should always be there
      
      * exportTabAsPdfButtonText -> getExportTabAsPdfButtonText
      
      * introduce .WithThemeBackground to not have a css rule too much generic
      
      * feat: adds endpoint to download results of a dashcard part of a public dashboard (#44156)
      
      * Flag to hide download buttons (#44206)
      
      * pass down downloadsEnabled to hide downloads buttons in public and embedded questions or dashcards
      
      * Update frontend/src/metabase/dashboard/components/DashCard/DashCardMenu/DashCardMenu.tsx
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      * PLUGIN_DOWNLOADS_ENABLED -> PLUGIN_RESOURCE_DOWNLOADS
      
      * adds comment to areDownloadsEnabled function to explain what it does
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      * logic to handle downloads url parameter (#44363)
      
      * minimal support for downloads url parameter
      
      * updates StaticEmbedSetupPane test to epxect downloads=false instead of hide_download_button=true
      
      * fix prettier mistakes
      
      * tmp fix to the tests until we have the new analytics events
      
      * fix eslint issues
      
      * update embedding snippets e2e
      
      * update embedding questions e2e
      
      * try to clean up the mess of downloads/downloadsEnabled
      
      * adds `hasPremiumFeature` check to the plugin, adds unit test for the logic
      
      * adds TODOS for analytics
      
      * unit tests for downloads flag (#45178)
      
      * fix download pdf button not showing up when titled=false and there's only one tab
      
      * unit tests for downloads flag on dashboards and questions
      
      * adds test about the container id, not sure if we should keep it
      
      * adds a comment to explain why we enable premium features in the tests
      
      * move downloadsEnabled outside of the Boolean cast as it's already a boolean
      
      * E2E tests for public/static downloads (#45240)
      
      * wip e2e tests
      
      * make downloadUtils ts friendly
      
      * assertNotEmpty function
      
      * adds tests for public questions
      
      * e2e tests for static embed downloads
      
      * publicUid -> publicUuid
      
      * fix assertNotEmpty
      
      * fix parameter not renamed
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * remove duplicated test
      
      * fix another typo i forgot to rename
      
      * fix another rename issue
      
      * convert e2e-downloads-helpers to ts
      
      * refactor: put method calculation in getEndpoint function
      
      * adds note to downloadUtils
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Update e2e/test/scenarios/embedding/embedding-snippets.cy.spec.js
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      * change requires to import to reflect that we changed to export the source code in downloadUtils
      
      * makes downloadsEnabled prop more consistent across components
      
      * colocate downloadsEnabled with hideDownloadButton in embed-display-options
      
      * defaults displayOptions.downloads to true to simplify logic
      
      * remove unused queryString parameter in tests setup function
      
      * reword TODO
      
      * Revert "defaults displayOptions.downloads to true to simplify logic"
      
      This reverts commit aebf4cf3cf3528deefb9c40dfc48d2f39a278b97.
      
      * fix png export when on dark theme (public/embed) not having the dark … (#45497)
      
      * fix png export when on dark theme (public/embed) not having the dark background
      
      * move the border-radius fix for the dashcard export to saveChartImage
      
      * remove comments
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      Unverified
      f4d1d873
  10. Jul 15, 2024
  11. Jul 05, 2024
  12. Jul 02, 2024
  13. Jun 27, 2024
  14. Jun 20, 2024
  15. Jun 19, 2024
  16. Jun 17, 2024
  17. Jun 14, 2024
  18. Jun 13, 2024
  19. Jun 12, 2024
  20. Jun 11, 2024
    • bryan's avatar
      Make recents understand context (#43478) · 7b849da3
      bryan authored
      
      * adds the endpoint and a test
      
      * add recents endpoint, todo: tests
      
      * add post recents endpoint
      
      * return recent views for both lists, but make the endpoint work
      
      * Make recent-views context aware
      
      - pruning is context aware, only checks for the recently-inserted
        context
      - Adds endpoints:
          - POST to create selection recents,
          - GET activity/recents
            - requres context query param to be one of:
            - all, views, selections
      
      - Adds context arg to update-users-recent-views!
      - Cleans up arg schema for update-users-recent-views
      
      * impl GET api/activity/recents
      
      - return recent-selections and recent-views from
      - send context == collection from pinned card reads
      
      * update callsites of recent-views/update-users-recent-views!
      
      - to use :view param where necessary
      
      * fixes models/recent-view tests
      
      * adds more activity/recent-view tests
      
      * wip
      
      - fix whitespace linter
      
      * Fix command palette e2e test
      
      - reuse util snake-keys
      
      * updates fe to use new recents endpoints
      
      * fixes fe type issue
      
      * snake-keys -> deep-snake-keys
      
      - I've been betrayed by lsp rename
      
      * snake-keys -> deep-snake-keys
      
      - I've been betrayed by lsp rename
      
      * log selection events for created collections
      
      * mysql doesn't allow default values for TEXT types
      
      * log a recent view on data-picker selection
      
      * decouple view-log context from card-event view context
      
      * fix a doc typo
      
      * stop double logging recent-views on POST
      
      * maybe fixes some tests
      
      * some e2e fixes
      
      * fix mysterious divide by zero during score search
      
      * fix divide by zero possibilities everywhere in score-items
      
      metabase.api.activity/score-items used to throw when there weren't any
      items being scored (even though there's a `(when (seq items) ...)` check)
      
      * more test fixes
      
      * fix more e2e tests, + rename endpoint in tests
      
      * fix oopsie
      
      * fixes a few more tests
      
      * address review comments/questions
      
      * allow for a comma delimited list in qps like ?context=views,selections
      
      returns all recent view items with those contexts, most recent first
      under the `:recents` key.
      
      * refactors FE around new endpoint
      
      * fixes for unit tests
      
      * use ms/QueryVectorOf for context
      
      * fix models/recent_views tests
      
      * use multiple query params instead of comma delimited value on FE
      
      * ignore timestamp when deduping recents
      
      * review comments + test fixing
      
      * update docstring
      
      * fix api/activity_test s
      
      * actually dedupe
      
      * add test for deduping by context
      
      * e2e fix: shows up-to-date list of recently viewed items after another page is visited
      
      * e2e fix: should undo the question replace action
      
      * e2e fix: should replace a dashboard card question (metabase#36984)
      
      * e2e fix: should preselect the most recently visited dashboard
      
      * fix 6 more e2e tests
      
      * fixes fe type check and unit failure
      
      * renames unit test mocking function
      
      * fix a flaky e2e test
      
      * widen Item to accept str or kw where sensible
      
      - allow strings or keywords for moderated_status, and authority_level
      
      * simplify impl + add test
      
      * add view-log to events schema
      
      * add collection context to view log
      
      * fix the final 2 failing e2e tests
      
      * click dashboard tab when the user has can-read? on recent entities
      
      ---------
      
      Co-authored-by: default avatarSloan Sparger <sloansparger@gmail.com>
      Unverified
      7b849da3
  21. Jun 10, 2024
    • Denis Berezin's avatar
      feat(sdk): SDK theming part 6 - text-brand, text-dark, text-light,... · e8fedf01
      Denis Berezin authored
      feat(sdk): SDK theming part 6 - text-brand, text-dark, text-light, text-medium, admin-navbar, `accentX` (#43687)
      
      * Migrate text-brand
      
      * Migrate text-dark
      
      * Migrate text-light
      
      * Migrate text-medium
      
      * Migrate admin-navbar
      
      * make compact formatting consistent across all series (#43472)
      
      * make compact formatting consistent across all series
      
      * fix rebase
      
      * [Browse] Show Browse models link in nav only when there are models (#43286)
      
      * Upgrade to TypeScript v5.4 (#43736)
      
      * use correct github api for CI (#43750)
      
      * update list of releases (#43754)
      
      * Multi Series Dashcards Render with Filters Applied To All Series (#43428)
      
      * Multi Series Dashcards Render with Filters Applied To All Series
      
      Fixes: #39083
      
      Multi-series dashcards now properly render when a subscription is set up with filters that impact the values of each
      card in the multi-series card.
      
      * Small refactor for executing dashcards in a pulse context.
      
      - move execute-dashboard-subscription to pulse.util
      - this fn now will also execute all card series cards
        and put those results into a list on the key :series-results in the dashcard
        which is then used in the render multimethod to send the correct data to the javascript context
      
      A small todo was taken care of as well, we can now use :dashboard-subscription in the :context key
      
      * Fix up render fn
      
      The shape of hte data going into the javascript was a bit unclear before. This keeps things a little more
      understandable.
      
      Next step is probably to create some Malli schemas inside the js_svg namespace to document and enforce the needed data shapes
      
      * pull :data up a level from :result in the series cards
      
      * Update src/metabase/pulse/render/body.clj
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      
      * Remove unneeded let
      
      * set/rename-keys won't work here because we raise the :data key
      
      I've realised a suggested change to just use set/rename-keys won't do what we need. We need instead to raise :data
      from within the result key up to the same level (and dissoc result).
      
      I've renamed the helper function to make its purpose a bit clearer
      
      ---------
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      
      * Hydrate can_run_adhoc_query and address review comments (#43747)
      
      This is a followup on #43625.
      
      * Consolidate dashboard-card specs (#43716)
      
      * Consolidate joins specs (#43717)
      
      * Update translations for v50 and add Danish Language Support (#43314)
      
      * update translations for v50
      
      * add Danish
      
      * update translations for v50 release
      
      * alphabetical order is nice
      
      * Move database role to url parameters from connection properties on Snowflake (#43602)
      
      * Move role to url parameters from connection properties
      
      * Fix test
      
      * Fix width of save button in cache sidebar (#43755)
      
      * Remove dead code (#43603)
      
      * Combine search e2e specs (#43718)
      
      * Highlight the table cell data in dashboards when the cell is an ID column (#43728)
      
      * highlight id cell column
      
      * add simpletable stories
      
      * add simple table test data
      
      * add loki reference image
      
      * Update frontend/src/metabase/visualizations/components/TableSimple/TableCell.styled.tsx
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Remove old repro for 39150 (#43749)
      
      * Fix remaining `tinyint` booleans in MySQL (#43296)
      
      * Correct type for `report_card.dataset`
      
      This was missed in the original migration of boolean types to
      ${boolean.type} in MySQL/MariaDB, and then missed again by me when I
      migrated `collection_preview` over a week ago.
      
      * Change all boolean types to `bit(1)` in MySQL
      
      Liquibase changed their boolean type in MySQL from `bit(1)` to
      `tinyint(4)` in version 4.25.1. Our JDBC driver does not recognize these
      as booleans, so we needed to migrate them to `bit(1)`s.
      
      As discussed [here](#36964), we
      changed all existing `boolean` types that were in the
      `001_update_migrations.yml` but not the SQL initialization file.
      
      For new installations, this works: things in the SQL initialization file
      get created with the `bit(1)` type.
      
      However, for existing installations, there's a potential issue. Say I'm
      on v42 and am upgrading to v49. In v43, a new `boolean` was added.
      
      In this case, I'll get the `boolean` from the liquibase migration rather
      than from the SQL initialization file, and it need to be changed to a
      `bit(1)`.
      
      I installed Metabase v41 with MySQL, migrated the database, and then
      installed Metabase v49 and migrated again. I made a list of all the
      columns that had the type `tinyint`:
      
      ```
      mysql> SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLUMN_TYPE,        COLUMN_DEFAULT, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_TYPE = 'tinyint' AND TABLE_SCHEMA='metabase_test';
      +---------------+------------------------------+-------------------+-------------+----------------+-------------+
      | TABLE_SCHEMA  | TABLE_NAME                   | COLUMN_NAME       | COLUMN_TYPE | COLUMN_DEFAULT | IS_NULLABLE |
      +---------------+------------------------------+-------------------+-------------+----------------+-------------+
      | metabase_test | core_user                    | is_datasetnewb    | tinyint     | 1              | NO          |
      | metabase_test | metabase_field               | database_required | tinyint     | 0              | NO          |
      | metabase_test | metabase_fieldvalues         | has_more_values   | tinyint     | 0              | YES         |
      | metabase_test | permissions_group_membership | is_group_manager  | tinyint     | 0              | NO          |
      | metabase_test | persisted_info               | active            | tinyint     | 0              | NO          |
      | metabase_test | report_card                  | dataset           | tinyint     | 0              | NO          |
      | metabase_test | timeline                     | archived          | tinyint     | 0              | NO          |
      | metabase_test | timeline                     | default           | tinyint     | 0              | NO          |
      | metabase_test | timeline_event               | archived          | tinyint     | 0              | NO          |
      | metabase_test | timeline_event               | time_matters      | tinyint     | NULL           | NO          |
      +---------------+------------------------------+-------------------+-------------+----------------+-------------+
      10 rows in set (0.01 sec)
      ```
      
      Then wrote migrations. For each column, we:
      
      - turn it into a `bit(1)`,
      
      - re-set the previously existing default value, and
      
      - re-add the NOT NULL constraint, if applicable.
      
      * Change author and add missing `dbms`
      
      ---------
      
      Co-authored-by: default avatarJohn Swanson <john.swanson@metabase.com>
      
      * Add ts-pattern library (#43752)
      
      * Add events to measure search performance (#43135)
      
      * new_search_query event
      
      * Filters in object, search click event
      
      * updating event schema
      
      * type and event schema adjustments
      
      * delete comments BE code
      
      * adjusting tests
      
      * PR feedback
      
      * typos and spacing
      
      * Fixup missing colors
      
      ---------
      
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@users.noreply.github.com>
      Co-authored-by: default avatarRaphael Krut-Landau <raphael.kl@gmail.com>
      Co-authored-by: default avatarSloan Sparger <sloansparger@users.noreply.github.com>
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      Co-authored-by: default avatarAlex Yarosh <alexandra@metabase.com>
      Co-authored-by: default avataradam-james <21064735+adam-james-v@users.noreply.github.com>
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Co-authored-by: default avatarlbrdnk <lbrdnk@users.noreply.github.com>
      Co-authored-by: default avatarPhoomparin Mano <poom@metabase.com>
      Co-authored-by: default avatarNemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
      Co-authored-by: default avatarSakuragiYoshimasa <ysrhsp@outlook.com>
      Co-authored-by: default avatarJohn Swanson <john.swanson@metabase.com>
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      e8fedf01
    • Raphael Krut-Landau's avatar
      Remove classnames (#43869) · 46215d51
      Raphael Krut-Landau authored
      Unverified
      46215d51
    • Raphael Krut-Landau's avatar
    • Denis Berezin's avatar
      feat(sdk): SDK theming part 5 - success, summarize, warning, white, text-white, bg-white (#43676) · 7046fef3
      Denis Berezin authored
      * Migrate success
      
      * Migrate summarize
      
      * Migrate warning
      
      * Migrate white
      
      * Add colors to storybook
      
      * Fix CI
      
      * Fix CI
      
      * Codereview fixes
      
      * Convert warning color
      Unverified
      7046fef3
  22. Jun 09, 2024
  23. Jun 07, 2024
  24. Jun 06, 2024
  25. Jun 05, 2024
Loading