Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 28, 2023
  2. Feb 06, 2023
  3. Jan 10, 2023
    • Anton Kulyk's avatar
      Add jest-dom and testing-library eslint plugins (#27577) · 6d3f5925
      Anton Kulyk authored
      * Install and enable plugins
      
      * Run eslint auto fix
      
      * Fix linter issues (part 1)
      
      * Fix Visualization test
      
      * Fix Pie Visualization test
      
      * Add `getIcon` and `queryIcon` helpers
      
      * Fix `VisibilityToggler` tests
      
      * Fix `QuestionActivityTimeline` tests
      
      * Fix formatting tests
      
      * Fix `EntityMenuItem` tests
      
      * Fix `ClampedText` tests
      
      * Fix `ObjectRelationships` tests
      
      * Fix `EmailAttachmentPicker` tests
      
      * Fix `SavedQuestionHeaderButton` tests
      
      * Fix `DatabaseEngineWarning` tests
      
      * Fix `Tooltip` tests
      
      * Fix `TippyPopoverWithTrigger` tests
      
      * Fix `TippyPopover` tests
      
      * Fix `TableLabel` tests
      
      * Fix `TableInfo` tests
      
      * Fix `ModerationStatusIcon` tests
      
      * Fix `Sidebar` tests
      
      * Fix `PermissionSelect` tests
      
      * Fix `PinnedItemCard` tests
      
      * Fix widget tests
      
      * Fix `DimensionSemanticTypeLabel` tests
      
      * Fix `ListSearchField` tests
      
      * Fix `ControlledPopoverWithTrigger` tests
      
      * Fix `FieldFingerprintInfo` tests
      
      * Fix `ErrorActionButton` tests
      
      * Fix `QueryValidationError` tests
      
      * Fix `LineAreaBarRenderer` tests
      
      * Fix `DataSelector` tests
      
      * Fix `PivotTable` tests
      
      * Fix `ItemPicker` tests
      
      * Fix `TokenField` tests
      
      * Fix `TagEditorParam` tests
      
      * Fix tests
      
      * Fix tests
      
      * Run prettier
      
      * Fix tests
      Unverified
      6d3f5925
  4. Jan 09, 2023
    • Anton Kulyk's avatar
      Add `eslint-plugin-jest` (#27574) · fb88dbef
      Anton Kulyk authored
      * Install `eslint-plugin-jest`
      
      * Enable `eslint-plugin-jest`
      
      * Run eslint auto fix
      
      * Fix linter issues
      
      * Fix get-column-key
      
      * Fix extra space
      
      * Fix ChartSettingFieldPicker
      
      * Fix eslint issues
      
      * Remove redundant describe
      Unverified
      fb88dbef
  5. Oct 03, 2022
  6. Sep 12, 2022
  7. May 19, 2022
  8. Dec 13, 2021
  9. Dec 07, 2021
  10. 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
  11. 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
  12. Aug 30, 2021
  13. 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
  14. May 05, 2021
  15. Apr 30, 2021
  16. 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
  17. Apr 19, 2021
  18. Apr 09, 2021
  19. 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
  20. Apr 02, 2021
  21. Mar 24, 2021
  22. 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
  23. Mar 02, 2021
  24. Oct 23, 2020
  25. 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
  26. Dec 05, 2019
  27. Sep 13, 2019
  28. Jun 10, 2019
  29. Jul 06, 2018
  30. Jul 03, 2018
  31. Jul 02, 2018
  32. Jun 20, 2018
  33. Apr 25, 2018
  34. Feb 16, 2018
  35. 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
  36. Aug 21, 2017
  37. Jul 13, 2017
Loading