Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Nov 18, 2021
  2. Nov 05, 2021
  3. Oct 07, 2021
    • Alexander Lesnenko's avatar
      add basic typescript configuration (#18284) · 8114af48
      Alexander Lesnenko authored
      
      * add basic typescript configuration
      
      * convert a tiny hook use-debounced-value to typescript
      
      * allow any for now?
      
      * update terser and static viz configs
      
      * adjust config
      
      * change extension of QuestionActivityTimeline from jsx to js to match jest config
      
      * adjust config
      
      * skip failing tests
      
      * Fix missing question method in unit tests (#18314)
      
      * review fix
      
      * fix
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Unverified
      8114af48
  4. Oct 05, 2021
  5. Oct 04, 2021
    • Ariya Hidayat's avatar
      Rename NODE_ENV to WEBPACK_BUNDLE (#18087) · 3a67ddc1
      Ariya Hidayat authored
      NODE_ENV interferes with other tools (e.g. `yarn` won't pull
      devDependencies). Since what we need is only a flag indicating Webpack
      to bundle for production vs developement, invent our own env.
      
      This also solves the mystery of unable to call `yarn build` in the build
      script `bin/build-mb/src/build.clj`.
      Unverified
      3a67ddc1
  6. Aug 31, 2021
  7. Aug 10, 2021
  8. Aug 09, 2021
    • Ariya Hidayat's avatar
      Webpack prod build: exclude ESLint loader (#17371) · 7a932452
      Ariya Hidayat authored
      There's no point of processing files via ESLint loader when building
      for production. If there's any linting issue at all, it should be
      caught with a different CI run.
      
      This shave off >2 minutes from Uberjar build (front-end step).
      
      Development/hot-reload isn't affected at all.
      Unverified
      7a932452
  9. Aug 06, 2021
  10. Jul 30, 2021
    • Dalton's avatar
      Upgrade babel to 7.x.x and jest to 27.x.x (#17137) · 3a7c3987
      Dalton authored
      * Update babel dependencies to latest
      
      * Remove some old babel dependencies
      
      The dependencies in this commit include dependencies that have been
      renamed, such as babel-cli which is now @babel/cli. It also includes
      dependencies that have been replaced, such as babel-preset-stage-0 and
      its ilk, which have been replaced with @babel/preset-env.
      
      * Remove babel-register dependency
      
      This is referenced in our webpack.config.js file. I don't think we need
      Babel in our Node envionment, but I could be wrong, so leaving this as a
      separate commit.
      
      * Remove @babel/standalone and dependent code
      
      We're using @babel/standalone to support the writing of JSX in our
      internal-only ScratchApp editor. Unfortunately, this dependency is
      large--1.5mb not gzipped--and our current build does not intelligently
      split bundles, meaning our users our burdened by the size of this
      dependency whenever they must redownload the Metabase JS bundle.
      
      I'm removing it. We should still be able to write JS in the ScratchApp,
      but JSX no longer.
      
      * Add @babel/node to dev deps
      
      Needed by a cypress command
      
      * Add browserslist config
      
      Babel's preset-env dep needs this config to determine how to transform
      our JavaScript. By default I believe it ends up defaulting to
      "defaults."
      
      "defaults" is equivalent to the following rules:
      > 0.5%, last 2 versions, Firefox ESR, not dead
      
      A comma between rules represents a UNION operator.
      
      Per
      https://www.metabase.com/docs/latest/faq/general/supported-browsers.html
      
      
      we have deprecated IE 11 so I am including that explicitly in our
      browserslist.
      
      * Update babelrc plugins and presets
      
      - Replaced presets with preset-env and preset-react
      - Updated the names of some plugins, like transform-decorators-legacy,
        which is now @babel/plugin-proposal-decorators with an explicit
        "legacy: true" passed in the config.
      - Removed add-react-displayname because it is included in preset-react
      - Removed transform-builtin-extend because it is included in preset-env*
      - Removed syntax-trailing-function-commas because it is supported by
        all browsers we support
      
      * note: There is a "loose" config option for handling the extension of builtin
      classes. We may need it, but I am not sure.
      
      * Update babel cli args
      
      Replace -q with --quiet because -q no longer exists
      
      * Fix circular dep in auth.js by making it async
      
      Our app unfortunately contains MANY circular dependencies. Some, like
      this one, caused problems when the app instantiates because the
      "refreshCurrentUser" method is undefined when auth.js is initially run.
      
      While we should in the future avoid having circular deps in the first
      place, making them run async by requiring the dep and function run-time
      fixes this particular issue.
      
      * Fix circular dependency in metabase/redux/requests.js
      
      The handleActions and createAction methods imported from
      "metabase/lib/redux" are actually just methods from the "redux-actions"
      dependency... so importing those methods directly from that dep fixes
      this circular dependency problem.
      
      * Remove references to global.services and exports in metabase/services
      
      This line breaks the build. Git blame says the line is 5 years old, and
      I wouldn't expect such code to be used with how our app now requires
      deps.
      
      * Fix MBQLArrayClause problem caused by Array extension
      
      * Explicitly pass args from flatMap to function via anonymous cb
      
      I think the old Array.prototype.flatMap prototype must've had different
      args. They are now "currentValue, index, array" so when we passed it
      "enumeratePaths" as a callback, the second arg of enumeratePaths gets
      set to a number. This breaks the logic of enumeratePaths because it is a
      recursive function that depends on that second arg getting initialized
      as an empty array by default.
      
      * Remove code that spreads non-iterable value in array
      
      New Babel is stricter about handling this sort of code that doesn't
      match the JS spec. You can't spread an undefined value inside of an
      iterator.
      
      * Update jest and babel-jest to latest
      
      Updating Babel breaks our unit tests. Updating nothing causes every test
      to fail due to a Babel version mismatch. Updating only babel-jest causes
      the following error:
      
      TypeError: Jest: a transform must export a `process` function
      
      There may be a way around updating Jest, but updating it does not appear
      to be too difficult.
      
      * Set the testEnvironment to jsdom
      
      This was the default testEnvironment in our old version of jest. At some
      point the default was changed to node.
      
      * Remove unfinished "pending" unit tests
      
      I'm unfamiliar with this pending function, but the function no longer
      exists, causing the tests to fail.
      
      * don't pass async callback to describe
      
      * Update name of runTimersToTime to advanceTimersByTime
      
      * Fix incorrectly nested unit test
      
      * mock SVGElement.prototype.getBBox method
      
      * Don't return values in describe callback
      
      * Move variable declaration to above usage
      
      * Fix prettier error
      
      * Upgrade `documentation` library to the latest version (13.x.x)
      
      This library was the only one left that was still using Babel 6.
      
      * Return an MBQLClause instance after using Array methods
      
      * remove 'not IE 11' from browserslist
      
      * Remove mock that breaks unit test
      
      Co-authored-by: default avatarNemanja <31325167+nemanjaglumac@users.noreply.github.com>
      Unverified
      3a7c3987
  11. Jul 19, 2021
  12. Mar 16, 2021
  13. Mar 05, 2021
    • 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
  14. Mar 01, 2021
    • Nemanja Glumac's avatar
      Upgrade React to v16 (#14391) · 28ce196d
      Nemanja Glumac authored
      
      * Upgrade React to v16
      
      * Upgrade react-hot-loader
      
      * Use portal in BodyComponent (#14779)
      
      * Use portal in Popover (#14799)
      
      * Use portal in Popover
      
      * Use SandboxedPortal to stop portal child/parent event propagation
      
      React portals bubble events from component childrent to component
      parents _through_ the portal as though they are attached. This breaks
      our Triggerable HOC that wraps everything in an anchor tag -- click
      events inside of an open Popover trigger the "toggle" function in
      Triggerable, closing the Popover component.
      
      Adding an additional div to the code potentially breaks styling, but
      this seemed better than the alternative of changing/limiting
      Triggerable.
      
      * Fix adding of open class
      
      * don't trigger some logic when popover is not open
      
      * change wrapper span to a div
      
      * rmv explicit bind from handleDismissal fn
      
      * add comment explaining reasoning for SandboxedPortal
      
      * add comment to explain need for 'maxHeight' state value
      
      * Use ReactDOMServer to render html in a contenteditable div (#14869)
      
      As part of the react v16 we can no longer rely on a synchronous
      ReactDOM.render call. Using the third arg callback of ReactDOM.render
      does not work for reasons unknown to me, but it would likely be
      race-condition-y anyways due to this being an input field. I'm using
      ReactDOMServer in order to avoid rewriting the react TokenizedExpression
      component as html and to avoid associated xss vulnerabilities, etc.
      
      * Rename unsafe lifecycles (#14887)
      
      * Rename unsafe lifecycles
      
      * Fix flow error: Remove unused suppressions
      
      * use SandboxedPortal in Modal (#14905)
      
      * use SandboxedPortal in Modal
      
      * Move modal append container to constructor
      
      This breaks the entry animation but it fixes problems with having a
      popover _inside_ of the modal. Previously, popover was appending its
      container el before the modal, causing a stacking issue.
      
      * remove unstable_renderSubtreeIntoContainer from Tooltip (#14976)
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      Unverified
      28ce196d
  15. Dec 09, 2020
    • Robert Roland's avatar
      Dashboard subscriptions work, squashed (#13390) · dd2ecc51
      Robert Roland authored
      
      * Dashboard subscriptions work, squashed
      
      This test namespace differs in EE and OSS
      
      Without other changes from EE, this won't work
      
      so, for now, I've restored the pure OSS version of this test
      
      redo wording on existing subscription cards
      
      hacks? to address some timing issues where the render loop executes
      before properties are available (loaded from the server)
      
      links to configure pulse types
      
      Display a link to configure email or slack when they aren't already
      
      Fix the am/pm picker
      
      set up a new schedule tooltip
      
      The sidebar can appear and disappear from the Sharing popover
      
      run prettier on everything
      
      email recipients now does the "name [and n other]" thing
      
      Dashboard subscriptions work, squashed
      
      redo wording on existing subscription cards
      
      hacks? to address some timing issues where the render loop executes
      before properties are available (loaded from the server)
      
      styling for email not configured state
      
      add styling for slack unconfigured state
      
      disable cursor-pointer if email or slack isn't configured
      
      Implement cancel button for the sidebar (#13741)
      
      Dashboard subscription UX enhancements:
      
      * Implement cancel button for the sidebar
      
      * Don't return duplicate dashboard subscriptions
      
      * Move sidebar cancellation into Redux
      
      * Add close icon
      
      * Fix popover behavior
      
      Dashboard Subscriptions: Fix build (#13859)
      
      * Frontend lint fixes
      
      * Fix failing email tests
      
      * Revert some of the snapshot changes
      
      * regenerate snapshots
      
      * done fixing FE tests?
      
      * Make `dashboard_card_id` optional in CardRef schema
      
      * Fix test setup in pulse model test
      
      * Fix collection API test
      
      * Order pulses by name
      
      * Cypress fixes/skips
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      
      Subscribe to dashboards send test email (#13886)
      
      * Frontend lint fixes
      
      * Fix failing email tests
      
      * Revert some of the snapshot changes
      
      * regenerate snapshots
      
      * done fixing FE tests?
      
      * Make `dashboard_card_id` optional in CardRef schema
      
      * Fix test setup in pulse model test
      
      * Fix collection API test
      
      * Order pulses by name
      
      * Cypress fixes/skips
      
      * uggh cypress
      
      * Add button to send test email for dashboard subscriptions
      
      * Disable test email with no recipients
      
      * Refactor SendTestEmail
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      
      Fix failing collection tests (#13891)
      
      * Move dashboard embedding button (#13928)
      
      * Revert migration 277 (as in master)
      
      styling and hover tweaks for subscription cards (#14003)
      
      Fix positioning of create and close buttons (#13999)
      
      * fix positioning of create and close buttons
      
      * Update frontend/src/metabase/sharing/components/SharingSidebar.jsx
      
      * Update frontend/src/metabase/sharing/components/SharingSidebar.jsx
      
      * import Flex
      
      Co-authored-by: default avatarKyle Doherty <kdoh@users.noreply.github.com>
      Co-authored-by: default avatarKyle Doherty <kyle.l.doherty@gmail.com>
      
      Add deprecation warning to Pulse create/edit page (#13954)
      
      * add pulse deprecation warning
      
      * remove unused Link component
      
      * kyle comments
      
      * Update frontend/src/metabase/pulse/components/PulseEdit.jsx
      
      Co-authored-by: default avatarKyle Doherty <kdoh@users.noreply.github.com>
      
      * Update frontend/src/metabase/pulse/components/PulseEdit.jsx
      
      Co-authored-by: default avatarKyle Doherty <kdoh@users.noreply.github.com>
      
      * Update frontend/src/metabase/pulse/components/PulseEdit.jsx
      
      Co-authored-by: default avatarKyle Doherty <kdoh@users.noreply.github.com>
      
      Co-authored-by: default avatarKyle Doherty <kdoh@users.noreply.github.com>
      
      More dash subscription styling tweaks (#14006)
      
      * change hovers for email and slack delivery options
      
      * calm down, delete button
      
      * style csv and xlsx options as buttongroup
      
      * settings spacing tweaks
      
      Dashboard subscription attachment question selection (#13950)
      
      * Move email attachment into its own component
      
      Add appropriate checkbox behavior
      
      Set pulseCards appropriately
      
      * Delete PulseCards when dashboard card removed
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      Unverified
      dd2ecc51
  16. Oct 29, 2020
  17. Oct 27, 2020
  18. Oct 23, 2020
  19. Oct 05, 2020
    • Paul Rosenzweig's avatar
      Dashboard interactivity: custom drill through and chained filters (#13354) · c4353a1f
      Paul Rosenzweig authored
      
      * dashboard interactivity: custom drill through and chained filters
      
      (cherry picked from commit f3ea3099da981c967fcffd5c7e318c88064c0a96)
      
      * add missing param
      
      * Better error message & test for cases where you don't have Field perms
      
      (cherry picked from commit 2ae8174c388a105170bb316b6266b900f8844c62)
      
      * Fix lint error
      
      (cherry picked from commit aa967359ecf9705f28dded2b5b30eb42ebec156e)
      
      * type another letter to avoid ordering issue
      
      (cherry picked from commit 5f285219c07eeff41b3d1fbfc091092a6ce60ed4)
      
      * fix failing cy tests
      
      (cherry picked from commit 8dbb9561a21f853a550d4ab1385fbdf142ea36e6)
      
      * update test
      
      * Fix merge
      
      * sort correctly
      
      * Fix namespace decl sorting
      
      * use another within block for the "add to dash" modal
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      Unverified
      c4353a1f
  20. Jul 21, 2020
    • Robert Roland's avatar
      Adds a is-empty/not-empty for strings (#12947) · 33403173
      Robert Roland authored
      
      * Adds a is-empty/not-empty for strings
      
      What the UI calls "is empty" / "not empty" right now is a null check,
      not a null and "" string check.
      
      This adds is-empty / not-empty operators in the query processor, and
      reworks the UI to use those. Any existing query that previously used the
      is-null / not-null operators will show (as "Is null" / "Not null") but
      any newly made queries will not be able to select "Is null" / "Not null"
      for text type fields.
      
      This will allow backwards compatibility with existing questions, while
      promoting use of the new "is-empty"/"not-empty" operators.
      Added Cypress test to make sure the proper operators show up when asking
      questions
      
      Update memoize util to allow variable number of args
      
      Resolves #5299
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      Unverified
      33403173
  21. Jul 10, 2020
    • Tom Robinson's avatar
      Move flow types to metabase-types (#12857) · 510b979e
      Tom Robinson authored
      * Remove StructuredQuery's dependency on deprecated metabase/lib/query.js
      
      * Refactor QueryDefinition{,Tooltip} to use metabase-lib
      
      * Replace *Name components with displayName and various other legacy cleanup
      
      * Fix flow
      
      * Move flow types to metabase-types
      Unverified
      510b979e
  22. Mar 06, 2020
    • Tom Robinson's avatar
      Expressions: filter expressions, case statements, string extracts, and share aggregations (#11868) · 09001d6c
      Tom Robinson authored
      
      * Upgrade Chevrotain to v6.5.0
      
      * Switch from embedded actions to visitor
      
      * rename tokens to lexer, remove no-longer needed Chevrotain hack from webpack.config.js
      
      * get tests passing again
      
      * progress converting syntax parser
      
      * got intermediate Sum(A) test passing
      
      * more progress on parsing expressions
      
      * get complex expression passing
      
      * prettier
      
      * linting
      
      * Add TokenizedExpression snapshot test
      
      * Add support to parser for recovering whitespace tokens
      
      * Add case clause [ci all]
      
      * fix test [ci all]
      
      * Harden test [ci all]
      
      * More tests [ci all]
      
      * Correctly infer case return type [ci all]
      
      * Fix test [ci all]
      
      * Fix tests [ci all]
      
      * Improved syntax parser
      
      * More parser cleanup + start adding filters and functions
      
      * Add CASE and partial filter support, cleanup tests
      
      * Add string extracts [ci all]
      
      * Typo [ci all]
      
      * Make linter happy [ci all]
      
      * Add regex-match-first [ci all]
      
      * Fix arglist [ci all]
      
      * Fix test [ci all]
      
      * Add sum-where count-where and share support. Refactor aggregation tokens
      
      * Fix tests [ci all]
      
      * Add ns prefixes [ci all]
      
      * Add ns qualifiers [ci all]
      
      * Fix trim [ci all]
      
      * Tests: ensure stable ordering of results [ci all]
      
      * Fix trim [ci all]
      
      * Support only 1-arg trim [ci all]
      
      * Fix ns prefixes [ci all]
      
      * Fix psql [ci all]
      
      * Fix redshift [ci redshift]
      
      * Refactor/simplify grammer to consolidate aggregation, expression, and filter functions
      
      * Add isCase to isExpression
      
      * Directly splice regex pattern for psql & redshift [ci all]
      
      * Fix schema [ci all]
      
      * Redshift: splice replace args [ci redshift]
      
      * Add ns prefix [ci redshift]
      
      * Typo [ci redshift]
      
      * Filter expressions
      
      * Add metrics and segments back in to expressions
      
      * Disable tokenized editing
      
      * Update tests to clojure.test [ci all]
      
      * Add concat to sqlite [ci all]
      
      * Add length [ci all]
      
      * Add missing ns [ci all]
      
      * Fix test [ci all]
      
      * Fix messed up multimethods [ci all]
      
      * Fix mssql [ci all]
      
      * Fix sqlite concat [ci all]
      
      * sqlite: correctly qoute literal strings [ci all]
      
      * Misc improvements to syntax highlighting etc
      
      * Cleanup tests [ci all]
      
      * Reoder defs [ci all]
      
      * Make linter happy [ci all]
      
      * Mongo: add case [ci mongo]
      
      * mongo: fix switch [ci mongo]
      
      * typo [ci mongo]
      
      * Improve syntax highlighter and suggestions
      
      * Mongo: always have default fallback in case [ci mongo]
      
      * Rearrange test to split out ones using expressions [ci mongo]
      
      * Remove uneeded merge [ci all]
      
      * misc
      
      * Much improved syntax highlighting using recovery mode and partial CST
      
      * Improved suggestions
      
      * try monospace font for expressions
      
      * Better typing in parser, various other fixes
      
      * Avoid parsing multiple times
      
      * Fix tests
      
      * Fix tests
      
      * More test fixes
      
      * Special case for UnderlyingRecords drill with sum-where/count-where/share
      
      * switch back to square brackets for identifiers
      
      * change extract to regexextract
      
      * Lift expressions to subselect [ci all]
      
      * Commit on enter
      
      * rename extract to substitute, fix tests
      
      * Refactor [ci all]
      
      * Fix normalization [ci all]
      
      * Correctly handle joins [ci all]
      
      Co-authored-by: default avatarDaniel Higginbotham <daniel@flyingmachinestudios.com>
      Co-authored-by: default avatarSimon Belak <simon@metabase.com>
      Co-authored-by: default avatarMaz Ameli <maz@metabase.com>
      Unverified
      09001d6c
  23. Nov 25, 2019
    • Paul Rosenzweig's avatar
      Merge changes in 0.33.6 back into master (#11377) · 27bdad07
      Paul Rosenzweig authored
      * v0.33.5
      
      * Include Oracle JDBC driver as a build dep
      
      * v0.33.5.1
      
      * Don't center pie charts on dashboards (#11314)
      
      * Sort fields before checking if a query has been updated (#11311)
      
      * Don't attempt to load card metadata if the card's table wasn't fetched (#11326)
      
      * move publicPath from file-loader options to extract text plugin (#11350)
      
      * v0.33.6
      Unverified
      27bdad07
  24. Nov 19, 2019
  25. Nov 04, 2019
  26. Oct 21, 2019
    • Tom Robinson's avatar
      Fix Google Analytics query builder crashes (#11186) · 77ae8d16
      Tom Robinson authored
      * hide section picker if when viewing column settings
      
      * hide sidebar title
      
      * add ChartSettingsSidebar test
      
      * always show column settings title
      
      * lint
      
      * override sidebar title
      
      * remove unneeded diff
      
      * group reference sidebar tables by schema
      
      * keep everything as one list
      
      * use name instead of display_name
      
      * add tests
      
      * add schema pane
      
      * filter to querable tables
      
      * update tests
      
      * unused imports
      
      * sort schema and table names
      
      * change scalar compact formatting to depend on pixel width rather than grid width (#10932)
      
      * prompt for save when sharing unsaved question (#10976)
      
      * use generic props override instead of just `title` and `onBack`
      
      * Update pulse table style to match app (#10989)
      
      * undefined -> null, you can spread null aparently
      
      * Upgrade redshift driver to 1.2.36.1060 (#11181)
      
      * fix bug where column settings were dropped (#11154)
      
      * remove leading slash on publicPath (#11174)
      
      * Fix GA crashes
      77ae8d16
    • Paul Rosenzweig's avatar
  27. Oct 01, 2019
    • Kyle Doherty's avatar
      Bundle fonts (#10963) · 869356c9
      Kyle Doherty authored
      * remove Google Fonts usage
      
      * local Lato in resources/frontend_client/app/fonts
      
      * create assets/fonts aliases, update publicPath, use absolute paths in css
      
      * add svg to extensions
      
      * update flow config to account for frontend_client assets
      
      * add explicit .svg extension to no_results usage
      
      * remove google fonts references from CSP headers
      Unverified
      869356c9
  28. Jul 30, 2019
  29. Jun 19, 2019
  30. Nov 05, 2018
  31. Oct 30, 2018
  32. Jul 25, 2018
  33. Jul 10, 2018
  34. Jun 18, 2018
  35. Mar 23, 2018
  36. Feb 15, 2018
  37. Oct 23, 2017
  38. Oct 19, 2017
Loading