Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 09, 2024
  2. Feb 08, 2024
    • Braden Shepherdson's avatar
      [MLv2] Use the provided `column-ref` for drills (#38047) · f47b0ae1
      Braden Shepherdson authored
      There are cases where the ref as provided is not the same as what a
      fresh `(lib.ref/ref column)` would give. This seems mostly to affect
      models, where the metadata leaks some of the underlying details like
      joins.
      
      Fixes #38034.
      Unverified
      f47b0ae1
    • Kyle Doherty's avatar
    • Kyle Doherty's avatar
      Update default sizes for new dash width (#38450) · d7c4fdd3
      Kyle Doherty authored
      
      * Migration adding 'width' to Dashboards
      
      3 migrations:
       - 1st adding the width column with default value of 'fixed'
       - 2nd updating all existing dashboards to have width 'full', which corresponds to what the current behaviour is (will
       be the 'old' behaviour after the fixed-width project lands).
         - The rolloback here is necessary but we don't care what happens as the column will be dropped immediately in the
         next rollback anyway
       - 3rd sets the notNullableConstraint. DefaultNull is 'full' here, just in case there's an existing dashboard whose
       width value is not yet set from the 1st migration. Don't know how that could happen, but its here in case
      
      * Dashboard PUT api endpoint accepts width changes and updates appdb
      
      update-dashboard function now is aware of the :width key so those changes can end up in the transaction.
      
      Also added a width test that asserts that the value's default is "fixed", it can be changed, eg. to "full", but cannot
      be changed to other values.
      
      * Add width to revision tests
      
      * Fix dashboard revision tests.
      
      :width key is now needed in some revision tests. As well we need a string communicating that the :width setting has
      changed from 'full' to 'fixed' or vice-versa.
      
      * Fix comments/remarks in migration to be accurate
      
      * Attempt to fix default not working mysql/mariadb
      
      * Set default in dashboard model
      
      Signed-off-by: default avatarAdam James <adam.vermeer2@gmail.com>
      
      * Revert default :width 'fixed' value.
      
      * Explicitly add default value 'fixed' for MySQL/MariaDB
      
      * dashboard fixed width FE implementation
      
      * adjust popover shadow styling as the popover was blending in with the header
      
      * adjust extra button popover offset
      
      * add E2E to validate behavior
      
      * add fixed width container to public dashboards
      
      * fix public embedding not respecting dashboard width setting
      
      * add test for public dashboards
      
      * Fix embed test failures
      
      * add fixed width to x-ray dashboards
      
      * reduce code duplication
      
      * move FixedWidthContainer into DashboardGridConnected
      
      - We get the fixed-width w/o code duplication across AutomaticDashboardApp, PublicDashboard, and Dashboard
      
      * update E2E tests to reflect actual intended behavior
      
      * fix type errors
      
      * tweak default width of cards to accomodate fixed width
      
      * adjust tooltip button after merging changes from master
      
      * fix bar chart test failure
      
      * fix dashboard filters date test failure
      
      - new ellipsis button in dashboard edit mode broke the test
      
      * adjust test for new fixed width dashboards
      
      * adjust test for new fixed width dashboards
      
      * adjust test for new fixed width dashboards
      
      * bump funnel default width
      
      * adjust test for new fixed width dashboards
      
      * Fix double overlay for LineAreaBarChart dash-cards
      
      - No longer has an overlay that persists from editing mode to  viewing mode
      - Adjust click-behavior tests to account for new grid-width. Old test relied on a dashcard being taller than they will now default to being. i.e. Move the chosen point/row to down an index.
      
      * Merge FixedWidthContainer with dashboard grid div
      
      * supress brush events while editing timeseries line charts on dashboard
      
      * fix failing test
      
      - test failed because I did not update this assertion based on previous changes
      
      * fix broken link input in editing mode
      
      * fix pointer events issue on text cards in edit mode
      
      * update tests for new dash-card default sizes
      
      * update tabs card moving test because of new default card sizes
      
      ---------
      
      Signed-off-by: default avatarAdam James <adam.vermeer2@gmail.com>
      Co-authored-by: default avatarAdam James <adam.vermeer2@gmail.com>
      Co-authored-by: default avataradam-james <21064735+adam-james-v@users.noreply.github.com>
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
      Unverified
      d7c4fdd3
    • Anton Kulyk's avatar
      Fix card query endpoint usage on dashboards (#38547) · 83aeb32c
      Anton Kulyk authored
      * Don't reload dashcards in edit mode
      
      * Update and unskip repro
      
      * Extend "duplicate tab" e2e test
      
      * Fix implicit request body schema when fetching dashcard data
      
      * Disable dashcard data refetching in edit mode
      
      * Revert `Dashboard` useEffect changes
      
      * Fix tests
      Unverified
      83aeb32c
    • Raphael Krut-Landau's avatar
    • Nicolò Pretto's avatar
      Meet embedders - minimal version (#38520) · d88d32e5
      Nicolò Pretto authored
      
      * refactor: prepare SettingsPage to have conditionally rendered steps (#38201)
      
      * refactor: prepare SettingsPage to have conditionally rendered steps
      
      * fix tests missing props
      
      * Usage reason question (#38267)
      
      * Invactive -> Inactive
      
      * add question
      
      * fix e2e test
      
      * small refactor
      
      * Update frontend/src/metabase/setup/components/UsageQuestionStep/UsageQuestionStep.tsx
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      * Hide "Add your data" step for people interested in embedding (#38390)
      
      * hide 'Add your data' step when user is interested in embedding
      
      * add other test cases
      
      * refactor: create selector
      
      * address pr feedback
      
      * adds minimal embed focused homepage (#38402)
      
      * very minimal homepage
      
      * fixed text color
      
      * minimal e2e + actual logic that i forgot lol
      
      * refactor the list to not have the numbers in the content
      
      * rename util functions
      
      * use button to have cursor when hovering + accessibility
      
      * refactor: move the waitFor inside the submit step
      
      * fix: make sure state is clean on multiple installs in a row
      
      * test: check that the homepage persists reload + removed typos
      
      * rename s to state
      
      * moved util functions up to home/utils.ts
      
      * adds key to avoid react warning
      
      * refactor and tests for [meet embedders] (#38465)
      
      * test: check all numbered steps during the setup flow
      
      * refactor: introduce getSteps and start using the step name instead of a number to identify steps
      
      * refactor: remove map of the steps, use step names directly
      
      * refactor: getNextStep
      
      * include 'hidden' steps in getSteps so that it won't mess up with analytics
      
      * fix after rebase issue
      
      * use full name instead of s, s -> step
      
      * analytics for meet-embedders (#38521)
      
      * refactor: extract schema version and onboarding version into constants
      
      * remove old ga events
      
      * trackUsageReasonSelected
      
      * update trackStepSeen to send the correct index
      
      * copy old schema for better diff
      
      * adds new snowplow event for usage_reason step
      
      * schema and e2e update for usage_reason_selected
      
      * adds utm tag to the link in the minimal embed homepage
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Unverified
      d88d32e5
    • Nemanja Glumac's avatar
    • bryan's avatar
      load analytics only when changed using a checksum (#38280) · 9e1e8e8e
      bryan authored
      * load analytics only when changed using a checksum
      
      - over audit deserialization files
      
      * update docstrings
      
      * fix testing wording
      Unverified
      9e1e8e8e
    • Uladzimir Havenchyk's avatar
      Avoid unnecessary re-renderings in because of getQuestions selector (#38548) · 179a5d22
      Uladzimir Havenchyk authored
      * Avoid unnecessary re-renderings in DashboardSharingEmbeddingModal
      
      * Add deep equal selector
      
      * drop underscore
      Unverified
      179a5d22
    • Case Nelson's avatar
      Fix time-interval against expressions (#38488) · 43176411
      Case Nelson authored
      * Fix time-interval against expressions
      
      When simplifying time-interval filters, we forgot to place a
      temporal-unit on expressions, which meant that the date-trunc used by
      quarters had to match the date exactly rather than being in the interval
      range.
      
      * Update optimize temporal filters for expressions
      
      There is a dependency with this middleware and mongo. Without
      optimization mongo cannot compare the bucketed timestamps because
      AFAICT mongo 4 doesn't have date truncation so we do so in clojure for
      the compared literal but cannot do the lhs field/expression.
      Unverified
      43176411
    • Nemanja Glumac's avatar
      [QC] Remove `setDatabase` and `setDatabaseID` methods (#38550) · 43c1895a
      Nemanja Glumac authored
      * Remove `setDatabaseID` method from the `StructuredQuery` prototype
      
      * Remove `setDatabase` method from both Native and Structured queries
      Unverified
      43c1895a
    • John Swanson's avatar
      bump toucan2 dependency (#38527) · c141463e
      John Swanson authored
      pulling in https://github.com/camsaul/toucan2/pull/162 to fix #38516
      Unverified
      c141463e
    • Anton Kulyk's avatar
      Dashboard sections (#38463) · 19ca99e1
      Anton Kulyk authored
      
      * Add `ADD_MANY_CARDS_TO_DASH` action
      
      * Reuse `NewDashCardOpts` type
      
      * Extract `DashboardCardLayoutAttrs` type
      
      * Add basic `DashCardPlaceholder` viz
      
      * Add section layouts
      
      * Add `addSectionToDashboard` redux action
      
      * Add `SectionLayoutPreview` component
      
      * Add "Add section" button to dashboard header
      
      * Allow placeholder cards in `replaceCard`
      
      * Make heading cards transparent by default
      
      * Fix layout fn usage
      
      * Update mapping UI for placeholder cards
      
      * Fix tooltips position
      
      * Add `createMockPlaceholderDashboardCard`
      
      * Test `replaceCard` works with placeholder cards
      
      * Extract common `setup` from cards actions tests
      
      * Add `createMockDashboardTab`
      
      * Add unit tests for `addSectionToDashboard`
      
      * Placeholder cards work for emails/pulses
      
      Dashboards with placeholder cards now properly email rather than throwing an exception. Placeholder cards themselves are not sent as part of the email as they are empty.
      
      * Merge remote-tracking branch 'origin/38209-dashboard-sections' into 38209-dashboard-sections
      
      * Adding tests for placeholder cards and empty dashboards
      
      * Fix parameter mappings UI
      
      * Update section card sizes
      
      * Clean up
      
      * Add button label
      
      * Add E2E test
      
      * Revert
      
      * Reorder
      
      * Fix menu position
      
      * Assert placeholder card doesn't have a button
      
      * Fix menu tooltips
      
      * Fixing unit tests
      
      * Removed dangling code
      
      * Fixing unit tests
      
      * Remove virtual cards handling from `replaceCard`
      
      ---------
      
      Co-authored-by: default avatarMark Bastian <markbastian@gmail.com>
      Unverified
      19ca99e1
    • Alexander Solovyov's avatar
    • Nemanja Glumac's avatar
    • Nemanja Glumac's avatar
      [MLv2] Migrate `usesSegment` using new question filter from the `GET /api/card endpoint` (#38500) · 1e560c39
      Nemanja Glumac authored
      * Rewrite `SegmentQuestions` to use new question filter
      
      * Remove unused Question method
      
      * Remove unused selector
      
      * Convert `SegmentQuestions` to a functional component
      
      * Remove unused underscore import
      
      * Extract `getDescription()` to utils
      
      * Fix unused vars
      
      * Remove superfluous argument from `useQuestionListQuery` invocation
      Unverified
      1e560c39
    • Nemanja Glumac's avatar
      [MLv2] Migrate `usesMetric` using new question filter from the `GET /api/card` endpoint (#38481) · aa5dcd73
      Nemanja Glumac authored
      * Rewrite `MetricQuestions` to use new question filter
      
      * Remove unused selector
      
      * Remove unused Question method
      
      * Convert `MetricQuestions` to a functional component
      
      * Expose new methods on the `Question` prototype
      
      * Use new Question methods in `MetricQuestions`
      
      * Fix implicit return
      
      * Mark `metric` prop as required
      Unverified
      aa5dcd73
    • Nemanja Glumac's avatar
      [QC] Remove `hasAnyClauses` method from `StructuredQuery` prototype (#38525) · 707f1404
      Nemanja Glumac authored
      * [QC] Remove `hasAnyClauses` method from the `StructuredQuery` prototype
      
      * [QC] Remove `hasExpressions` method from the `StructuredQuery` prototype
      
      * [QC] Remove `hasFilters` method from the `StructuredQuery` prototype
      
      * [QC] Remove private `hasSorts` method from the `StructuredQuery` prototype
      
      * [QC] Remove `hasLimit` method from the `StructuredQuery` prototype
      
      * [QC] Remove private `indexOfField` method from the `StructuredQuery` prototype
      Unverified
      707f1404
  3. Feb 07, 2024
    • Jesse Devaney's avatar
      Milestone 1: Default Dashboard Body to a Fixed Width (#38377) · 2c71bf0d
      Jesse Devaney authored
      
      * dashboard fixed width FE implementation
      
      * adjust popover shadow styling as the popover was blending in with the header
      
      * adjust extra button popover offset
      
      * add E2E to validate behavior
      
      * add fixed width container to public dashboards
      
      * fix public embedding not respecting dashboard width setting
      
      * add test for public dashboards
      
      * Fix embed test failures
      
      * add fixed width to x-ray dashboards
      
      * reduce code duplication
      
      * move FixedWidthContainer into DashboardGridConnected
      
      - We get the fixed-width w/o code duplication across AutomaticDashboardApp, PublicDashboard, and Dashboard
      
      * update E2E tests to reflect actual intended behavior
      
      * fix type errors
      
      * adjust tooltip button after merging changes from master
      
      * fix bar chart test failure
      
      * fix dashboard filters date test failure
      
      - new ellipsis button in dashboard edit mode broke the test
      
      * adjust test for new fixed width dashboards
      
      * adjust test for new fixed width dashboards
      
      * adjust test for new fixed width dashboards
      
      * adjust test for new fixed width dashboards
      
      * Fix double overlay for LineAreaBarChart dash-cards
      
      - No longer has an overlay that persists from editing mode to  viewing mode
      - Adjust click-behavior tests to account for new grid-width. Old test relied on a dashcard being taller than they will now default to being. i.e. Move the chosen point/row to down an index.
      
      * Merge FixedWidthContainer with dashboard grid div
      
      * supress brush events while editing timeseries line charts on dashboard
      
      * fix failing test
      
      - test failed because I did not update this assertion based on previous changes
      
      ---------
      
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
      Unverified
      2c71bf0d
    • Mark Bastian's avatar
      Update default Metabot model (#38491) · 8dc7f17f
      Mark Bastian authored
      * Update default Metabot model
      
      The default GPT-based Metabot model has been `"gpt-4"`. This model is no longer state of the art, has a limit of 8,192 tokens, and is priced at input: $0.03/ktoken and output: $0.06/ktoken.
      
      `"gpt-4-turbo-preview"`, which points internally to `"gpt-4-0125-preview"` is the current state of the art, has a limit of 128,000 tokens, and is priced at input: $0.01/ktoken and output: $0.03/ktoken.
      
      This should solve any issues of reasonable cases of token limit failures (e.g. [Metabot 2.0 failing when context length exceeded](https://github.com/metabase/metabase/issues/29932)) without needing to do any extra handling on the backend.
      
      For more info on the models, token limits, and pricing, see:
      - [OpenAI model docs](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo)
      - [OpenAI pricing](https://openai.com/pricing)
      
      * whitespace
      
      * Removing irrelevant settings test
      Unverified
      8dc7f17f
    • Anton Kulyk's avatar
      Convert `cards` dashboard actions to TypeScript (#38447) · 2d4ea257
      Anton Kulyk authored
      * Convert `addDashCardToDashboard` to TypeScript
      
      * Convert `addCardToDashboard` to TypeScript
      
      * Convert `addMarkdownDashCardToDashboard` to TypeScript
      
      * Convert `addHeadingDashCardToDashboard` to TypeScript
      
      * Convert `addLinkDashCardToDashboard` to TypeScript
      
      * Convert misc actions to TypeScript
      
      * Fix types
      
      * Move card utils to `metabase/dashboard/utils`
      
      * Improve types
      
      * Exclude `undefined` from `dashboard_tab_id` type
      Unverified
      2d4ea257
    • Emmad Usmani's avatar
      Unverified
      7ae05d9c
    • Uladzimir Havenchyk's avatar
      Add questions caching layer to improve dashboard performance after migration to MLv2 (#38425) · 80b59589
      Uladzimir Havenchyk authored
      * Apply performance tweaks during dashboard editing
      
      * Revert one change for tests
      
      * Fix unit test
      
      * reapply fix
      
      * Try another improvement
      
      * Revert "Adding cache stats to metabase.lib.cache"
      
      This reverts commit dc32be74.
      
      * Fix unit test
      
      * More question caching
      
      * Revert "Revert "Adding cache stats to metabase.lib.cache""
      
      This reverts commit 4eea6a12.
      
      * Cache questions
      
      * Pass object
      
      * Reuse questions
      
      * Fix unit tests
      
      * Fix unit tests
      
      * Resolve conflicts
      
      * Reuse questions in autowire
      
      * fix typecheck
      
      * json.stringify -> toString
      
      * naming cleanup
      
      * Support multi-series dashboards
      
      * cleanup
      
      * cleanup
      
      * Fix typecheck
      
      * Use only unique targets
      
      * Address comments
      Unverified
      80b59589
    • Romeo Van Snick's avatar
      Migrate info hover card to mantine (#38433) · 0002d2ca
      Romeo Van Snick authored
      Add HoverCard to metabase/ui and converts FieldInfoPopover to make use of it.
      
      Add DelayGroup helper, which can be used to make sure there are no delays when hovering similar items in the same group.
      Unverified
      0002d2ca
    • Anton Kulyk's avatar
    • Nemanja Glumac's avatar
      [QC] Remove unused `clean` method from the query prototype (#38508) · ff62088a
      Nemanja Glumac authored
      * Remove unused `canRemove` method from `Aggregation` prototype
      
      * Remove unused `clean` method from the `StructuredQuery` prototype
      
      * Remove unused `cleanNesting` method from the `StructuredQuery` prototype
      
      * Remove unused `_cleanEmpty` method from the `StructuredQuery` prototype
      
      * Remove unused private methods from the `StructuredQuery` prototype
      
      - cleanJoins
      - cleanExpressions
      - cleanFilters
      - cleanFields
      
      And the underlying
      - _cleanClauseList
      
      * Remove `clean` method from `NativeQuery` and `Query` prototypes
      Unverified
      ff62088a
    • Anton Kulyk's avatar
      Clean up dashboard card types (#38444) · 12db70dc
      Anton Kulyk authored
      * Add standalone `VirtualDashboardCard` type
      
      * Rename `DashboardCard` to `QuestionDashboardCard`
      
      * Add new `DashboardCard` type
      
      * Move `ActionDashboardCard` type def to dashboard types file
      
      * Rename `isQuestionDashCard` type guard
      
      * Fix `isQuestionDashCard` type guard
      
      * Avoid type-casting for `getVisualizationRaw`
      
      * Use type guard for dashcard `series` attr
      
      * Avoid type casting in parameter mapping utils
      
      * Fix type casting
      Unverified
      12db70dc
    • Nemanja Glumac's avatar
      [QC] Remove unused metabase-lib (v1) utilities (#38504) · 495e88a5
      Nemanja Glumac authored
      * Remove unused `clearSegments` utils
      
      * Remove unused `clearFilters` utils
      
      * Remove unused `clearAggregations` utils
      
      * Remove unused `clearExpressions` utils
      
      * Remove unused `hasValidBreakout` method from the `StructuredQuery`
      
      The util with the same name was defined in `metabase-lib/queries/utils/`
      Unverified
      495e88a5
    • Luis Paolini's avatar
      Update running-metabase-on-elastic-beanstalk.md (#38478) · ff092422
      Luis Paolini authored
      add a comment about enterprise version
      Unverified
      ff092422
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Fix ESlint rules (#38458) · 8cd9b604
      Mahatthana (Kelvin) Nomsawadi authored
      * Fix ESlint from the result of upgrading ESLint package
      
      * Support `component` prop on Mantine
      
      * Prevent accidental ESLint log in Cypress
      
      * Upgrade ESLint rule
      Unverified
      8cd9b604
  4. Feb 06, 2024
Loading