Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 07, 2021
  2. Jun 04, 2021
  3. Jun 03, 2021
    • Noah Moss's avatar
    • Howon Lee's avatar
      Audit optimization for questions (#16220) · e8378db3
      Howon Lee authored
      
      Peeps want to make questions faster, but we don't give the data about query execution in a very user-friendly way. Here's it in a user-friendly way.
      
      Co-authored-by: default avatarAlexander Lesnenko <alxnddr@users.noreply.github.com>
      Unverified
      e8378db3
    • dpsutton's avatar
      Paginated collection metadata (#16275) · 8e3b4ad8
      dpsutton authored
      * Add the last-edit-info to the child query
      
      just for cards right now, need to extend to dashboards and then make
      sure we clean it up into the proper map.
      
      Have a set of all columns that are required and ensure those are in
      each query. Nulls need to be cast to the correct type if they aren't a
      text column (at least on postgres, need to investigate h2 and mysql).
      
      * Correct find last-edit-info for cards and dashboards
      
      * Move from group-by max id to self join
      
      * Paginate and search on collection items
      
      - include the metadata information in the query
        - to accomplish this, make a backstop to add all columns into each
          query
        - need types to union the null. in postgres it assumes all nulls are
          text. Haven't checked what mysql and h2 do here yet
      - sort_column: name, last_edited, model
      - sort_direction: asc, desc
      
      * Add default sort column and direction
      
      * handle mysql
      
      mysql doesn't need types on nulls to unify them
      
      * Correct batch post processing for cards and dashboards
      
      * Correct order of expectations
      
      they were alphabetical inside of models
      previous order:
      - acme products           | pulse
      - electro-magnetic pulse  | pulse
      - birthday card           | card
      - dine & Dashboard        | dashboard
      
      and is now ordered solely by name
      
      * Tests and sort on lower name after timestamp
      
      When sorting by last edited, lots of things don't have this, so don't
      want arbitrary sorting, but sort by name afterwards
      
      * Ensure nulls go to the end of the list
      
      * Tests
      
      * trying to make h2, mysql, and pg happy
      
      sorting timestamps and always having nulls last is quite difficult
      
      * Make diff bigger
      
      this was going in as a string and losing the timezone information, so
      was actually advancing time.
      
      Now: (java.time.OffsetDateTime/now)
      "2021-06-01T13:59:33.165483Z"
      
      Minus 2 hours: (.minusHours (java.time.OffsetDateTime/now) 2)
      "2021-06-01T11:59:27.528500Z"
      
      As seen in the code:
      ;; unaltered "now"
      "2021-06-01T08:55:28"
      ;; altered "two hours ago"
      "2021-06-01T11:55:29" <- UTC shenanigans. so just bump back 24 hours
      
      * Sort by model ranking
      
      * Remove clj-time and use ZonedDateTime instead of OffsetDateTime
      Unverified
      8e3b4ad8
    • Anton Kulyk's avatar
    • Ariya Hidayat's avatar
  4. Jun 02, 2021
  5. Jun 01, 2021
  6. May 28, 2021
  7. May 27, 2021
    • Anton Kulyk's avatar
      Improve dashboards drag-n-drop and resizing experience, make them more responsive (#16255) · dfca7086
      Anton Kulyk authored
      * Basic `react-gird-layout` usage for Dashboards (#16167)
      
      * Install react-grid-layout
      
      * Add basic NewGridLayout implementation
      
      * Wrap DashboardGrid with WidthProvider
      
      * Bind DashboardGrid's onDrag methods
      
      * Coerce layout item IDs to string
      
      * Add method rendering NewDashboardGrid
      
      * Refactor `onLayoutChange` method to handle new grid
      
      * Use react-grid-layout's CSS classes
      
      * Fix lag while dragging grid items
      
      * Switch back to ExplicitSize HOC
      
      * Fix grid in editing state is too short
      
      * Import missing `react-grid-layout` CSS
      
      * Fix RGL overwrites dragging placeholder color
      
      * Hide default RGL's resize handle
      
      * Fix random dashboard layout rearrangements
      
      Before dashboard cards' parameters (x, y, width, height)
      were updated individually for each card
      It worked fine because there was only one card moving at a time
      
      Now when cards are automatically moving when a user drags another card,
      a race conditon appears, cards' parameters get overwritten, and layout breaks
      
      Fixed by using bulk updates for dashboard cards drag and resizing events
      
      * Fix dashboard background grid
      
      * Align RGL with parent component edges
      
      * Fix grid offset
      
      * Fix dashboard grid height
      
      * Fix no automatic page scroll while dragging
      
      * Fix navbar is stuck when scrolling dashboard
      
      * Remove previous grid component
      
      * Fix grid doesn't respect item min size
      
      * Extract grid background into a separate utils file
      
      * Fix dashboards layout issues (#16236)
      
      * Fix RGL cards are higher than the previous ones
      
      * Return the fixed header in editing mode back
      
      * Add support for responsive dashboard layouts (#16213)
      
      * Fix `gridItemWidth` calculation
      
      * Memoize grid children
      
      * Add utility to adapt layout for breakpoints
      
      * Use responsive react-grid-layout for dashboards
      
      * Don't overwrite main layout with smaller ones
      
      * Pass correct `isMobile` prop to DashCard component
      
      * Extract `renderGridItem` method
      
      * Increase dashboard cards vertical margin for mobile
      
      * Remove dashboard's old renderMobile method
      
      * Add isMobileBreakpoint utility function
      
      * Disable dashboard drag and resize for mobile
      
      * Remove old method disabling mobile drag and resize
      
      * Fix grid background rendering
      
      * Switch to desktop and mobile breakpoints
      
      * Update card heights for dashboard's mobile view
      
      * Add a comment about `!important` in CSS
      
      * Minor code style fix
      
      * Remove not used functions
      Unverified
      dfca7086
  8. May 26, 2021
  9. May 25, 2021
    • Gustavo Saiani's avatar
    • Ariya Hidayat's avatar
      Fix standard filter detection (#16174) · 67bcfdd0
      Ariya Hidayat authored
      When attempting to convert a filter, check first if the filter is a
      comparison against a constant. Otherwise, preserve the filter is in its
      custom expression (MBQL) form.
      
      Each in the following list can be converted into a standard filter
      (since the simple UI for the standard filter only allows literal
      comparison):
      
        [Total] < 300
        between([Discount], 5, 15)
        [Name] = "Joe"
      
      but none of these should be converted
      
        [Discount] <= [Tax]
        between([Rating], 0, [MaxRating])
        [Reviewer] != UPPER([Name])
      
      * Allow standard filter to be invalid
      
      This is necessary to allow an incomplete filter, i.e. the user hasn't
      filled Y in "X < Y" form yet (hence Y is undefined). The filter is not
      valid but it is still considered in the standard form.
      
      * Check whether string comparison can be considered a standard filter
      
      * Idiomatic with array destructuring
      Unverified
      67bcfdd0
    • Ariya Hidayat's avatar
      Fix standard filter detection (#16174) · e3e584c7
      Ariya Hidayat authored
      When attempting to convert a filter, check first if the filter is a
      comparison against a constant. Otherwise, preserve the filter is in its
      custom expression (MBQL) form.
      
      Each in the following list can be converted into a standard filter
      (since the simple UI for the standard filter only allows literal
      comparison):
      
        [Total] < 300
        between([Discount], 5, 15)
        [Name] = "Joe"
      
      but none of these should be converted
      
        [Discount] <= [Tax]
        between([Rating], 0, [MaxRating])
        [Reviewer] != UPPER([Name])
      
      * Allow standard filter to be invalid
      
      This is necessary to allow an incomplete filter, i.e. the user hasn't
      filled Y in "X < Y" form yet (hence Y is undefined). The filter is not
      valid but it is still considered in the standard form.
      
      * Check whether string comparison can be considered a standard filter
      
      * Idiomatic with array destructuring
      Unverified
      e3e584c7
    • Nemanja Glumac's avatar
  10. May 24, 2021
    • dpsutton's avatar
      Yyyymmddhhmmss date strings (#15790) · 6a632764
      dpsutton authored
      * Add yyyymmddhhss coercions to type system
      
      * Implementations for h2/mysql/postgres for yyyymmddhhss bytes and strings
      
      * Mongo and oracle
      
      * Adding checksum on migration it said was bad
      
      * import OffsetDateTime
      
      * Redshift and bigquery
      
      * snowflake expectations
      
      * sql server yyyymmddhhmmss. have to format the string then parse
      
      sqlserver lacks a parse function that takes a format string, they just
      take an integer that specifies a predefined format string. So we have
      to make the string into the right format then parse.
      
      * presto yyyymmddhhmmss
      
      * Test byte conversions
      
      * Remove errant `mt/set-test-drivers!`
      
      * Remove sqlite, change keyword for multiple native types in def
      
      the spec couldn't handle different shapes under the same keyword. so
      just use :natives {:postgres "BYTEA"} :native "BYTEA"
      
      * Make schema work with different shape maps
      
      * hx/raw "'foo'" -> hx/literal "foo" and remove checksums
      
      * _coercion_strategy -> _coercion-strategy
      
      * Handle coercion hierarchy for :Coercion/YYYYMMDDHHMMSSBytes->Temporal
      Unverified
      6a632764
    • Howon Lee's avatar
      Collections pagination for #15769 (#15941) · d872122d
      Howon Lee authored
      This ballooned in scope by a bit.
      1. FE landed onto this. So both BE and FE
      2. Added an offset-pagination middleware
      3. Refactored collection in addition to paginating it so it works by a giant UNION ALL
      4. Refactored effective collections to work by a moderately complicated query with very many WHERE clauses to execute the effective visibility, instead of doing it in clojureland
      Unverified
      d872122d
    • Ariya Hidayat's avatar
      Don't fetch field (values) when in a dashboard (#16056) · 143ec2ca
      Ariya Hidayat authored
      * Add a Cypress test
      Unverified
      143ec2ca
  11. May 22, 2021
  12. May 21, 2021
  13. May 20, 2021
Loading