Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 04, 2023
    • Case Nelson's avatar
      [MLv2] Add function to sync join-condition temporal bucketing options (#32807) · 1ef3cd5d
      Case Nelson authored
      * [MLv2] Add function to sync join-condition temporal bucketing options
      
      * Return the modified join-condition instead of the whole query
      
      * Adding tests
      
      * Fix linter
      Unverified
      1ef3cd5d
    • Noah Moss's avatar
      Unverified
      3fe96902
    • Nemanja Glumac's avatar
      Run Cypress using Chromium `111.0.5563.146` (#32946) · 0f897c1d
      Nemanja Glumac authored
      * Install Chrome immediately after checkout
      
      * Switch to Chromium 111.0.5563.146
      Unverified
      0f897c1d
    • Kamil Mielnik's avatar
      Fix - Update Modal flickers on initial load (#32671) · b6036b5e
      Kamil Mielnik authored
      * Add actions dropdown to object detail modal (#32331)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Avoid using Database constructor
      - Use metadata.database() instead
      
      * Add integration tests for basic cases when action menu is rendered and not
      
      * Fix post-merge error
      
      * Endpoint to fetch implicit actions param values (#32466)
      
      * Add default update action to actions dropdown in object detail modal (#32433)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Sort imports
      
      * Rename initialValues to values
      
      * Rename dashcardParamValues to initialValues
      
      * Lift fetchInitialValues up from ActionParametersInputForm
      
      * Rename refetchValues to prefetchValues
      
      * Fix tests
      
      * Refactor shouldPrefetch to be a prop
      
      * Get rid of dashboard and dashcard props from ActionParametersInputForm
      
      * Lift the canPrefetch condition up as it is not desired outside of dashboards
      
      * Hook update action with temporary API
      
      * Use executeActionId in fetchInitialValues
      
      * Fix post-merge conflict
      
      * Rename prefetchValues to prefetchDashcardValues
      
      * Use the new endpoint
      
      * Use rem values instead of scale values
      - See https://github.com/metabase/metabase/pull/32331#discussion_r1267827835
      
      * Lift data reloading out of executeRowAction
      
      * Add onSuccess prop to ActionExecuteModal
      
      * Use onSubmitSuccess from ActionParametersInputForm
      
      * Reload question after action is successful
      
      * Fix stale prop issues in ActionParametersInputForm
      
      * Fix object id in initialValues
      
      * Add prefetchesInitialValues prop to make useActionForm more generic
      
      * Ignore public actions for now
      
      * Fix id mixup
      
      * Update unit test
      
      * Remove redundant memoization
      
      * Use modern JS syntax instead of noop
      
      * Move getNextId to __support__/utils
      
      * Extract isImplicitDeleteAction & isImplicitUpdateAction
      
      * Reuse isImplicitDeleteAction
      
      * Log error to console
      
      * Get rid of useLatest
      
      * Fix post-merge build error
      
      * Add a spinner to action modal when fetching values
      
      * Use Flex instead of styled component
      
      * Add default delete action to actions dropdown in object detail modal (#32556)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Sort imports
      
      * Rename initialValues to values
      
      * Rename dashcardParamValues to initialValues
      
      * Lift fetchInitialValues up from ActionParametersInputForm
      
      * Rename refetchValues to prefetchValues
      
      * Fix tests
      
      * Refactor shouldPrefetch to be a prop
      
      * Get rid of dashboard and dashcard props from ActionParametersInputForm
      
      * Lift the canPrefetch condition up as it is not desired outside of dashboards
      
      * Hook update action with temporary API
      
      * Use executeActionId in fetchInitialValues
      
      * Fix post-merge conflict
      
      * Rename prefetchValues to prefetchDashcardValues
      
      * Use the new endpoint
      
      * Use rem values instead of scale values
      - See https://github.com/metabase/metabase/pull/32331#discussion_r1267827835
      
      * Lift data reloading out of executeRowAction
      
      * Add onSuccess prop to ActionExecuteModal
      
      * Use onSubmitSuccess from ActionParametersInputForm
      
      * Reload question after action is successful
      
      * Fix stale prop issues in ActionParametersInputForm
      
      * Fix object id in initialValues
      
      * Add prefetchesInitialValues prop to make useActionForm more generic
      
      * Ignore public actions for now
      
      * Fix id mixup
      
      * Update unit test
      
      * Add DeleteObjectModal
      
      * Introduce useActionQuery
      
      * Use useActionQuery in DeleteObjectModal
      
      * Hook action execution
      
      * Fix typo in copy
      
      * Sort exports
      
      * Remove redundant memoization
      
      * Use modern JS syntax instead of noop
      
      * Move getNextId to __support__/utils
      
      * Extract isImplicitDeleteAction & isImplicitUpdateAction
      
      * Reuse isImplicitDeleteAction
      
      * Fix object modal getting closed with Escape key when delete or update modals are open
      
      * Rename isUpdateModalOpen to isActionExecuteModalOpen, updateActionId to actionId
      
      * Navigate to sibling row or close the modal on deletion
      
      * Revert "Navigate to sibling row or close the modal on deletion"
      
      This reverts commit 8b24685eee5cd968f53cc14b7194a66588fb5845.
      
      * Close object detail on deletion
      
      * Add error handling
      
      * Add error handling
      
      * Greatly simplify DeleteObjectModal
      - remove useActionQuery usage
      - remove useActionQuery
      - remove DeleteObjectModal.styled.tsx
      
      * Improve diff
      
      * Shorten code
      
      * Always cast objectId to number
      - See https://metaboat.slack.com/archives/C057T1QTB3L/p1690292706101109?thread_ts=1690279562.697669&cid=C057T1QTB3L
        "the reason you’re not seeing it fail on the sample dataset is probably because you’re
        using h2 for sample-dataset. it’ll fail the same if you use a postgres one.
        h2 is probably more loose in type so it allows sending a string for id.
        nevertheless, I think you can use cast it to the correct type using the param type.
        I think we did that on the UI where we execute actions from model details page."
      
      * Inline disabled into JSX
      
      * Use a more friendly error message when failed to delete an object because it's referenced by other objects
      - See: https://metaboat.slack.com/archives/C057LE0Q4PQ/p1690377421352469?thread_ts=1690208614.530869&cid=C057LE0Q4PQ
      
      * Use useAsyncFn to avoid race conditions
      
      * Add typing to NO_VALUES constant
      
      * Remove redundant condition
      
      * Introduce useActionQuery hook
      
      * Get rid of HOCs in ActionExecuteModal using useActionQuery
      
      * Do not crash app on unexpected events
      
      * Refactor ActioExecuteModal to use named export
      
      * WIP: Lift data fetching out ActionParametersInputForm
      - Update ActionExecuteModal
      - TODO:
        - update from dashboard does not work yet
        - other usages
      
      * Revert "Use a more friendly error message when failed to delete an object because it's referenced by other objects"
      
      This reverts commit 28327ac9b53ae92300e579d047b7f136d54e581e.
      
      Friendly message is going to be implemented in https://github.com/metabase/metabase/issues/32694
      
      * Rename initialValues back to dashcardParamValues in ActionVizForm
      
      * Don't move ActionExecuteModal to keep nice diff
      
      * Fix export
      
      * Fix typing
      
      * Handle empty state in ActionExecuteModal
      
      * Move useActionInitialValues to hooks
      
      * Tests for basic deletes and updates on object detail views (#32525)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Sort imports
      
      * Rename initialValues to values
      
      * Rename dashcardParamValues to initialValues
      
      * Lift fetchInitialValues up from ActionParametersInputForm
      
      * Rename refetchValues to prefetchValues
      
      * Fix tests
      
      * Refactor shouldPrefetch to be a prop
      
      * Get rid of dashboard and dashcard props from ActionParametersInputForm
      
      * Lift the canPrefetch condition up as it is not desired outside of dashboards
      
      * Hook update action with temporary API
      
      * Use executeActionId in fetchInitialValues
      
      * Fix post-merge conflict
      
      * Rename prefetchValues to prefetchDashcardValues
      
      * Use the new endpoint
      
      * Use rem values instead of scale values
      - See https://github.com/metabase/metabase/pull/32331#discussion_r1267827835
      
      
      
      * Lift data reloading out of executeRowAction
      
      * Add onSuccess prop to ActionExecuteModal
      
      * Use onSubmitSuccess from ActionParametersInputForm
      
      * Reload question after action is successful
      
      * Fix stale prop issues in ActionParametersInputForm
      
      * Fix object id in initialValues
      
      * Add prefetchesInitialValues prop to make useActionForm more generic
      
      * Add test cases for other types of actions
      
      * Ignore public actions for now
      
      * Add e2e test for actions in object detail view
      
      * Add second step and extract helpers
      
      * Remove duplication by changing hierarchy
      
      * Add step with enabling model actions
      
      * Fix visiting model page
      
      * Remove redundant code
      
      * Ignore public actions for now
      
      * Fix id mixup
      
      * Update unit test
      
      * Add objectId argument and function to open the modal
      
      * Define whole order object to reuse
      
      * Implement assertOrderFormPrefilled
      
      * Assert Created At
      
      * Add assertion to check whether object with new id has been reloaded
      
      * Use all caps for constants
      
      * Verify updating an object
      
      * Fix test name
      
      * Assert toast is shown on update
      
      * Format code
      
      * Use writable tables instead of sample db to avoid persisting updates between tests
      - do not mock objects, assert against whatever comes from API
      
      * Format code to wake GitHub up
      
      * Add DeleteObjectModal
      
      * Introduce useActionQuery
      
      * Use useActionQuery in DeleteObjectModal
      
      * Hook action execution
      
      * Fix typo in copy
      
      * Sort exports
      
      * Remove redundant memoization
      
      * Use modern JS syntax instead of noop
      
      * Move getNextId to __support__/utils
      
      * Extract isImplicitDeleteAction & isImplicitUpdateAction
      
      * Reuse isImplicitDeleteAction
      
      * Fix object modal getting closed with Escape key when delete or update modals are open
      
      * Rename isUpdateModalOpen to isActionExecuteModalOpen, updateActionId to actionId
      
      * Navigate to sibling row or close the modal on deletion
      
      * Revert "Navigate to sibling row or close the modal on deletion"
      
      This reverts commit 8b24685eee5cd968f53cc14b7194a66588fb5845.
      
      * Close object detail on deletion
      
      * Add error handling
      
      * Add error handling
      
      * Greatly simplify DeleteObjectModal
      - remove useActionQuery usage
      - remove useActionQuery
      - remove DeleteObjectModal.styled.tsx
      
      * Improve diff
      
      * Shorten code
      
      * Rename initialValues back to dashcardParamValues in ActionVizForm
      
      * Extract assertScoreUpdatedInTable
      
      * Extract visitModelDetail
      
      * Add deletion and toast assertion
      
      * Remove unused arguments
      
      * Assert delete failed
      
      * Update tests order after starting with writable db
      
      * Move assertions to beginning of the test, remove enableDatabaseActions
      
      * Test disabling model actions
      
      * Add extra assertion
      
      * Update names
      
      * Update the deletion assertion
      
      * Remove unused code
      
      * Wrap tests in another describe, setup dashboard test
      
      * Fix setup, use asAdmin util
      
      * Add assertion for dashboard object view
      
      * Update test names
      
      * Extract actions to a constant
      
      * Add test to open update object modal
      
      * Update assertion order
      
      * Add test to open delete object modal
      
      * Organize tests
      
      * Add a test case for implicit public delete action & implicit archived delete action
      
      * Remove redundant async
      
      * Reuse findActionInActionMenu
      
      * Remove redundant constant
      
      * Fix tests
      
      * Add a test case for databases with disabled actions
      
      * Update wording
      
      * Use dataset instad of a query question
      
      * Revert name change as it does not make sense
      
      * Format code
      
      * Add a test case for users with no write permission
      
      * Add a test case for when showControls is false
      
      * Add a test case for models with clauses
      
      * Use metadata.question() instead of new Question()
      
      * Remove duplicated code
      
      * Update ActionVizForm
      
      * Improve success callback in ActionExecuteModal
      
      * Remove commented out code
      
      * Update test to account for the loading state
      
      * Fix import and name
      
      * Move test cases to ActionExecuteModal
      
      * Extract Options interface
      
      * Move the "Choose a record to update" empty state to ActionParametersInputModal (the only place where it's used)
      - Remove hasPrefetchedValues
      
      * Update test with missing prop
      
      * Clean up ActionExecuteModal tests
      
      * Add ActionVizForm test suite
      
      * Rename Props back to ActionExecuteModalProps for consistency
      
      * Tests for various number of PKs in a model (#32784)
      
      * Add a test case for 0 PKs in a model
      
      * Add a test case for 2 PKs in a model
      
      * Improve test names
      
      * Fix typo
      
      * Use plural form for "PK"
      
      * Fix header action not shown in empty state
      
      * Bring back hasPrefetchedValues
      - this is to avoid showing spinner when initial values have already been loaded (e.g. when automatically closing the ExecuteActionModal after successful update)
      
      * Bring back hasPrefetchedValues logic and update tests
      
      * ESLint
      
      * Use checkNotNull
      
      * Fix handling 0 as an id in initialValues in ObjectDetail
      
      * Add assertion that the flicker that used to occur before this PR does not occur anymore
      
      ---------
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Unverified
      b6036b5e
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Add tests to dashboard should work if some cards are broken (#32910) · 9c64560d
      Mahatthana (Kelvin) Nomsawadi authored
      * Add a repro
      
      * Not hardcoding the question IDs
      
      * Address review: Improve readability
      Unverified
      9c64560d
    • Anton Kulyk's avatar
      Make it easier to configure `QueryColumnPicker` color (#32893) · 2181d118
      Anton Kulyk authored
      * Add `ColorName` type to `metabase/lib/colors`
      
      * Add `color` prop to `BucketPickerPopover`
      
      * Add `color` prop `QueryColumnPicker`
      
      * Fix `AggregationPicker`
      
      * Fix `AggregateStep`
      
      * Fix `BreakoutStep`
      
      * Fix `SortStep`
      
      * Fix bucket picker in `SummarizeSidebar`
      
      * Avoid redundant `div`
      Unverified
      2181d118
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Add tests to showing most recent dashboard revisions (#32899) · 31a8c321
      Mahatthana (Kelvin) Nomsawadi authored
      * Reuse dashboard E2E util
      
      * Add the repro
      
      * Add UI assertion to avoid ambiguity
      Unverified
      31a8c321
    • Vamsi Peri's avatar
    • Nemanja Glumac's avatar
      Unverified
      ddadd1c3
    • Ryan Laurie's avatar
      Improve actions-in-object-detail test (#32922) · 4560ef7f
      Ryan Laurie authored
      
      * dont hard code table ID in actions test
      
      * simplify test
      
      * break down and wait more, remove page loads
      
      * Remove superfluous intercept and wait
      
      * Make sure repaint happened
      
      * Make sure virtualized table populates all rows
      
      * Add grep tags
      
      * Increase the request timeout
      
      ---------
      
      Co-authored-by: default avatarNemanja <31325167+nemanjaglumac@users.noreply.github.com>
      Unverified
      4560ef7f
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Add repro to undo move dashboard doesn't always work in v44 (#32835) · 5d66b0f4
      Mahatthana (Kelvin) Nomsawadi authored
      * Add repro
      
      * Correct new E2E helper behavior
      Unverified
      5d66b0f4
  2. Aug 03, 2023
  3. Aug 02, 2023
    • Cam Saul's avatar
      `join-condition-lhs-display-name` should use join condition LHS (#32805) · 2b0a2400
      Cam Saul authored
      * `join-condition-lhs-display-name` should use join condition LHS
      
      * Revert testing context changes
      
      * Appease the whitespace linter
      Unverified
      2b0a2400
    • Cam Saul's avatar
    • Jesse Devaney's avatar
      Enable parameter mapping for heading dash-cards (#32462) · 84537554
      Jesse Devaney authored
      
      * add parameter mapping to heading cards
      
      * update unit tests for new props
      
      * memoize parameter mapped content
      
      * add heading card tests to text parameters spec
      
      * update test descriptions
      
      * add BE for params/substitute_tags
      
      * fix tests
      
      * fix test
      
      * update FE parameter substitution to use optional flag
      
      * heading cards should not escape characters
      
      * add test for dashboard sub
      
      * remove invalid specs -> desired behavior changed
      
      - enabled parameter mapping for heading cards
        - in parameter editing mode, we should display the option to map a parameter to a heading text variable, so we should not display the original text
      
      * fix react hook dependencies
      
      * improve parameterValues type
      
      * refactor E2E test to a unit test
      
      * address nits
      
      * fix spacing
      
      * update types and add unit tests
      
      * fix type errors
      
      ---------
      
      Co-authored-by: default avatarJerry Huang <jhuang37050@gmail.com>
      Unverified
      84537554
    • Aleksandr Lesnenko's avatar
    • Jeff Bruemmer's avatar
    • Anton Kulyk's avatar
      Allow `w` and `h` props usage in eslint for Mantine (#32859) · 68d74966
      Anton Kulyk authored
      * Allow `w` and `h` prop for Mantine
      
      * Run prettier
      Unverified
      68d74966
    • Noah Moss's avatar
      Fully prevent open redirects during JWT/SAML auth (#32801) · 572105fa
      Noah Moss authored
      
      * patch jwt open redirect issue
      
      * clean imports
      
      * Update enterprise/backend/src/metabase_enterprise/sso/integrations/saml.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * fix build
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Unverified
      572105fa
    • shaun's avatar
    • Cam Saul's avatar
    • Braden Shepherdson's avatar
    • Kamil Mielnik's avatar
      [Epic] Allow basic deletes and updates on object detail views - Milestone 1 (#32470) · 338e80ba
      Kamil Mielnik authored
      * Add actions dropdown to object detail modal (#32331)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Avoid using Database constructor
      - Use metadata.database() instead
      
      * Add integration tests for basic cases when action menu is rendered and not
      
      * Fix post-merge error
      
      * Endpoint to fetch implicit actions param values (#32466)
      
      * Add default update action to actions dropdown in object detail modal (#32433)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Sort imports
      
      * Rename initialValues to values
      
      * Rename dashcardParamValues to initialValues
      
      * Lift fetchInitialValues up from ActionParametersInputForm
      
      * Rename refetchValues to prefetchValues
      
      * Fix tests
      
      * Refactor shouldPrefetch to be a prop
      
      * Get rid of dashboard and dashcard props from ActionParametersInputForm
      
      * Lift the canPrefetch condition up as it is not desired outside of dashboards
      
      * Hook update action with temporary API
      
      * Use executeActionId in fetchInitialValues
      
      * Fix post-merge conflict
      
      * Rename prefetchValues to prefetchDashcardValues
      
      * Use the new endpoint
      
      * Use rem values instead of scale values
      - See https://github.com/metabase/metabase/pull/32331#discussion_r1267827835
      
      * Lift data reloading out of executeRowAction
      
      * Add onSuccess prop to ActionExecuteModal
      
      * Use onSubmitSuccess from ActionParametersInputForm
      
      * Reload question after action is successful
      
      * Fix stale prop issues in ActionParametersInputForm
      
      * Fix object id in initialValues
      
      * Add prefetchesInitialValues prop to make useActionForm more generic
      
      * Ignore public actions for now
      
      * Fix id mixup
      
      * Update unit test
      
      * Remove redundant memoization
      
      * Use modern JS syntax instead of noop
      
      * Move getNextId to __support__/utils
      
      * Extract isImplicitDeleteAction & isImplicitUpdateAction
      
      * Reuse isImplicitDeleteAction
      
      * Log error to console
      
      * Get rid of useLatest
      
      * Fix post-merge build error
      
      * Add default delete action to actions dropdown in object detail modal (#32556)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Sort imports
      
      * Rename initialValues to values
      
      * Rename dashcardParamValues to initialValues
      
      * Lift fetchInitialValues up from ActionParametersInputForm
      
      * Rename refetchValues to prefetchValues
      
      * Fix tests
      
      * Refactor shouldPrefetch to be a prop
      
      * Get rid of dashboard and dashcard props from ActionParametersInputForm
      
      * Lift the canPrefetch condition up as it is not desired outside of dashboards
      
      * Hook update action with temporary API
      
      * Use executeActionId in fetchInitialValues
      
      * Fix post-merge conflict
      
      * Rename prefetchValues to prefetchDashcardValues
      
      * Use the new endpoint
      
      * Use rem values instead of scale values
      - See https://github.com/metabase/metabase/pull/32331#discussion_r1267827835
      
      * Lift data reloading out of executeRowAction
      
      * Add onSuccess prop to ActionExecuteModal
      
      * Use onSubmitSuccess from ActionParametersInputForm
      
      * Reload question after action is successful
      
      * Fix stale prop issues in ActionParametersInputForm
      
      * Fix object id in initialValues
      
      * Add prefetchesInitialValues prop to make useActionForm more generic
      
      * Ignore public actions for now
      
      * Fix id mixup
      
      * Update unit test
      
      * Add DeleteObjectModal
      
      * Introduce useActionQuery
      
      * Use useActionQuery in DeleteObjectModal
      
      * Hook action execution
      
      * Fix typo in copy
      
      * Sort exports
      
      * Remove redundant memoization
      
      * Use modern JS syntax instead of noop
      
      * Move getNextId to __support__/utils
      
      * Extract isImplicitDeleteAction & isImplicitUpdateAction
      
      * Reuse isImplicitDeleteAction
      
      * Fix object modal getting closed with Escape key when delete or update modals are open
      
      * Rename isUpdateModalOpen to isActionExecuteModalOpen, updateActionId to actionId
      
      * Navigate to sibling row or close the modal on deletion
      
      * Revert "Navigate to sibling row or close the modal on deletion"
      
      This reverts commit 8b24685eee5cd968f53cc14b7194a66588fb5845.
      
      * Close object detail on deletion
      
      * Add error handling
      
      * Add error handling
      
      * Greatly simplify DeleteObjectModal
      - remove useActionQuery usage
      - remove useActionQuery
      - remove DeleteObjectModal.styled.tsx
      
      * Improve diff
      
      * Shorten code
      
      * Always cast objectId to number
      - See https://metaboat.slack.com/archives/C057T1QTB3L/p1690292706101109?thread_ts=1690279562.697669&cid=C057T1QTB3L
        "the reason you’re not seeing it fail on the sample dataset is probably because you’re
        using h2 for sample-dataset. it’ll fail the same if you use a postgres one.
        h2 is probably more loose in type so it allows sending a string for id.
        nevertheless, I think you can use cast it to the correct type using the param type.
        I think we did that on the UI where we execute actions from model details page."
      
      * Inline disabled into JSX
      
      * Use a more friendly error message when failed to delete an object because it's referenced by other objects
      - See: https://metaboat.slack.com/archives/C057LE0Q4PQ/p1690377421352469?thread_ts=1690208614.530869&cid=C057LE0Q4PQ
      
      * Revert "Use a more friendly error message when failed to delete an object because it's referenced by other objects"
      
      This reverts commit 28327ac9b53ae92300e579d047b7f136d54e581e.
      
      Friendly message is going to be implemented in https://github.com/metabase/metabase/issues/32694
      
      * Rename initialValues back to dashcardParamValues in ActionVizForm
      
      * Tests for basic deletes and updates on object detail views (#32525)
      
      * Rename showActions to showControls
      
      * Use Flex
      
      * Import Flex from local modules
      
      * Make horizontalAttachments a prop in EntityMenu
      
      * Use EntityMenu to create actions dropdown
      
      * Render actions menu conditionally
      
      * Add useActionListQuery
      
      * Fetch actions in ObjectDetailHeader
      
      * Remove unused canRunActions prop
      
      * Move logic to root component
      
      * Fix tests
      
      * Use canRunAction and fetch databases in ObjectDetail view
      
      * Rename actions to actionItems and getActions to getActionItems
      
      * Extract getActionItems to utils
      
      * Update tests
      
      * Rename modelActions to actions
      
      * Extract isValidImplicitDeleteAction and isValidImplicitUpdateAction out of getActionItems
      
      * Consolidate getActionItems
      
      * Use theme scale values for Mantine Flex component
      
      * Either render all controls or none
      
      * Fix default props/state in EntityMenu
      
      * Fix props
      
      * Update ObjectDetail unit tests
      
      * Add unit tests for isValidImplicitDeleteAction and isValidImplicitUpdateAction
      
      * Update tests with more specific non-implicit action cases
      
      * Use singular form to match function interface
      
      * Add unit tests for getActionItems
      
      * Update test case name
      
      * Sort imports
      
      * Rename initialValues to values
      
      * Rename dashcardParamValues to initialValues
      
      * Lift fetchInitialValues up from ActionParametersInputForm
      
      * Rename refetchValues to prefetchValues
      
      * Fix tests
      
      * Refactor shouldPrefetch to be a prop
      
      * Get rid of dashboard and dashcard props from ActionParametersInputForm
      
      * Lift the canPrefetch condition up as it is not desired outside of dashboards
      
      * Hook update action with temporary API
      
      * Use executeActionId in fetchInitialValues
      
      * Fix post-merge conflict
      
      * Rename prefetchValues to prefetchDashcardValues
      
      * Use the new endpoint
      
      * Use rem values instead of scale values
      - See https://github.com/metabase/metabase/pull/32331#discussion_r1267827835
      
      
      
      * Lift data reloading out of executeRowAction
      
      * Add onSuccess prop to ActionExecuteModal
      
      * Use onSubmitSuccess from ActionParametersInputForm
      
      * Reload question after action is successful
      
      * Fix stale prop issues in ActionParametersInputForm
      
      * Fix object id in initialValues
      
      * Add prefetchesInitialValues prop to make useActionForm more generic
      
      * Add test cases for other types of actions
      
      * Ignore public actions for now
      
      * Add e2e test for actions in object detail view
      
      * Add second step and extract helpers
      
      * Remove duplication by changing hierarchy
      
      * Add step with enabling model actions
      
      * Fix visiting model page
      
      * Remove redundant code
      
      * Ignore public actions for now
      
      * Fix id mixup
      
      * Update unit test
      
      * Add objectId argument and function to open the modal
      
      * Define whole order object to reuse
      
      * Implement assertOrderFormPrefilled
      
      * Assert Created At
      
      * Add assertion to check whether object with new id has been reloaded
      
      * Use all caps for constants
      
      * Verify updating an object
      
      * Fix test name
      
      * Assert toast is shown on update
      
      * Format code
      
      * Use writable tables instead of sample db to avoid persisting updates between tests
      - do not mock objects, assert against whatever comes from API
      
      * Format code to wake GitHub up
      
      * Add DeleteObjectModal
      
      * Introduce useActionQuery
      
      * Use useActionQuery in DeleteObjectModal
      
      * Hook action execution
      
      * Fix typo in copy
      
      * Sort exports
      
      * Remove redundant memoization
      
      * Use modern JS syntax instead of noop
      
      * Move getNextId to __support__/utils
      
      * Extract isImplicitDeleteAction & isImplicitUpdateAction
      
      * Reuse isImplicitDeleteAction
      
      * Fix object modal getting closed with Escape key when delete or update modals are open
      
      * Rename isUpdateModalOpen to isActionExecuteModalOpen, updateActionId to actionId
      
      * Navigate to sibling row or close the modal on deletion
      
      * Revert "Navigate to sibling row or close the modal on deletion"
      
      This reverts commit 8b24685eee5cd968f53cc14b7194a66588fb5845.
      
      * Close object detail on deletion
      
      * Add error handling
      
      * Add error handling
      
      * Greatly simplify DeleteObjectModal
      - remove useActionQuery usage
      - remove useActionQuery
      - remove DeleteObjectModal.styled.tsx
      
      * Improve diff
      
      * Shorten code
      
      * Rename initialValues back to dashcardParamValues in ActionVizForm
      
      * Extract assertScoreUpdatedInTable
      
      * Extract visitModelDetail
      
      * Add deletion and toast assertion
      
      * Remove unused arguments
      
      * Assert delete failed
      
      * Update tests order after starting with writable db
      
      * Move assertions to beginning of the test, remove enableDatabaseActions
      
      * Test disabling model actions
      
      * Add extra assertion
      
      * Update names
      
      * Update the deletion assertion
      
      * Remove unused code
      
      * Wrap tests in another describe, setup dashboard test
      
      * Fix setup, use asAdmin util
      
      * Add assertion for dashboard object view
      
      * Update test names
      
      * Extract actions to a constant
      
      * Add test to open update object modal
      
      * Update assertion order
      
      * Add test to open delete object modal
      
      * Organize tests
      
      * Add a test case for implicit public delete action & implicit archived delete action
      
      * Remove redundant async
      
      * Reuse findActionInActionMenu
      
      * Remove redundant constant
      
      * Fix tests
      
      * Add a test case for databases with disabled actions
      
      * Update wording
      
      * Use dataset instad of a query question
      
      * Revert name change as it does not make sense
      
      * Format code
      
      * Add a test case for users with no write permission
      
      * Add a test case for when showControls is false
      
      * Add a test case for models with clauses
      
      * Use metadata.question() instead of new Question()
      
      * Tests for various number of PKs in a model (#32784)
      
      * Add a test case for 0 PKs in a model
      
      * Add a test case for 2 PKs in a model
      
      * Improve test names
      
      * Fix typo
      
      * Use plural form for "PK"
      
      ---------
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Unverified
      338e80ba
    • Ngoc Khuat's avatar
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Fix long running queries possibly piling up via auto-refresh (#32754) · 6548584c
      Mahatthana (Kelvin) Nomsawadi authored
      * Simplify the code that fixes dashboard tab race condition
      
      Remove a part of dashboard reducer that addressed the race condition
      from https://github.com/metabase/metabase/pull/31578/files#r1240203745.
      
      I revert the code back to make it simpler and fix the race condition by
      calling certain actions in the right order.
      
      * Update the todo comment to use more standard todo tag
      
      * Prevent fetching a dashcard when the previous API isn't done and is auto-refresh
      
      * Only skip loading new dashcard on dashcoard auto refresh
      
      * fixup! Simplify the code that fixes dashboard tab race condition
      
      * Clean up dashboard action
      
      Rename an action with misleading name
      
      * Make the boolean flag easier to understand
      
      * fixup! Make the boolean flag easier to understand
      
      * Add E2E
      
      * Remove commented out code
      
      * Correct `startTime` behavior
      
      * Fix the case when navigating between dashboards
      
      * Make isRefreshing logic easier to follow
      
      * Fix failed unit tests
      Unverified
      6548584c
    • Braden Shepherdson's avatar
      [MLv2] Add `lib.field/add-field` and `remove-field` (#32679) · b24f62e6
      Braden Shepherdson authored
      These are "porcelain" APIs to make FE management of the set of selected
      columns for a query much easier.
      
      `add-field` and `remove-field` will handle regular table fields,
      explicit join fields, and custom expressions correctly.
      
      One known quirk: if the set of `:fields` on a stage happens to match the
      default set, this is *not* noticed or fixed. Once an explicit list is
      set on a stage, it will forever have a list.
      Unverified
      b24f62e6
    • Nemanja Glumac's avatar
      Revert running E2E tests on Electron (#32800) · 781449b0
      Nemanja Glumac authored
      #32734 introduced a commit that removed "Chrome" as a predefined browser that Cypress runs on.
      This was needed due to frequent failures that were interfering with the release process.
      
      Even if we decide to switch to Electron, let's do it in a dedicated commit for easier git blame.
      We'll forget in a month already why a commit called "Disallow new H2 connections" switched E2E tests to Electron.
      Unverified
      781449b0
    • Nemanja Glumac's avatar
      Fix the failing E2E test in questions/settings (#32821) · 8d366f21
      Nemanja Glumac authored
      Breaking change was introduced in #32791.
      Unverified
      8d366f21
Loading