Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 15, 2021
    • Anton Kulyk's avatar
      Add sorting to collection items (#16385) · b454510c
      Anton Kulyk authored
      * Add sorting params to Search entity
      
      * Remove pinned items sorting by `collection_position`
      
      * Add default sorting to collection items
      
      * Add sorting controls
      
      * Add test IDs to table head and columns
      
      * Move pagination tests into separate file
      
      * Make pagination tests independent from dataset
      
      * Allow creating pinned items via API in Cypress
      
      * Add sorting E2E tests
      
      * Fix sorting by "Last edited at" column
      
      * Add sorting by "Last edited by" column
      
      * Fix BaseItemsTable unit test
      b454510c
    • Anton Kulyk's avatar
    • dpsutton's avatar
      Fix last edit query (#16520) · a80ac907
      dpsutton authored
      * Correct query for last edits
      
      * tests ensure we get latest revisions
      a80ac907
    • Anton Kulyk's avatar
      Add drag-n-drop to collection items tables (#16360) · a9586b23
      Anton Kulyk authored
      
      * Don't wrap ItemDragSource children with <div />
      
      react-dnd allows wrapping only native DOM elements with DND helpers.
      
      With the new table layout, we now need to drag table rows (td elements).
      
      Rendering a td with ItemDragSource results in invalid HTML as table body's direct children should only include td elements.
      
      * Rename `selected` prop to `selectedItems`
      
      * Pass ItemDragSource props to table item
      
      * Replace styled TableRow with plain <tr />
      
      Table row is wrapped with ItemDragSource, that only accepts native DOM elements as its children
      
      So styled-components can't be used here
      
      * Make table row draggable
      
      * Add headless mode to BaseItemsTable
      
      * Add prop hiding table row's bottom border
      
      * Fix typo and split large comment
      
      * Render full table row when dragging
      
      * Add empty PinnedItemsTable drop area
      
      * Add empty ItemsTable drop area
      
      * Wrap PinnedItemsTable with drop area
      
      * Wrap ItemsTable with drop area
      
      * Extract `<tr />` style
      
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      
      * Fix width style
      
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      
      * Run prettier
      
      * Reference issue about post-pulses work
      
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      a9586b23
    • Anton Kulyk's avatar
      Remove "Pinned items" text assertion · a2972781
      Anton Kulyk authored
      The category title is removed in this PR by design
      a2972781
    • dpsutton's avatar
      Sort by last_edited_by (#16388) · f08bea47
      dpsutton authored
      for last edits, now can sort by last_edited_at (previously
      last_edited) and last_edited_by
      f08bea47
    • Anton Kulyk's avatar
      Switch the collection page to table-based layout, display last edit info (#16357) · 67f41ac6
      Anton Kulyk authored
      * Extract color functions from EntityItem body
      
      * Refactor EntityItem not to use `switch` statement
      
      * Extract `<EntityItem.Icon />` component
      
      * Extract `<EntityItem.Name />` component
      
      * Extract `<EntityItem.Menu />` component
      
      * Add basic table components for collection items
      
      * Update item name style
      
      * Update `last-edit-info` columns text style
      
      * Make CollectionContent wider
      
      * Highlight pinned items
      
      * Add `renderItem` prop to BaseItemsTable
      
      * Add links to table items' entity pages
      
      * Connect `data-metabase-event` to table items
      
      * Make table items selectable for bulk actions
      
      * Remove filtering E2E test
      
      Collection items filtering is going to be replaced with sorting
      
      * Fix cypress collection item selectors
      
      * Fix cypress pinned items assertions
      
      * Add collection item actions menu
      
      * Fix "Type" column style
      
      * Fix layout when there are no pinned items
      
      * Add CollectionContent's empty state
      
      * Fix typo
      
      * Update table row height
      
      * Add table rows separators
      
      * Remove replaced components
      
      * Remove filtering logic from CollectionContent
      
      * Fix pulses display in collection items table
      
      * Remove note about filtering E2E tests
      
      Collection items filtering is going to be replaced with sorting
      
      * Move BaseTableItem into its own file
      
      * Remove redundant conditional render
      
      * Fix col's span attribute
      
      * Don't use `useCallback` for itemRenderer
      
      * Extract ItemsTable's renderItem
      
      * Extract PinnedItemsTable's renderItem
      
      * Fix `EntityItemIcon` margin prop usage
      
      * Remove not used props from `EntityItem`
      
      * Fix string prop notation
      
      * Add IconButtonWrapper component
      
      * Use IconButtonWrapper for EntityItem's icon
      
      * Update BaseTableItem's EntityIcon usage
      
      * Move EntityItemWrapper to .styled file
      
      * Rename `EntityItemIcon` to `EntityIconCheckBox`
      67f41ac6
    • Anton Kulyk's avatar
      Display last edit info in Question and Dashboard headers (#16354) · 4f08c4cd
      Anton Kulyk authored
      * Add LastEditInfoLabel component
      
      * Fix Header component's import order
      
      * Display last edit info in Dashboard header
      
      * Display last edit info in Question header
      
      * Show "edited by you" if user is the last editor
      
      * Add prop types for Header component
      
      * Add prop-types for ViewHeader component
      4f08c4cd
    • Nemanja Glumac's avatar
      Merge `release-x.39.x` including ae6e9d9f (#16575) · 835fba84
      Nemanja Glumac authored
      * Cleanup from dump-load-entities-test (#16281)
      
      Updating dump-load-entities-test test so that dump dir is actually deleted at the end
      
      * Revamp Cypress custom commands (#16292)
      
      * Extract UI custom commands
      
      * Extract user related custom commands
      
      * Extract overwrites
      
      * Extract permissions related custom commands
      
      * Extract API custom commands
      
      * Extract helpers custom commands
      
      * Extract database related custom commands
      
      * Rename `helpers` group to `visibility`
      
      * Rename custom command `isInViewport` to `isRenderedWithinViewport`
      
      * Unskip repro for #15119 (#16297)
      
      * Create composite Cypress custom command `cy.createQuestionAndDashboard` (#16294)
      
      * Add composite Cypress custom command `createQuestionAndDashboard`
      
      * Refactor the existing test to use new Cypress custom command
      
      * Refactor repro for #13062 using the new Cypress custom command
      
      * Use the `describe` block instead of using `forEach` for complex repro
      
      * Add space between test cases
      
      * #12629 Repro: Human-readable number formatting not working properly (#16231)
      
      * Fix `nosql` user's email address (#16306)
      
      * Generate correct SQL for columns from joins inside other joins or source queries (#16254)
      
      * Fix joining a join inside a nested queries (#12928)
      
      * Code cleanup & dox
      
      * Tests for #13649
      
      * Test fixes :wrench:
      
      
      
      * Remove unit tests snapshots (#16321)
      
      * Remove snapshots from `Calendar.unit.spec.js`
      
      * Remove snapshots from `DashCard.unit.spec.js`
      
      * Remove snapshots generated for "internal" components
      
      * Remove unused import
      
      * Remove snapshot related command from `scripts`
      
      * Remove `noSnapshotTest` from internal components
      
      * Remove `react-test-renderer`
      
      * filter nulls out of histograms (#16345)
      
      * #15993 Repro: Click behavior with filter pass-thru does not show filters defined on question (#16342)
      
      * #16334 Repro: Click Behavior targeting a question with filter mapped causes the visualization type to change (#16343)
      
      * Add repro for #16334
      
      * Expand test assertion
      
      * #16327 Repro: Double binning menu for date fields when using Saved Question (Native) (#16359)
      
      * #16322 Repro: "Custom mapping" is only available, when "A list of all values" is set (and after a browser refresh) (#16361)
      
      * #16226 Repro: LDAP/Email settings gets cleared if validation fails (#16364)
      
      * Add repro for #16226
      
      * Extract email settings into a separate file
      
      * Add repro for #16226 (Email)
      
      * switch to column settings when sidebar is already open (#16368)
      
      * align labels on non-bars in combo charts (#16369)
      
      * #16378 Repro: Cannot enable JWT authentication (#16384)
      
      * Fix JS error on JWT settings form (#16394)
      
      * fix default updateSettings function in SettingsBatchForm
      
      * unskip repro
      
      * #12128 Repro: Can't change label on empty row value (#16426)
      
      * Post-merge fix
      
      * Post-merge fix 2
      I didn't solve this merge conflict properly in the original merge.
      
      Co-authored-by: default avatarJeff Evans <jeff303@users.noreply.github.com>
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
      Unverified
      835fba84
  2. Jun 14, 2021
    • Anton Kulyk's avatar
      Revert "Feature | Collection Metadata (#16510)" (#16570) · bd40d2e1
      Anton Kulyk authored
      This reverts commit 82757d60.
      Unverified
      bd40d2e1
    • Anton Kulyk's avatar
      Feature | Collection Metadata (#16510) · 82757d60
      Anton Kulyk authored
      
      * Display last edit info in Question and Dashboard headers (#16354)
      
      * Add LastEditInfoLabel component
      
      * Fix Header component's import order
      
      * Display last edit info in Dashboard header
      
      * Display last edit info in Question header
      
      * Show "edited by you" if user is the last editor
      
      * Add prop types for Header component
      
      * Add prop-types for ViewHeader component
      
      * Switch the collection page to table-based layout, display last edit info (#16357)
      
      * Extract color functions from EntityItem body
      
      * Refactor EntityItem not to use `switch` statement
      
      * Extract `<EntityItem.Icon />` component
      
      * Extract `<EntityItem.Name />` component
      
      * Extract `<EntityItem.Menu />` component
      
      * Add basic table components for collection items
      
      * Update item name style
      
      * Update `last-edit-info` columns text style
      
      * Make CollectionContent wider
      
      * Highlight pinned items
      
      * Add `renderItem` prop to BaseItemsTable
      
      * Add links to table items' entity pages
      
      * Connect `data-metabase-event` to table items
      
      * Make table items selectable for bulk actions
      
      * Remove filtering E2E test
      
      Collection items filtering is going to be replaced with sorting
      
      * Fix cypress collection item selectors
      
      * Fix cypress pinned items assertions
      
      * Add collection item actions menu
      
      * Fix "Type" column style
      
      * Fix layout when there are no pinned items
      
      * Add CollectionContent's empty state
      
      * Fix typo
      
      * Update table row height
      
      * Add table rows separators
      
      * Remove replaced components
      
      * Remove filtering logic from CollectionContent
      
      * Fix pulses display in collection items table
      
      * Remove note about filtering E2E tests
      
      Collection items filtering is going to be replaced with sorting
      
      * Move BaseTableItem into its own file
      
      * Remove redundant conditional render
      
      * Fix col's span attribute
      
      * Don't use `useCallback` for itemRenderer
      
      * Extract ItemsTable's renderItem
      
      * Extract PinnedItemsTable's renderItem
      
      * Fix `EntityItemIcon` margin prop usage
      
      * Remove not used props from `EntityItem`
      
      * Fix string prop notation
      
      * Add IconButtonWrapper component
      
      * Use IconButtonWrapper for EntityItem's icon
      
      * Update BaseTableItem's EntityIcon usage
      
      * Move EntityItemWrapper to .styled file
      
      * Rename `EntityItemIcon` to `EntityIconCheckBox`
      
      * Sort by last_edited_by (#16388)
      
      for last edits, now can sort by last_edited_at (previously
      last_edited) and last_edited_by
      
      * Remove "Pinned items" text assertion
      
      The category title is removed in this PR by design
      
      * Add drag-n-drop to collection items tables (#16360)
      
      * Don't wrap ItemDragSource children with <div />
      
      react-dnd allows wrapping only native DOM elements with DND helpers.
      
      With the new table layout, we now need to drag table rows (td elements).
      
      Rendering a td with ItemDragSource results in invalid HTML as table body's direct children should only include td elements.
      
      * Rename `selected` prop to `selectedItems`
      
      * Pass ItemDragSource props to table item
      
      * Replace styled TableRow with plain <tr />
      
      Table row is wrapped with ItemDragSource, that only accepts native DOM elements as its children
      
      So styled-components can't be used here
      
      * Make table row draggable
      
      * Add headless mode to BaseItemsTable
      
      * Add prop hiding table row's bottom border
      
      * Fix typo and split large comment
      
      * Render full table row when dragging
      
      * Add empty PinnedItemsTable drop area
      
      * Add empty ItemsTable drop area
      
      * Wrap PinnedItemsTable with drop area
      
      * Wrap ItemsTable with drop area
      
      * Extract `<tr />` style
      
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      
      * Fix width style
      
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      
      * Run prettier
      
      * Reference issue about post-pulses work
      
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      
      * Fix last edit query (#16520)
      
      * Correct query for last edits
      
      * tests ensure we get latest revisions
      
      * Add tooltip displaying the exact time of the last collection item edit (#16492)
      
      * Add sorting to collection items (#16385)
      
      * Add sorting params to Search entity
      
      * Remove pinned items sorting by `collection_position`
      
      * Add default sorting to collection items
      
      * Add sorting controls
      
      * Add test IDs to table head and columns
      
      * Move pagination tests into separate file
      
      * Make pagination tests independent from dataset
      
      * Allow creating pinned items via API in Cypress
      
      * Add sorting E2E tests
      
      * Fix sorting by "Last edited at" column
      
      * Add sorting by "Last edited by" column
      
      * Fix BaseItemsTable unit test
      
      * Order by _revision_ id, not _user_ id (#16536)
      
      * Fix UI flash when sorting collection items (#16511)
      
      * Optionaly keep prev list value in EntityListLoader
      
      * Use prop-types in EntityListLoader
      
      * Fix UI flash when sorting collection items
      
      * Fix empty state displayed before items are fetched
      
      * Alias condition statement
      
      * Unify shouldUpdatePrevList condition
      
      * Fix react/display-name
      
      * Rename keepPreviousList —> keepListWhileLoading
      
      * Swap list and previous list internally
      
      * Replace `_.isEqual` check with plain `!==`
      
      * Fix border radius for circle icon
      
      * Rename Header's `showBadge` into `hasBadge`
      
      * Add tests for collections metadata (#16538)
      
      Co-authored-by: default avatardpsutton <dan@dpsutton.com>
      Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
      Unverified
      82757d60
    • Nemanja Glumac's avatar
      #16386 Repro: Filtering on `boolean=true` column causes blank screen or... · ea8f76ac
      Nemanja Glumac authored
      #16386 Repro: Filtering on `boolean=true` column causes blank screen or "Something went wrong" (#16495)
      
      * Add repros for #16386
      
      * Update the test to include filtering on the "false" column
      Unverified
      ea8f76ac
  3. Jun 12, 2021
  4. Jun 11, 2021
  5. Jun 10, 2021
  6. Jun 09, 2021
  7. Jun 08, 2021
    • Cam Saul's avatar
      Add helpers to define Settings with multiple impls (#16365) · c80be55d
      Cam Saul authored
      * Add helpers to define Settings with multiple impls
      
      * Add docstrings
      
      * Fix missing :require
      
      * Add namespace docstring per @dpsutton suggestion
      Unverified
      c80be55d
    • Howon Lee's avatar
      Friendly names bugfix 2 (#16482) · c00ffb45
      Howon Lee authored
      Friendly names bugfix 1 was a noop because of a typo in the WHERE clause of the DB migration. This one has been manually tested to go and sync on all 4 supported MB db's.
      Unverified
      c00ffb45
    • Cam Saul's avatar
      Post-merge fix :wrench: · 7cdbc59a
      Cam Saul authored
      7cdbc59a
    • Noah Moss's avatar
      Ignore unmapped groups during SSO group syncs (#16314) · d19be7f5
      Noah Moss authored
      * changes to sync-group-memberships! and unit tests
      
      * update jwt and saml code
      
      * fix admin sync tests
      
      * fix misplaced docstrings
      
      * address review comment
      Unverified
      d19be7f5
    • dpsutton's avatar
      Pass UTF8 as a literal into grouping by a bytes->temporal column (#16336) · d2433696
      dpsutton authored
      Repro:
      db setup:
      
      ```sql
      create table wut2 (t bytea, ts text);
      insert into wut2 (t, ts) values ('20210421164300'::bytea, '20210421164300');
      ```
      
      Mark t as :Coercion/YYYYMMDDHHMMSSBytes->Temporal, ts as
      :Coercion/YYYYMMDDHHMMSSString->Temporal
      
      Do a simple query, and then aggregate count by the two dates. ts
      should succeed and t fails.
      
      We are passing in the UTF8 as a parameter rather than just emitting a
      literal.
      
      Before:
      
      ```clojure
      {:sql
       "-- Metabase\nSELECT CAST(to_timestamp(convert_from(\"public\".\"wut\".\"t\", ?), 'YYYYMMDDHH24MISS') AS date) AS \"t\", count(*) AS \"count\" FROM \"public\".\"wut\" GROUP BY CAST(to_timestamp(convert_from(\"public\".\"wut\".\"t\", ?), 'YYYYMMDDHH24MISS') AS date) ORDER BY CAST(to_timestamp(convert_from(\"public\".\"wut\".\"t\", ?), 'YYYYMMDDHH24MISS') AS date) ASC",
       :params ("UTF8" "UTF8" "UTF8"),
       :type :invalid-query}
      ```
      
      After:
      
      ```sql
      SELECT CAST(to_timestamp(convert_from(\"public\".\"wut\".\"t\", 'UTF8'), 'YYYYMMDDHH24MISS') AS date) AS \"t\",
             count(*) AS \"count\" FROM \"public\".\"wut\"
      GROUP BY CAST(to_timestamp(convert_from(\"public\".\"wut\".\"t\", 'UTF8'), 'YYYYMMDDHH24MISS') AS date)
      ORDER BY CAST(to_timestamp(convert_from(\"public\".\"wut\".\"t\", 'UTF8'), 'YYYYMMDDHH24MISS') AS date) ASC
      ```
      
      Note there's a lot of extra casting that perhaps we can clean up
      Unverified
      d2433696
    • Gustavo Saiani's avatar
    • Howon Lee's avatar
      Detect if file is blank or bad for SQLite DB connection (#16372) · eb89b766
      Howon Lee authored
      Previously just used JDBC. However, JDBC will merrily execute queries on empty file locations for SQLite, because it'll create a new SQLite file. This one checks that there exists a SQLite file already to be querying in the first place
      Unverified
      eb89b766
    • Howon Lee's avatar
      DB Pagination Backend 11806 (#16346) · 6cad3473
      Howon Lee authored
      Folks wanted DB pagination in #11806 and apparently others but it didn't make it to notion. Well, it made it to my attention, anyhow, and here is some DB pagination, but just for the backend.
      Unverified
      6cad3473
Loading