Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 16, 2021
    • Tim Macdonald's avatar
      More search relevance tweaking (#15178) · c2d53257
      Tim Macdonald authored
      * Search dashboard descriptions
      
      * Restrict dashboardcard_count score to cards
      
      * Restrict pinned score to appropriate models
      
      * Add fullness-scorer
      
      * Kill a silly function
      
      * D'oh
      
      * Get rid of text-score-max :tada:
      Unverified
      c2d53257
    • Luis Paolini's avatar
      Enable parallel minification (#15166) · 6da57315
      Luis Paolini authored
      
      * Change webpack config
      
      Use the parallel:true flag in the Uglify plugin to use all cores in a CPU for minification which greatly improves front end build time. You will now be able to take advantage of that watercooler you asked Santa for Christmas
      
      * Kick the build
      
      Co-authored-by: default avatarTim Macdonald <tsmacdonald@gmail.com>
      Unverified
      6da57315
    • Cam Saul's avatar
      Merge pull request #15187 from metabase/branch-ce1e7fed · 7285524b
      Cam Saul authored
      Merge 38.1 -> master part 5
      Unverified
      7285524b
    • Nemanja's avatar
      Merge branch 'master' into branch-ce1e7fed · 0d143185
      Nemanja authored
      # Conflicts:
      #	enterprise/frontend/test/metabase-enterprise/audit/auditing.cy.spec.js
      #	enterprise/frontend/test/metabase-enterprise/sandboxes/sandboxes.cy.spec.js
      #	frontend/test/metabase/scenarios/admin/settings/localization.cy.spec.js
      #	frontend/test/metabase/scenarios/dashboard/chained-filters.cy.spec.js
      #	frontend/test/metabase/scenarios/dashboard/dashboard.cy.spec.js
      #	frontend/test/metabase/scenarios/public/public.cy.spec.js
      #	frontend/test/metabase/scenarios/question/filter.cy.spec.js
      #	frontend/test/metabase/scenarios/question/native.cy.spec.js
      #	frontend/test/metabase/scenarios/question/view.cy.spec.js
      0d143185
    • Cam Saul's avatar
      Merge 0.38.1 -> master part 4 · 2ac6d21f
      Cam Saul authored
      Unverified
      2ac6d21f
    • Ariya Hidayat's avatar
    • Raimon Grau's avatar
      Add helpers to populate a database (#15112) · 9e231be3
      Raimon Grau authored
      Provide means to add entities to the application db using specmonstah library.
      
      There are 4 main parts to it:
      - specs for column types (id, names, emails...). Used to generate random values.
      - specs for entities. Aggregations of types
      - schema. Structure of the dependency graph. Used by specmonstah to create the
        entities in the right order, and to link fks between them.
      - insert. 
          - Generating the entity graph, then removing the `id`s (so
            the underlying db adds them and the id's don't clash with already existing ones).
          - Adjust field values that have constraints besides DB ones.
          - insert to the db using `toucan`.
      Unverified
      9e231be3
    • dpsutton's avatar
      Add lsp (#15181) · 3edc7d0b
      dpsutton authored
      * Add lsp and config
      
      ```emacs-lisp
        (use-package lsp-mode
          :ensure t
          :hook ((clojure-mode . lsp)
                 (clojurec-mode . lsp)
                 (clojurescript-mode . lsp))
          :config
          (setq lsp-enable-indentation nil)
          (setq lsp-enable-file-watchers nil) ;; annoying and i can't specify paths
          ;; add paths to your local installation of project mgmt tools, like lein
          (dolist (m '(clojure-mode
                       clojurec-mode
                       clojurescript-mode
                       clojurex-mode))
             (add-to-list 'lsp-language-id-configuration `(,m . "clojure"))))
      ```
      
      * Add socket repl support to project.clj (also include reveal)
      
      * Configure lsp so that enterprise is on the classpath
      Unverified
      3edc7d0b
    • Cam Saul's avatar
      Merge branch 'master' into branch-f42c8d6a · c5c6ad55
      Cam Saul authored
      Unverified
      c5c6ad55
  2. Mar 15, 2021
    • dpsutton's avatar
      Semantic types 2 effective type (#15022) · 6b8ddc84
      dpsutton authored
      
      * First pass using coercions
      
      * Coercions
      
      * Handle effective_type coercion_strategy in test data sets
      
      * special-type -> semantic type in sample db
      
      ```clojure
      user> (def config (metabase.db.spec/h2 {:db (str "/Users/dan/projects/clojure/metabase/resources/sample-dataset.db"
                                                       ";UNDO_LOG=0;CACHE_SIZE=131072;QUERY_CACHE_SIZE=128;COMPRESS=TRUE;"
                                                       "MULTI_THREADED=TRUE;MVCC=TRUE;DEFRAG_ALWAYS=TRUE;MAX_COMPACT_TIME=5000;"
                                                       "ANALYZE_AUTO=100")}))
      user> (jdbc/execute! config ["UPDATE _metabase_metadata
                              SET keypath = 'PEOPLE.ZIP.semantic_type'
                              WHERE keypath = 'PEOPLE.ZIP.special_type'" ])
      [1]
      user> (jdbc/execute! config ["UPDATE _metabase_metadata
                              SET keypath = 'REVIEWS.BODY.semantic_type'
                              WHERE keypath = 'REVIEWS.BODY.special_type'" ])
      [1]
      ```
      
      * Correct mismatch in validation preventing sync
      
      * fixing up alternative date tests
      
      * More passing tests
      
      * Tests for values, nested queries, fetch metadata
      
      * tests
      
      * tests passing
      
      * Fixup mongo qp for coercions
      
      locally i have some failing tests that are off by 1 errors:
      
      Fail in compile-time-interval-test
      
      [36m:mongo[0m Make sure time-intervals work the way they're supposed to. [:time-interval $date -4 :month] should give us something like Oct 01 2020 - Feb 01 2021 if today is Feb 17 2021
      
      expected: [{$match {$and [{:$expr {$gte [$date {:$dateFromString {:dateString 2020-10-01T00:00Z}}]}} {:$expr {$lt [$date {:$dateFromString {:dateString 2021-02-01T00:00Z}}]}}]}} {$group {_id {date~~~day {:$let {:vars {:parts {:$dateToParts {:date $date}}}, :in {:$dateFromParts {:year $$parts.year, :month $$parts.month, :day $$parts.day}}}}}}} {$sort {_id 1}} {$project {_id false, date~~~day $_id.date~~~day}} {$sort {date~~~day 1}} {$limit 1048576}]
      
        actual: [{"$match"
                  {"$and"
                   [{:$expr {"$gte" ["$date" {:$dateFromString {:dateString "2020-11-01T00:00Z"}}]}}
                    {:$expr {"$lt" ["$date" {:$dateFromString {:dateString "2021-03-01T00:00Z"}}]}}]}}
                 {"$group"
                  {"_id"
                   {"date~~~day"
                    {:$let
                     {:vars {:parts {:$dateToParts {:date "$date"}}},
                      :in {:$dateFromParts {:year "$$parts.year", :month "$$parts.month", :day "$$parts.day"}}}}}}}
                 {"$sort" {"_id" 1}}
                 {"$project" {"_id" false, "date~~~day" "$_id.date~~~day"}}
                 {"$sort" {"date~~~day" 1}}
                 {"$limit" 1048576}]
          diff: - [{"$match"
                    {"$and"
                     [{:$expr {"$gte" [nil {:$dateFromString {:dateString "2020-10-01T00:00Z"}}]}}
                      {:$expr {"$lt" [nil {:$dateFromString {:dateString "2021-02-01T00:00Z"}}]}}]}}]
                + [{"$match"
                    {"$and"
                     [{:$expr {"$gte" [nil {:$dateFromString {:dateString "2020-11-01T00:00Z"}}]}}
                      {:$expr {"$lt" [nil {:$dateFromString {:dateString "2021-03-01T00:00Z"}}]}}]}}]
      
      * ee fixes
      
      * UI to set coercion type
      
      * Don't need to populate effective-type here
      
      it actually has knock on effects:
      - does more work now as almost every field has an update to do in
      `add-extra-metadata`
      - we have databases that have state that we don't create. druid for
      example has stuff to mimic the dataset in tqpt/with-flattened-dbdef on
      checkins but we don't actually create this. And our dbdef has a field
      called "date" that is not present in the druid db, so if we attempt to
      add metadata it fails and kills the rest of the metadata that we add.
      - tests need this metadata to be present and the error causes field
      visibilities (for example) to not be set
      
      * Docstrings on shared lib
      
      * Add effective and coercion to redshift expectations
      
      * Fixup google analytics
      
      * Derecordize instead of recordize the expectation
      
      object details didn't work out well here. they added way more stuff
      from the db than what is flowing through here.
      
      ```clojure
        actual: {:field
                 {:name "DATE",
                  :parent_id nil,
                  :table_id 69,
                  :base_type :type/Date,
                  :effective_type :type/Date,
                  :coercion_strategy nil,
                  :semantic_type nil},
                 :value {:type :date/all-options, :value "past5days"}}
          diff: - {:field
                   {:description nil,
                    :database_type "VARCHAR",
                    :fingerprint_version 0,
                    :has_field_values nil,
                    :settings nil,
                    :caveats nil,
                    :fk_target_field_id nil,
                    :custom_position 0,
                    :active true,
                    :last_analyzed nil,
                    :position 1,
                    :visibility_type :normal,
                    :preview_display true,
                    :database_position 0,
                    :fingerprint nil,
                    :points_of_interest nil}}
      ```
      
      Object defaults adds quite a bit of stuff such that we'd be dissoc'ing
      more than we are currently adding in
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Unverified
      6b8ddc84
    • Cam Saul's avatar
    • Kyle Doherty's avatar
      Improve search result comprehension (#15123) · 7efd0cd1
      Kyle Doherty authored
      
      * remove background to make icon identification easier
      
      * change color based on pinned status
      
      * add type context to items [ci skip]
      
      * linkify table and schema info
      
      * add collection link and use saved question copy [ci skip]
      
      * underline style [ci skip]
      
      * incorporate descriptions [ci skip]
      
      * show segment descriptions [ci skip]
      
      * add context to segments and metrics [ci skip]
      
      * fallback description
      
      * Update frontend/src/metabase/search/components/SearchResult.jsx
      
      Co-authored-by: default avatarTim Macdonald <tim@metabase.com>
      
      * Update frontend/src/metabase/search/components/SearchResult.jsx
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      
      * restructure and simplify search result component
      
      - simplify jsx structure
      - show display_name for metrics and segments
      - remove collection parent info for now
      - fix show description for collections if they exist
      
      * prettier
      
      * use capitalize fn
      
      * add key for contextText items
      
      * extract InfoText
      
      * tweak fn name
      
      * prettier
      
      Co-authored-by: default avatarTim Macdonald <tim@metabase.com>
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      Unverified
      7efd0cd1
    • Ariya Hidayat's avatar
      Custom expression: constrain the type for boolean nodes/sub-expressions (#15159) · 8344bed7
      Ariya Hidayat authored
      * Custom expression: constrain the type for boolean nodes/sub-expressions
      
      * Avoid scope conflict
      Unverified
      8344bed7
    • Dalton's avatar
      Replace :cry: error screen with a closable error card (#15154) · 394e0176
      Dalton authored
      * Don't clobber entire app when react catches an error
      
      * Add ErrorCard component
      
      * wrap header in ttag
      Unverified
      394e0176
    • Dalton's avatar
    • Dalton's avatar
      replace prefix search with contains in parameter value search, squashed (#15032) · d09ce251
      Dalton authored
      
      * replace prefix search with contains in parameter value search
      
      * Dashboard filters search everywhere, not just the prefix (#15153)
      
      Co-authored-by: default avatarTim Macdonald <tim@metabase.com>
      Unverified
      d09ce251
  3. Mar 12, 2021
  4. Mar 11, 2021
  5. Mar 10, 2021
  6. Mar 09, 2021
    • Nemanja's avatar
      Merge branch 'master' into branch-5f537081 · 9d592dc1
      Nemanja authored
      # Conflicts:
      #	enterprise/frontend/test/metabase-enterprise/sandboxes/sandboxes.cy.spec.js
      #	frontend/test/metabase-db/mysql/custom-column.cy.spec.js
      #	frontend/test/metabase/scenarios/admin/datamodel/metadata.cy.spec.js
      #	frontend/test/metabase/scenarios/admin/settings/localization.cy.spec.js
      #	frontend/test/metabase/scenarios/dashboard/dashboard-drill.cy.spec.js
      #	frontend/test/metabase/scenarios/dashboard/x-rays.cy.spec.js
      #	frontend/test/metabase/scenarios/question/custom_column.cy.spec.js
      #	frontend/test/metabase/scenarios/question/filter.cy.spec.js
      #	frontend/test/metabase/scenarios/question/nested.cy.spec.js
      #	frontend/test/metabase/scenarios/question/new.cy.spec.js
      #	frontend/test/metabase/scenarios/question/notebook.cy.spec.js
      #	frontend/test/metabase/scenarios/question/nulls.cy.spec.js
      #	frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js
      #	frontend/test/metabase/scenarios/visualizations/drillthroughs/dash_drill.cy.spec.js
      #	frontend/test/snapshot-creators/default.cy.snap.js
      9d592dc1
    • Cam Saul's avatar
      Merge pull request #15072 from metabase/merge-38.1-part-2-v2 · 68d55143
      Cam Saul authored
      Merge 38.1 part 2 v2
      Unverified
      68d55143
    • Cam Saul's avatar
      Test fix :wrench: · bfe80e4e
      Cam Saul authored
      bfe80e4e
    • Tim Macdonald's avatar
      Abbreviate search context (#15028) · 57889804
      Tim Macdonald authored
      Unverified
      57889804
  7. Mar 08, 2021
  8. Mar 06, 2021
  9. Mar 05, 2021
    • Kyle Doherty's avatar
      search visual tweaks (#15069) · 45d9ded5
      Kyle Doherty authored
      Unverified
      45d9ded5
    • Cam Saul's avatar
      Shared CLJ/CLJS lib (#14980) · cca03d22
      Cam Saul authored
      * Shared CLJ/CLJS lib (PoC/WIP)
      
      * PoC 2.0
      
      * Fixes :wrench:
      
      * More test fixes :wrench:
      
      * Bump shadow-cljs version
      
      * Fix more stuff
      
      * Need to ^:export the exports
      
      * CI fixes :wrench:
      
      * Add eslintignore
      
      * Ignore cljs files for FE code coverage
      
      * Try prefixing CLJS -> JS import with goog:
      
      * Revert indentation change
      
      * No goog:
      
      * Add .prettierignore
      
      * Use advanced build for now for JS tests unit we can figure out how to make it work
      Unverified
      cca03d22
  10. Mar 04, 2021
Loading