Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. May 19, 2022
  2. Dec 13, 2021
  3. Dec 07, 2021
  4. Nov 02, 2021
    • Dalton's avatar
      Refactor the Parameters component and rename it to SyncedParametersList (#18683) · f121d4d8
      Dalton authored
      * move querystring-syncing logic to new hook
      
      * rename <Parameters> to <SyncedParametersList>
      
      * Remove syncQueryString prop
      
      * remove unused 'query' prop
      
      * remove 'isQB' prop
      
      * remove ParametersWidget in favor of ParametersList handling empty parameters list
      
      * Rely on value-populated parameters objects over parameterValues map
      
      * remove unused pass-through prop 'vertical'
      
      * make props passed from Dashboard to SyncedParametersList explicit
      
      * Update name of component
      
      * create a more generic hook for syncing the url query string
      Unverified
      f121d4d8
    • Anton Kulyk's avatar
      Fix linter warning about not used variable in the Icon component (#18805) · b663c235
      Anton Kulyk authored
      * Fix typo
      
      * Don't warn about unused variables prefixed with _
      
      * Fix unused var warning for Icon component
      
      * Add `varsIgnorePattern` for JS files too
      Unverified
      b663c235
  5. 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
  6. Aug 30, 2021
  7. 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
  8. May 05, 2021
  9. Apr 30, 2021
  10. Apr 26, 2021
    • Nemanja Glumac's avatar
      [SCHEDULED, Week 19] Fix `react/no-string-refs` errors (#15547) · 8888de33
      Nemanja Glumac authored
      
      * Fix `eslint-react/no-string-refs` errors (#15427)
      
      * Handle errors in `AdminLayout.jsx`
      
      * Rmove unused ref from `MetadataEditorApp.jsx`
      
      * Remove unused ref from `EditBar.jsx`
      
      * Handle errors in `Confirm.jsx`
      
      * Handle errors in `Header.jsx`
      
      * Handle errors in `NewsletterForm.jsx`
      
      * Handle errors in `ColorPicker.jsx`
      
      * Remove unused ref from `PasswordReveal.jsx`
      
      * Handle errors in `Triggerable.jsx`
      
      * Handle errors in `TokenField.jsx`
      
      * Handle errors in `DashboardHeader.jsx`
      
      * Handle errors in `RefreshWidget.jsx`
      
      * Handle errors in `DatabaseEditApp.jsx`
      
      * Handle errors in `FieldRemapping.jsx`
      
      * Handle errors in `ObjectActionsSelect.jsx`
      
      * Handle errors in `ObjectRetireModal.jsx`
      
      * Remove unused ref from `UserGroupSelect.jsx`
      
      * Handle errors in `PermissionsGrid.jsx`
      
      * Handle errors in `ParameterTargetWidget.jsx`
      
      * Handle errors in `ParameterValueWidget.jsx`
      
      * Handle errors in `PulseEdit.jsx`
      
      * Handle errors in `PulseEditName.jsx`
      
      * Handle errors in `DataSelector.jsx`
      
      * Remove unused ref from `FieldWidget.jsx`
      
      * Handle errors in `NativeQueryEditor.jsx`
      
      * Handle errors in `SearchBar.jsx`
      
      * Handle errors in `ExpressionEditorTextfield.jsx`
      
      * Remove unused ref from `FieldWidget.jsx`
      
      * Remove unused ref from `SpecificDatePicker.jsx`
      
      * Handle errors in `RevisionMessageModal.jsx`
      
      * Handle errors in `Setup.jsx`
      
      * Handle errors in `LeafletMap.jsx`
      
      * Handle errors in `TableSimple.jsx`
      
      * Handle errors in `PieChart.jsx`
      
      * Handle errors in `Progress.jsx`
      
      * Remove unused refs from `QueryBuilder.jsx`
      
      * Remove unused ref and methods from `MetadataHeader.jsx`
      
      * Remove unused ref from `DashboardActions.jsx`
      
      * Handle errors in `DatabaseListApp.jsx`
      
      Note: dynamic refs
      
      * Handle errors in `LegendHorizontal.jsx`
      
      Note: dynamic refs
      
      * Disable linting rule `react/no-string-refs` in `LegendVertical.jsx`
      
      Note: dynamic refs
      
      * Partially handle errors in `GuiQueryEditor.jsx`
      
      * Disable linting rule `react/no-string-refs` in `GuiQueryEditor.jsx`
      
      Note: dynamic refs
      
      * Revert "Remove unused ref from `DashboardActions.jsx`"
      
      This reverts commit 5facb9d60ecb561093af15efcfc99b29ff96980e.
      
      * Handle errors in `DashboardActions.jsx`
      
      * Remove redundant `ReactDOM.findDOMNode` from `Setup.jsx`
      
      * Revert "Handle errors in `DashboardActions.jsx`"
      
      This reverts commit b3d64b8f7a982e0371d225d0d624ecbeaf776b76.
      
      * Disable linting for `DashboardActions.jsx`
      
      * Fix prettier error
      
      * Delete non-existing prop `getTarget`
      
      * Fix typo
      
      * Fix typos in more places
      
      * Fix `footerRef` check
      
      * Turn on `react/no-string-refs` lint rule
      
      * Disable `react/prop-types` in files that are breaking the build
      
      * Fix broken refs
      
      Co-authored-by: default avataralxnddr <alxnddr@gmail.com>
      Unverified
      8888de33
  11. Apr 19, 2021
  12. Apr 09, 2021
  13. Apr 08, 2021
    • Nemanja Glumac's avatar
      Fix `jsx/no-target-blank` React errors (#15532) · 919530a8
      Nemanja Glumac authored
      * Fix `react/jsx-no-target-blank` error (#15110)
      
      * Fix `react/jsx-no-target-blank` error
      
      * Handle untranslated string
      
      * Add `dataMetabaseEvent` prop to `ExternalLink`
      
      * Update missed `ExternalLink` component in `frontend/src/metabase/query_builder/components/template_tags/TagEditorHelp.jsx` with `dataMetabaseEvent`
      
      * Turn on `react/jsx-no-target-blank` lint rule
      Unverified
      919530a8
    • Nemanja Glumac's avatar
      Upgrade `eslint-plugin-react` (#15529) · c29b44b9
      Nemanja Glumac authored
      * Upgrade `eslint-plugin-react` 
      
      * Disable `react/prop-types` warning in stray files
      
      * Register breaking rules and turn off warnings
      
      * Fix wrong `eslint-disable` comment
      
      * Fix `react/display-name` error in `NotebookCell.jsx`
      Unverified
      c29b44b9
  14. Apr 02, 2021
  15. Mar 24, 2021
  16. Mar 04, 2021
    • Ariya Hidayat's avatar
      Remove type-checking with Flow (#14236) · f4d90f68
      Ariya Hidayat authored
      * yarn remove flow-bin eslint-plugin-flowtype
      
      * CI: remove fe-linter-flow
      
      * Remove Flow from ESLint config
      
      * Remove Flow type annotations and directives
      
      * Simplify Flow types for React elements and components
      
      * Import missing Flow types
      
      * Remove lint-flow from package.json
      Unverified
      f4d90f68
  17. Mar 02, 2021
  18. Oct 23, 2020
  19. Jul 20, 2020
    • Robert Roland's avatar
      Update eslint (#12951) · d86b85ce
      Robert Roland authored
      
      * Update eslint
      
      Updates eslint, babel and plugins to the latest compatible versions
      
      Drops the 'no-color-literals' parameter which doesn't exist (looks like
      it's actually part of eslint-plugin-react-native which we don't use)
      
      adding a dirlocal to make sure js2-mode doesn't confuse you with type
      errors that aren't actually errors because of flowtype and such
      
      * update generated css classes in snapshots
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      Unverified
      d86b85ce
  20. Dec 05, 2019
  21. Sep 13, 2019
  22. Jun 10, 2019
  23. Jul 06, 2018
  24. Jul 03, 2018
  25. Jul 02, 2018
  26. Jun 20, 2018
  27. Apr 25, 2018
  28. Feb 16, 2018
  29. Nov 14, 2017
    • Atte Keinänen's avatar
      Alerts Frontend · 6f0bd39a
      Atte Keinänen authored
      This commit has the UI for users to add alerts to a question. Admins
      are able to setup alerts for questions and modify alerts that users
      have setup.
      6f0bd39a
  30. Aug 21, 2017
  31. Jul 13, 2017
  32. Jul 07, 2017
  33. Jun 22, 2017
  34. Apr 08, 2017
  35. Apr 04, 2017
    • Tom Robinson's avatar
      Query Builder 2.0 [WIP] (#4496) · ff12c03c
      Tom Robinson authored
      * QB modes, actions, and drill throughs.
      
      * Refactor drill throughs + misc bug fixes
      
      * Port sort action to drills
      
      * Smarter 'view this/these' name
      
      * Scalar hover state
      
      * QB actions: don't skip action selection screen unless the action is marked as 'default'
      
      * Fix flow errors
      
      * Fix drills
      
      * Show "This X's Ys" for FKs
      
      * Prevent qb from uneccesary push states
      
      * Don't show (fk) breakout fields that have already been broken out
      
      * Fix 'drill into this' unit
      
      * Cleanup timeseries footer
      
      * Cleanup qb selectors
      
      * Namespace all qb actions
      
      * Make modes dependent on previously run card
      
      * More timeseries footer cleanup
      
      * Fix table crash
      
      * Make breakout legend clickable
      
      * Fix datagrid pivot test
      
      * Flow + lint
      ff12c03c
  36. Feb 21, 2017
Loading