Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 03, 2021
    • Dalton's avatar
      Add the ability to verify/unverify questions (#17030) · b7fa2f34
      Dalton authored
      * rmv old bucm icons and remove verified fill color
      
      * add moderation action section to sidebar
      
      * add moderation review icon to the saved question header button
      
      * hide moderation section when is not a moderator
      
      * add UI for ModerationReviewBanner
      
      * Backend for moderation-review
      
      - create table moderation_review. Same as before but also has a
        "most_recent" boolean flag for the most recent moderation for easy
        lookup
      - POST /moderation-review/ . Status can be "verified" or nil
      - must be an admin to post
      - No PUT or edit route yet. Not sure if this is even
        necessary. _MAYBE_ to edit the text, but certainly not for the
        status, ids, etc. If there's to be history, let's build some history
      - Ensure we never have more than 10 reviews. Adding a new review will
        delete the older ones, mark all old ones as not `most_recent`, and
        add the newest one as `most_recent true`
      - Ensure the card actually exists before creating the mod review
      - Since admin only at this time, don't need to check moderate
        permission or view permission
      - When hydrating ensure reviews are ordered by id desc. Should mimic
        the created_at desc
      
      * fix moderation review banner tooltip offset
      
      * disable verification button when already verified
      
      * rmv iconOnly prop because it seems to do nothing
      
      * update getLatestModerationReview to rely on most_recent boolean
      
      * Return 400 on invalid status to post /moderation-review
      
      the schema was using keywords on the left hand side rather than the
      symbols. Required a change to the docstring generator, when it made a
      docstring for enums, it would call (sort (:vs enum)) and need to
      string em.
      
      * Add ModerationReview model to models.clj and copy infra
      
      * hydrate moderation reviews on cards
      
      * clean up + wire up to BE + ensure mod buttons don't show for normal users
      
      * rmv unused moderation redux logic from QuestionDetailsSidebarPanel
      
      * finish writing unit tests for FE
      
      * ensure getIconForReview returns an object
      
      * enable/disable verify button tooltip when unverified/verified
      
      * add e2e tests
      
      * fix tests
      
      * styling tweaks
      
      * more styling on moderationReviewBanner
      
      * add function for abbreviated timestamp
      
      * increase fontsize of timestamp back to 12
      
      * fix tooltip offset
      
      * ensure custom locale is separate from 'en' and not used for other languages
      
      * Deletion moderation reviews when deleting cards
      
      i had actually thought this was a much larger problem. But it turns
      out we almost never delete cards (thanks comment!). And so we won't
      really generate a lot of garbage.
      
      I was worried that since we aren't using actual foreign keys but just
      `moderated_item_type "card"` and `moderated_item_id 2` we would have
      deleted cards with these moderation reviews but that is not the case
      as the cards aren't deleted.
      
      * hide verify disabled button when a question is verified
      
      * update test to use queryByTestId
      
      * Hydrate moderation reviews on cards on ordered cards
      
      * Handle mysql's lack of offset functionality
      
      mysql cannot handle just a `offset` clause, it also needs a limit
      
      clause grammar from
      https://dev.mysql.com/doc/refman/8.0/en/select.html:
      
      [LIMIT {[offset,] row_count | row_count OFFSET offset}]
      
      select id, name from metabase_field offset 5;         -- errors
      select id, name from metabase_field limit 2 offset 5; -- works
      
      Since our numbers are so small here there is no worry and just do the
      offset in memory rather than jump through hoops for different dbs.
      
      * Batch hydrate moderation reviews
      
      * Don't let /api/user/:userId failure conceal moderation banner
      
      * fix moderation cy tests
      
      * work around possible bug in toucan hydration
      
      dashboards hydrate ordered cards
      (hydrate [:ordered_cards [:card :moderation_reviews] :series])
      
      Ordered_cards are dashboard_cards which have an optional card_id. But
      toucan hydration doesn't filter out the nils as they go down. It seems
      toucan returns a nil card, and then when hydrating the
      moderation_review, passes the collection of all "cards" including the
      nil ones into the hydration function for moderation_reviews
      
      This feels like a bug to me
      
      * Cleanup moderation warnings
      
      * Docstring in moderation review
      
      * include hoisted moderated_status on cards in collections api
      
      * Expect unverified in test :wrench:
      
      
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Co-authored-by: default avatarMaz Ameli <maz@metabase.com>
      Co-authored-by: default avataralxnddr <alxnddr@gmail.com>
      Unverified
      b7fa2f34
  2. Jul 28, 2021
    • Anton Kulyk's avatar
      Allow only admins to edit collection types, hide form field for personal collections (#17170) · a728bafe
      Anton Kulyk authored
      * Rename collection's plugin `formFields`
      
      * Add tests for collection type field visibility
      
      * Limit collection types visibility
      
      * Fix cypress tests
      a728bafe
    • Anton Kulyk's avatar
      Add ability to make all children collections official or regular (#17168) · d7e0838c
      Anton Kulyk authored
      * Add `update_collection_tree_authority_level` field
      
      * Add authority level tree update
      
      * Test authority level children bulk update
      d7e0838c
    • Anton Kulyk's avatar
      Display official badge throughout the application (#17125) · 32a88aa4
      Anton Kulyk authored
      * Add getCollectionIcon function
      
      * Add isRegularCollection function
      
      * Display official badge in collections sidebar
      
      * Don't dim official badge icon in collections sidebar
      
      * Show root collection icon
      
      * Use `CollectionsList.Icon` for "All personal collections"
      
      * Fix CollectionBadge icon color
      
      * Display official collection badge in search results
      
      * Test official badge displayed correctly in sidebar
      
      * Test official badge is shown throughout the app
      
      * Show official badge icon in SavedQuestionPicker
      
      * Use existing isPersonalCollection utility
      
      * Show official badge icon in QuestionPicker
      
      * Show official badge icon in CollectionPicker
      
      * Minor CollectionIcon refactoring
      
      * Use function declaration for isRegularCollection
      
      * Add editCollection test helper
      
      * Add changeCollectionTypeTo helper
      
      * Remove duplicated assertions
      
      * Add helper to create official collection
      
      * Add testOfficialBadgeInSearch helper
      32a88aa4
    • Anton Kulyk's avatar
      Bootstrap collections plugin, add collection types form (#17071) · 0a687782
      Anton Kulyk authored
      * Add badge icon
      
      * Add empty PLUGIN_FORM_WIDGETS
      
      * Add empty PLUGIN_COLLECTIONS
      
      * Extract `getWidgetComponent` from FormWidget
      
      * Allow adding EE-only form widgets
      
      * Add `authority_level` field to collections
      
      * Fix SegmentedControl's `value` prop-type
      
      * Specify icon sizes for SegmentedControl's options
      
      * Add FormCollectionAuthorityLevel form widget
      
      * Add `PLUGIN_COLLECTION_COMPONENTS`
      
      * Add CollectionAuthorityLevelIcon
      
      * Move ToggleMobileSidebarIcon out of PageHeading
      
      * Display official badge on collection page
      
      * Add authority level to collections plugin
      
      * Rename `AUTHORITY_LEVELS` to `EE_AUTHORITY_LEVELS`
      
      * Patch collections plugin with EE authority levels
      
      * Fix authority level value for new collection form
      
      * Add `cy.createCollection` command
      
      * Add `describeWithoutToken` Cypress helper
      
      * Test user can manage collection authority level
      
      * Test collection types available only in EE
      
      * Run prettier
      
      * Keep regular collection opts in AUTHORITY_LEVEL
      
      * Fix test comment
      
      * Translate collection type names
      
      * Avoid aliasing regular authority level
      0a687782
  3. Jul 22, 2021
  4. Jul 08, 2021
  5. Jun 17, 2021
  6. Jun 11, 2021
  7. Jun 09, 2021
  8. Jun 07, 2021
  9. Jun 03, 2021
  10. May 05, 2021
  11. Apr 26, 2021
  12. Apr 23, 2021
  13. Apr 12, 2021
    • Jeff Evans's avatar
      Various improvements to version update checks (#15517) · 9392ddd7
      Jeff Evans authored
      * Various improvements to version update checks
      
      ***************************
      * Release project changes *
      ***************************
      
      Updating version_info.clj code to build version-info-ee.json file for Enterprise Edition build
      
      Adding test for both oss and ee version info file generation logic
      
      Decoupling GitHub milestone from version and setting it to be the OSS value for :ee release build
      
      Adding nREPL alias for release deps.edn project and usage note
      
      ************************
      * Core product changes *
      ************************
      
      Adding new :ee version of :mb-version-info-url (:mb-version-info-ee-url) with default value to match the file name generated by the release code
      
      Making enterprise-edition? public from core.clj, since it's now needed from the upgrade check code to switch between the URLs
      
      Adding new setting to store when updates were last checked (since it's on a 12-hour interval)
      
      Changing update check code to both set this new timestamp setting (always) to the current time, and set version-info itself to nil if the update check fails (so that users won't see "latest and greatest" if the update check succeeded at some point in the past, but then started failing
      
      Frontend changes:
      
      Showing the "last checked" timestamp (in user's browser timezone) when we show the "Sorry" text because of being unable to check for updates, so they know when the last check was made
      
      Removing custom implementation of MetabaseSettings.versionInfo from EE frontend code since it's no longer needed (and never worked), because the EE backend will now be hitting a different URL with the version info specifically for EE releases
      
      Linking to https://www.metabase.com/docs/<newVersion>/operations-guide/upgrading-metabase.html URL instead of simply /start
      Unverified
      9392ddd7
  14. Apr 06, 2021
    • Tim Macdonald's avatar
      Dashboard Subscription Filtering (#15404) · ce41deaf
      Tim Macdonald authored
      
      * Backend for dashboard sub filters, including EE implementation
      
      * Fix pulse/update-notification! to respect parameters
      
      * Add some tests
      
      * add FE EE parameter section to dashboard subscriptions
      
      * fix improper filter counting for label
      
      * hide parameters section when dashboard has none
      
      * fix thrown errorin pulses list sidebar
      
      * fix linting error
      
      * add cypress tests
      
      * rmv describe.only from test
      
      * refactor FE code a little
      
      * Merge pulse/dashboard parameters correctly for dashboard subs
      
      * fix issues with getting list of active pulse parameters
      
      * update formatting of multi value parameters
      
      * fix cypress test
      
      * tweak pulse details styling
      
      * move ParametersSection to enterprise tree
      
      Co-authored-by: default avatarDalton Johnson <daltojohnso@users.noreply.github.com>
      Unverified
      ce41deaf
  15. Apr 02, 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 01, 2021
    • Robert Roland's avatar
      Adding the ability to sync admin groups in EE (#14993) · 391c4eb9
      Robert Roland authored
      
      * Adding the ability to sync admin groups in EE
      
      Adds a LDAP setting for EE to enable to LDAP Administrator group syncs.
      
      Adds the setting to admin UI to enable syncing of the admin group.
      
      Removes two unused settings from the OSS side.
      
      metabase/metabase-enterprise#445
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      Unverified
      391c4eb9
    • 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
  18. Feb 08, 2021
    • Cam Saul's avatar
      Show error messages in create/edit GTAP modal (#14673) · 43f51a05
      Cam Saul authored
      * Rework tests in api.gtap-test
      
      * Return actual error message when trying to save an invalid sandbox query
      
      * Minor refactor
      
      * GTAP modal should display errors
      
      * Fix flow failure
      
      * Test fix
      
      * Another flow fix :wrench:
      
      
      
      * Longer timeout for the test that keeps failing
      
      * Return error message as :message
      
      * New cache key for drivers/uberjar so Oracle/Vertica errors stop popping up
      
      * Revert cache key rotation
      
      * #14612 Repro: Sandboxing limitations should have meaningful UI error message/feedback (#14690)
      
      * Fix random Cypress test failures when fingerprinting fails?
      
      * Bump no-output-timeouts to 15m because CircleCI is extra slow lately
      
      Co-authored-by: default avatarNemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
      Unverified
      43f51a05
  19. Jan 29, 2021
  20. Dec 28, 2020
    • Kyle Doherty's avatar
      Remove `react-retina-image` package (#14205) · 2c1deee0
      Kyle Doherty authored
      * switch to srcset on GTAPModal
      
      * switch to srcset on SettingsSlackForm
      
      * switch to srcset on AlertModals
      
      * switch to srcset on Table
      
      * switch to srcset on WhatsAPulse
      
      * switch to srcset on SharingPane
      
      * switch to srcset on Overworld
      
      * switch to srcSet on Icon
      
      * switch to srcSet on EmbeddingLevel
      
      * remove react-retina-image package
      Unverified
      2c1deee0
  21. Oct 23, 2020
Loading