Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 07, 2024
  2. Aug 06, 2024
  3. Aug 05, 2024
    • Oleksandr Yakushev's avatar
    • Ngoc Khuat's avatar
      3c4a1ce3
    • Uladzimir Havenchyk's avatar
    • Case Nelson's avatar
      fix: mongo ObjectId should be orderable (#46501) · d5601723
      Case Nelson authored
      * fix: mongo ObjectId should be orderable
      
      Fixes #46259
      
      Mongo ObjectId derive :type/TextLike but that can't be an orderable
      type, so we mark the specific Mongo type as orderable for malli schemas.
      
      * Fix test
      d5601723
    • Sloan Sparger's avatar
      [Bug Fix] Items can be dragged from the Trash into the Trash (#46389) · 46dc7687
      Sloan Sparger authored
      
      * prevents users from moving items to the trash if they are in the trash already and archives instead of moves in cases where item is moved to or from the trash
      
      * reverts detecting if dragging in or out of the trash not setting the collection id, this will be prevented on the BE instead
      
      * adds test coverage for dragging and dropping items to/from/within the trash (one of which is failing until we can make a BE change)
      
      * Throw away `collection_id` when marking archived
      
      This is a hack around a frontend issue. Apparently, the undo
      functionality depends on calculating a diff between the current state
      and the previous state. Sometimes this results in the frontend telling
      us to *both* mark an item as archived *and* "move" it to the Trash.
      
      Let's just say that if you're marking something as archived, we throw
      away any `collection_id` you passed in along with it.
      
      ---------
      
      Co-authored-by: default avatarJohn Swanson <john.swanson@metabase.com>
      46dc7687
    • Ryan Laurie's avatar
      c810c38d
    • Alexander Solovyov's avatar
      fix db switching in ts/with-dbs (#46481) · 64dbaa13
      Alexander Solovyov authored
      mt/with-temp opens transaction which is used by toucan to make requests, so `mt/with-db` had no impact on database used inside of mt/with-temp
      64dbaa13
    • Chris Truter's avatar
      Various hardenings for SQL analysis (#46432) · 39bb33ec
      Chris Truter authored
      ### Description
      
      This change should fix some explosions in stats due to phantom fields, while also making things a bit more rigorous.
      
      - Record the table schema in query_field - especially useful for unknown tables
      - Allow null table names in query_field - they might be phantoms, or they might not
        - We still have the option to filter them out in tools we build on top
      - Tighten up matching logic to consider schema
      39bb33ec
    • Mahatthana (Kelvin) Nomsawadi's avatar
      [Milestone 2] Re-design transparent theme for static embedding and public links (#46428) · 3d5233bc
      Mahatthana (Kelvin) Nomsawadi authored
      
      * Update popover dark theme on part of ParameterFieldWidget (#45813)
      
      * Add filter visual tests
      
      * Simplify embed CSS colors
      
      * [WIP] theme filter popover
      
      * Move theme to global node, so it affects portal too
      
      * Fix embed colors
      
      * Theme part of ParameterFieldWidget
      
      * Add story for parameter with dropdown
      
      * Update loki snapshots
      
      * Update more popover style
      
      * Update loki snapshots
      
      * Remove outdated snapshots
      
      * Update loki snapshots with production build
      
      * Fix loki not working with `userEvent`
      
      * Theme mantine popover
      
      * Improve dark theme text-brand visibility
      
      * Update loki snapshots from master change
      
      * Fix new colors not working in SDK
      
      * Fix flaky Loki tests
      
      * Filter popover dark theme part 2 (#46284)
      
      * Theme Date all options
      
      * wip add month and year filter
      
      * Fix wrong CSS custom property declaration
      
      * Test hover state
      
      * Update Loki snapshots
      
      * Theme date month and year
      
      * Add quarter and year tests
      
      * Theme date single and date range
      
      * Style relative date
      
      * Update frontend/src/metabase/admin/datamodel/components/filters/pickers/DatePicker/DatePickerHeader.styled.tsx
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Complete theming filter popover night mode (#46365)
      
      * Style unit of time and number widget
      
      * Attempt to fix flaky Loki snapshots
      
      * Address white background checkbox on dark theme
      
      * Style search filter single value
      
      * Fix mis color
      
      * Update snapshots
      
      * Remove duplication on play functions since they're long
      
      * Milestone 2 polishing (#46382)
      
      * Matches the footer padding with header padding
      
      * Update snapshots
      
      * Add E2E to prevent further problem
      
      * Try to reduce flaky Loki tests
      
      * Remove unused color shades (#46421)
      
      * Update no results illustration to work better on dark theme
      
      * Update loki snapshots
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      3d5233bc
    • Kamil Mielnik's avatar
      "Reset all filters" button (#46322) · a05452ef
      Kamil Mielnik authored
      * Refactor dashboard helpers to TypeScript
      
      * Reuse existing helper
      
      * Refactor cy.createQuestionAndDashboard to a function helper
      - there was no good place to put it, so I also created new helpers/api directory
      - and I moved all helpers using cy.request (with 1 exception, where a CSV download helper also does a bunch of assertions) in there
      
      * Merge TS command definitions into a single file
      
      * Export types
      
      * Make dashboardDetails optional
      
      * Export StructuredQuestionDetails
      
      * Remove duplicated function
      
      * Extract createNativeQuestion to separate file
      - 1 exported helper per file, no exceptions!
      
      * Reuse const
      
      * Add test for unit of time parameters
      
      * Improve assertions
      
      * Extract createDashboardWithParameters
      
      * Add tests for time parameters
      
      * Fix hardcoded parameter_mappings ids
      
      * Format code
      
      * Extract checkButtonVisible
      
      * Improve test names
      
      * Add tests for location parameters
      
      * Reuse const
      
      * Update test name
      
      * Add WidgetStatusButton
      
      * Add unit tests for WidgetStatusButton
      
      * Rename handler
      
      * Remove redundant assertions
      
      * Add iconSize prop
      
      * Fix styling
      
      * Replace WidgetStatusIcon with WidgetStatusButton
      - Remove WidgetStatusIcon
      
      * Fix tooltip issue
      
      * Fix tooltip for good
      
      * Use default compact button size
      
      * Prevent overflow
      
      * Fix alignment issues in parameter sidebar
      - Remove iconSize prop
      - Simplify StatusConfig
      
      * Update padding in Unit of Time input to make it consistent with other inputs in dashboard parameter sidebar
      
      * Update unit tests
      
      * Rename WidgetStatusButton to WidgetStatus
      
      * Explicitly specify what is a button
      
      * Update helpers in tests
      
      * Update when buttons are displayed according to the new spec, update tests
      
      * Simplify label
      
      * Remove utils
      
      * Adjust padding
      
      * Update reset icon
      
      * Make the button gray when color is undesired
      
      * Remove old definitions
      
      * Add missing export
      
      * Remove unused type
      
      * Add test for location (single value)
      
      * Add test for id (single value)
      
      * Add more assertions
      
      * Add test for id (multiple values)
      
      * Improve name
      
      * Add tests for number (single and multi value)
      
      * Add tests for text (single and multi value)
      
      * Rename file
      
      * Update comment
      
      * Update test name
      
      * Use unique ids
      
      * Use new color name
      
      * Add a test for chevron icons alignment
      
      * Lift className up
      
      * Make types more specific
      
      * Sort attributes
      
      * Revert "Make types more specific"
      
      This reverts commit 2e6994b5.
      
      * Revert "Use new color name"
      
      This reverts commit 2cc68df6.
      
      * Remove TODO
      
      * Introduce editFilter util, refactor chevron assertions to work with any number of chevrons
      
      * Connect label to the default value input in ParameterSettings
      
      * Add a whitespace in the default value label when required "(required)" is shown
      
      * Add parameter sidebar tests for unit of time
      
      * Add parameter sidebar tests for date filters
      
      * Extract checkParameterSidebarDefaultValue
      
      * Add parameter sidebar tests for location - single values
      
      * Add parameter sidebar tests for location - multiple values
      
      * Use constants for test case names
      
      * Add parameter sidebar tests for id parameters - single values
      
      * Add parameter sidebar tests for id parameters - multi values
      
      * Add parameter sidebar tests for number parameters - single values
      
      * Add parameter sidebar tests for number parameters - multi values
      
      * Add parameter sidebar tests for text parameters - single values
      
      * Add parameter sidebar tests for text parameters - multi values
      
      * Extract checkDashboardFilters
      
      * Use checkDashboardFilters in time parameters
      
      * Use checkParameterSidebarDefaultValue in checkDashboardFilters
      
      * Use checkDashboardFilters everywhere
      
      * Sort helpers
      
      * Rename checkDashboardFilters to checkDashboardParameters
      
      * Rename checkOnlyOneButtonVisible to checkStatusIcon
      
      * Add test suite for sql filters, coverage for text filter - single value
      
      * Add a whitespace in the default value label when required "(required)" is shown - SQL filters
      - Similar to 930dd3a5
      
      * Add test suite for sql filters, coverage for number filters
      
      * Add test for sql filters - date
      
      * Remove unused things, rename placeholder to labelOrPlaceholder
      
      * Apply label only to 1 input
      
      * Add test for sql filters - field parameters
      
      * Fix date tests
      
      * Make all sql filters tests work
      
      * Add assertions for required without default in text filters
      
      * Add assertions for required without default in date filters
      
      * Add assertions for required without default in field filters
      
      * Allow clearing required SQL filters without default value
      
      * Add a test to ensure comma-separated numeric values work
      
      * Update unit test
      
      * Update helper
      
      * Update e2e tests
      
      * Use != null and == null checks with defaultValue instead of just checking if its truthy/falsy
      
      * Run `yarn test-visual:loki` and then `yarn loki approve`
      - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069
      
      * Add button boilerplate
      
      * Add getCanResetFilters selector
      
      * Move canResetFilters to utils
      
      * Add explicit return types
      
      * Implement the button action
      
      * Rename
      
      * Simplify action
      
      * Optimize: use single action
      
      * Use parameterHasNoDisplayValue to account for empty strings
      
      * Run `yarn test-visual:loki` and then `yarn loki approve` after merging master
      - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069
      
      * Rename getHiddenParameterSlugs to getTabHiddenParameterSlugs
      
      * Take all tabs into account
      
      * Add unit tests for canResetFilter
      
      * Format test name
      
      * Fix non-human-friendly aria-label
      
      * Add assertions for "Reset all filters" button's visibility
      
      * Unnest helpers from describe
      
      * Add a test for comma-separated values
      
      * Improve typing
      
      * Fix typing
      
      * Add tests for multiple tabs and auto-apply-filters on/off
      
      * Improve test name
      
      * Remove redundant util
      
      * Remove redundant condition
      
      * Verify card results get filtered
      
      * Test that all tabs are affected
      
      * Fix test case with autoApplyFilters: false
      
      * Add tests for resetting to default value
      
      * Fix wrong initial state in reduce
      
      * Fix updated parameters not being applied
      
      * Add reset all filters assertions
      
      * Remove unused attribute
      
      * Run `yarn test-visual:loki` and then `yarn loki approve`
      - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069
      
      * Run `yarn test-visual:loki` and then `yarn loki approve`
      - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069
      a05452ef
Loading