Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 04, 2023
  2. Oct 03, 2023
    • Cam Saul's avatar
      Misc drill thru fixes :wrench: (#34231) · 8224e5b6
      Cam Saul authored
      Unverified
      8224e5b6
    • Jacob Joseph's avatar
      Update expressions-list.md (#34263) · 09e3777a
      Jacob Joseph authored
      added an example of rounding with a decimal place
      Unverified
      09e3777a
    • Ryan Laurie's avatar
    • Braden Shepherdson's avatar
      Fix `yarn dev-ee` with new CLJS setup (#34319) · 21a70290
      Braden Shepherdson authored
      `yarn dev` had been adjusted to use `build-hot:js-wait` (which waits for the first CLJS compilation to be done), but `yarn dev-ee` had not been changed, so its JS compilation ran too early, failed, and never re-ran.
      
      We actually had this broken behavior (JS build runs too early, CLJS build completes, JS build fails, JS build notices new inputs and re-runs) for a long time. But since it fixed itself when the JS build re-ran, it didn't cause any issues. Now that the JS build no longer watches the CLJS output for changes, the CLJS output needs to be there for the first JS build.
      Unverified
      21a70290
    • Tim Macdonald's avatar
    • Ibe Dwi's avatar
      Add color to `ExpandButton` when moving collection (#33846) · bdbbb61d
      Ibe Dwi authored
      * fix: add ExpandButton color on parent's hover
      
      * fix: icon's color by canSelect, remove !important
      
      * feat: update expand button style on canSelect props
      
      * fix: icon button color when hovered
      Unverified
      bdbbb61d
    • Anton Kulyk's avatar
      Add more E2E tests around joins (#34252) · 3715839c
      Anton Kulyk authored
      * Test using columns from joined tables or cards
      
      * Test multi stage joins
      
      * Test removal on source table change
      
      * Test RHS table column selection
      
      * Reduce flakiness?
      
      * Fix test
      
      * Reduce flakiness?
      Unverified
      3715839c
    • Kamil Mielnik's avatar
      Add custom warning message when leaving creating/editing a DB connection (#34272) · 124a6a3d
      Kamil Mielnik authored
      * Use LeaveConfirmationModal in QueryBuilder
      
      * Add isLocationAllowed prop to LeaveConfirmationModal
      
      * Do not route-block running modified native question
      
      * Fix typo
      
      * Introduce explanatory variables
      
      * Move updating URL during question creation to QueryBuilder
      
      * Schedule navigation to after re-render so that LeaveConfirmationModal prop has a chance to update
      
      * Add a test for unsaved changes warning
      
      * Introduce useCallbackEffect
      
      * Refactor QueryBuilder to use useCallbackEffect
      
      * Refactor ActionCreator to use useCallbackEffect
      
      * Fix useCallbackEffect typing
      
      * Move onSubmit out of the scheduled callback to reduce probability of race conditions
      
      * Add comments explaining useCallbackEffect usage
      
      * Improve JSDocs
      
      * Add a test for running modified question
      
      * Update button query to more accessible one
      
      * Add a test for saving a modified question
      
      * Update test names
      
      * Add a test for leaving with no changes
      
      * Remove isDirty-related no-change assertions, as isDirty flag does not work reliably
      - Question.prototype.isDirtyComparedTo would return true because edited "question"
        would have extra "description: null" attribute and no "name" compared to
        "originalQuestion" (see "getIsDirty")
      
      * Move useCallbackEffect to its own directory
      
      * Add test setup for useCallbackEffect
      
      * Add a test case for scheduling
      
      * Add a test for scheduling callback effect
      
      * Do not disable navigation in models
      - this is a temporary condition until #33793 is implemented
      
      * Remove redundant _.noop
      
      * Rename isScheduled to isCallbackScheduled
      
      * Replace useBeforeUnload with LeaveConfirmationModal in DatabaseEditApp
      
      * Refactor DatabaseEditApp.unit.spec.js to TypeScript
      
      * Add initialRoute param, return history & add /home route
      
      * Add a test case for showing the unsaved changes modal
      
      * Add a test case for not showing the unsaved changes modal
      
      * Format code
      
      * Extend a test case to assert isDirty being properly computed
      
      * Remove redundant route
      
      * Remove redundant code
      
      * Add a test for custom warning modal when saving edited question as a new one
      
      * Redirect to databases page on database creation in component so that isDirty flag can re-compute on re-render
      
      * Fix mocks setup
      
      * Remove redundant withRouter usage
      
      * Use waitFor + expect + not.toBeInDocument instead waitForElementToBeRemoved
      
      * Add a test case for creating new database connection
      
      * Remove redundant promise
      Unverified
      124a6a3d
    • Cal Herries's avatar
    • Nemanja Glumac's avatar
    • Aleksandr Lesnenko's avatar
      fix Arabic translations (#34295) · 65373df6
      Aleksandr Lesnenko authored
      Unverified
      65373df6
  3. Oct 02, 2023
    • Ryan Laurie's avatar
      Automated Releases from CI :rocket: (#33938) · 15f82914
      Ryan Laurie authored
      Unverified
      15f82914
    • Braden Shepherdson's avatar
      Enable ClojureScript REPL and hot reloading of CLJS code (#34007) · 8e298158
      Braden Shepherdson authored
      This also moves the CLJS output out of `frontend/src/cljs{,_release}` to
      `target/cljs_{dev,release}`. If that causes problems for FE tooling I
      don't know about, it could be moved back.
      
      Hot reloading:
      CLJS changes are hot-reloaded into the running app by Shadow CLJS - no
      action is needed. Note that the UI will not refresh; you usually have to
      click around so the updated MLv2 code gets executed.
      
      Usage of the CLJS REPL:
      - Open the browser (you should see `shadow-cljs: #N ready!` in console)
      - Connect to nrepl on 50655
      - "Select" the `:app` build;
          - https://shadow-cljs.github.io/docs/UsersGuide.html#_editor_integration
          - Conjure: `:ConjureShadowSelect app`
          - Plain REPL: Eval in CLJ mode `(shadow/repl :app)`
      - Consider running `yarn build-hot:cljs` and `yarn build-hot:js` in
        separate terminals; then when `yarn build-hot:js` crashes you don't
        have to reconnect your REPL.
      - The REPL works beautifully, even loading files outside the :entries
        of the shadow-cljs build like tests!
      
      "Stale" error in browser:
      - This can happen if the webpack bundle is created before the CLJS is
        done building.
      - If you ran `yarn build-hot:cljs` and `:js` separately, let `:cljs`
        finish compiling first.
      - If you see this otherwise: (a) contact Braden so it can be fixed; and
        (b) either restart `build-hot:js` or force webpack to rebuild by
        hitting http://localhost:8080/webpack-dev-server/invalidate
      
      Yarn commands:
      `dev`, `dev-ee`, `build-hot`, and `build-static-viz:watch` all now wait
      for the CLJS build to be complete by watching for files to be generated.
      They should work the same from a user's POV.
      
      (Since the webpack build no longer watches the CLJS output,
      it won't notice the changes and immediately rebuild after the first
      build. This avoids errors on the clean build, or "stale build" messages
      in the app from Shadow CLJS.)
      
      Fixes #32674.
      Unverified
      8e298158
    • Uladzimir Havenchyk's avatar
      Drop unused typings (#33851) · 89729a8d
      Uladzimir Havenchyk authored
      Unverified
      89729a8d
    • Cal Herries's avatar
    • Uladzimir Havenchyk's avatar
    • Jeff Bruemmer's avatar
      Unverified
      97b9af4d
    • Alexander Polyankin's avatar
    • Anton Kulyk's avatar
      Clean up join E2E tests (#34253) · c0d707e3
      Anton Kulyk authored
      * Add `dashboardGrid` E2E helper
      
      * Add test ID for x-ray dashboard header
      
      * Extract 14793 repro to its own file
      
      * Extract 15578 repro to its own file
      
      * Remove duplicate 17968 repro
      
      * Clean up 17968 repro
      
      * Clean up test
      
      * Clean up test
      
      * Clean up test
      
      * Clean up test
      
      * Clean up test
      
      * Clean up test
      
      * Sort imports
      
      * Use shared helpers for join tests
      
      * Extract 12928 repro to its own file
      
      * Minor renames
      
      * Fix `join` e2e helper
      
      * Fix `assertQueryBuilderRowCount` for count > 1000
      
      * Make table check optional in `assertJoinValid`
      
      * Clean up test
      
      * Fix `join` helper
      
      * Fix 17968 test
      
      * Fix 30058 and 32075 tests
      
      * Reduce flakiness?
      Unverified
      c0d707e3
    • Uladzimir Havenchyk's avatar
    • Kamil Mielnik's avatar
      Add custom warning message when leaving editing an existing SQL question (#34084) · f7bf0234
      Kamil Mielnik authored
      * Use LeaveConfirmationModal in QueryBuilder
      
      * Add isLocationAllowed prop to LeaveConfirmationModal
      
      * Do not route-block running modified native question
      
      * Fix typo
      
      * Introduce explanatory variables
      
      * Move updating URL during question creation to QueryBuilder
      
      * Schedule navigation to after re-render so that LeaveConfirmationModal prop has a chance to update
      
      * Add a test for unsaved changes warning
      
      * Introduce useCallbackEffect
      
      * Refactor QueryBuilder to use useCallbackEffect
      
      * Refactor ActionCreator to use useCallbackEffect
      
      * Fix useCallbackEffect typing
      
      * Move onSubmit out of the scheduled callback to reduce probability of race conditions
      
      * Add comments explaining useCallbackEffect usage
      
      * Improve JSDocs
      
      * Add a test for running modified question
      
      * Update button query to more accessible one
      
      * Add a test for saving a modified question
      
      * Update test names
      
      * Add a test for leaving with no changes
      
      * Remove isDirty-related no-change assertions, as isDirty flag does not work reliably
      - Question.prototype.isDirtyComparedTo would return true because edited "question"
        would have extra "description: null" attribute and no "name" compared to
        "originalQuestion" (see "getIsDirty")
      
      * Move useCallbackEffect to its own directory
      
      * Add test setup for useCallbackEffect
      
      * Add a test case for scheduling
      
      * Add a test for scheduling callback effect
      
      * Do not disable navigation in models
      - this is a temporary condition until #33793 is implemented
      
      * Remove redundant _.noop
      
      * Rename isScheduled to isCallbackScheduled
      
      * Remove redundant route
      
      * Remove redundant code
      
      * Add a test for custom warning modal when saving edited question as a new one
      Unverified
      f7bf0234
    • Braden Shepherdson's avatar
      [MLv2] Allow any type of arguments to :concat expressions (#34157) · 86f405a0
      Braden Shepherdson authored
      The QP supports this - it appears that every type can be `concat`-ed and
      it will coerce the values to some kind of string - numbers, dates,
      booleans, etc.
      Unverified
      86f405a0
    • Anton Kulyk's avatar
      Migrate notebook's data step to MLv2 (#34256) · bca9d35f
      Anton Kulyk authored
      * Add `displayInfo` types for cards and tables
      
      * Add TypeScript wrapper for `withDifferentTable`
      
      * Move fields tests under their own `describe`
      
      * Clean up the fields picker
      
      * Add extra test coverage
      
      * Fix missing import
      
      * Fix type
      
      * Migrate `DataStep` to MLv2 (mostly)
      
      * Fix creating a new query
      Unverified
      bca9d35f
  4. Sep 29, 2023
    • Case Nelson's avatar
    • Nemanja Glumac's avatar
      Optimize changed files check for the backend.yml workflow (#34209) · c13328df
      Nemanja Glumac authored
      Before
      1. prepare-frontend
      2. prepare-backend
      3. build-static-viz
      4. files-changed-check
      5. static-viz-files-changed-check
      
      So, we're doing all these expensive operations before the step 4, even though they might not even be necessary.
      If files changed already outputs backend_all, this means we have to run these tests whether or not there were static-viz changes.
      
      After
      1. test which files changed
          - if backend_all output -> skip static-viz-bundle and start running tests straight away
          - else if there are no direct backend changes, have an additional check for static-viz
      2. static-viz-files-changed
          - if true -> run tests
          - else -> skip tests
      Unverified
      c13328df
    • Mark Bastian's avatar
      This is a small set of changes pulled from another PR whose contents (#34228) · 92faa8e2
      Mark Bastian authored
      probably won't be merged. The intent of these changes is to be
      explicit in what is passed into each of the card creation functions,
      ensure consistency of types, and eliminate redundant or non-required
      arguments.
      
      `build-dashcard` was the target of this simplification. The
      `available-values` argument is no longer necessary as that data is
      sourced from other arguments. the `satisfied-*` arguments are no
      longer seqs of satisfied filter, metric, and dimension definitions,
      but maps of names of those items to the definitions. This is only
      needed because satisfied metrics needs metrics names when adding
      metadata. However, all values were modified into a consistent shape.
      
      In other areas, if an aggregate object with several keys is passed
      to a function that uses only one element of the object, only the
      inner element is passed.
      
      In card-candidates, `:matches` is dissoced from `satisfied-dimensions`
      to remove the extra payload that isn't needed in that argument.
      This makes it clear that satisfied field values are passed into card
      creation functions via the `satisfied-bindings` and not cruft from
      earlier stage.
      
      As an aside, one potential fix that would substantially improve the
      readibility of this entire codebase would be to move the element
      names in the one key to value maps as is done for dimensions,
      metrics, filters, and cards into the elements as a named key.
      Carrying that shape forward from the yaml files requires a ton of
      first this or zipmap that to recover the names into whatever the
      current context is.
      Unverified
      92faa8e2
    • Denis Berezin's avatar
      Fix flaky ActionViz unit tests (#34250) · 6e5b6a7b
      Denis Berezin authored
      Unverified
      6e5b6a7b
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Fix overlapping x-tick labels on static viz timeseries charts (#33707) · 70355597
      Mahatthana (Kelvin) Nomsawadi authored
      
      * Fix overlapping x-tick labels on static viz timeseries charts
      
      * Address review: make the condition easier to understand + fix failed cases
      
      * Update frontend/src/metabase/static-viz/components/XYChart/utils/ticks.ts
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Add a comment to explain why we have to fix timeseries ticks
      
      ---------
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      Unverified
      70355597
Loading