-
- Downloads
Add custom warning message when leaving creating/editing a query action in...
Add custom warning message when leaving creating/editing a query action in model details page (#34192) * Replace useBeforeUnload with LeaveConfirmationModal in ActionCreator * Take action name and action settings changes into account when computing isDirty * Improve action name change detection * Rename handleFormSettingsChange to patchFormSettings * Rename handleActionChange to patchAction * Introduce a way to sync initial action state after creation/update * Sync initial action state after creation/update * Add a hack for re-rendering * Revert "fixing" isDirty flag * Replace delay hack with an effect * Improve ActionCreatorModal setup - use actual component, not the mock - move waiting for spinner outside of setup, as it is initialRoute-dependent - ensure history object is always present - add missing setupDatabaseEndpoints call * Add a test for showing custom unsaved changes warning modal * Update default mock query action's visualization_settings * Add a test for not showing custom unsaved changes warning modal * Fix isDirty flag evaluation * Group similar tests * Add tests for creating new action * Remove redundant spread * Use local action * Fix typo * Add a test for updating an action * Add a test for creating an action * Fix a flake * Add missing router in tests setup * Enable LeaveConfirmationModal only in ActionCreatorModal with a dedicated route - see action-related edge cases in https://github.com/metabase/metabase/issues/34114 * Fix flaking test by waiting for modal to close * Make assertion consistent * Fix flaky unit tests * Refactor isDirty computation * Add a way to skip unsaved changes warning when submitting the modal * Remove setAction * Bring back old logic * Undo rename * Update comment * Update comment * Add areActionsEqual to deal with redundant "value" attribute of action parameter * Omit "hasVariableTemplateTagTarget", compute visualization settings diff based on form state * Revert unnecessary change * Revert unnecessary change * Rename getActionCrudParameters to getCleanParameters * Revert unnecessary change * Revert unnecessary change * Simplify isDirty computation with Question.prototype.isDirtyComparedTo * Revert leftover code * Remove duplicated assertion * Update test to detect correctness of isDirty flag when user reverts changes
Showing
- frontend/src/metabase/actions/components/ActionViz/Action.unit.spec.tsx 4 additions, 0 deletions...etabase/actions/components/ActionViz/Action.unit.spec.tsx
- frontend/src/metabase/actions/containers/ActionCreator/ActionContext/QueryActionContextProvider/QueryActionContextProvider.tsx 19 additions, 8 deletions...QueryActionContextProvider/QueryActionContextProvider.tsx
- frontend/src/metabase/actions/containers/ActionCreator/ActionCreator.tsx 32 additions, 8 deletions...tabase/actions/containers/ActionCreator/ActionCreator.tsx
- frontend/src/metabase/actions/containers/ActionCreator/ActionCreatorView.tsx 1 addition, 1 deletion...se/actions/containers/ActionCreator/ActionCreatorView.tsx
- frontend/src/metabase/actions/containers/ActionCreatorModal/ActionCreatorModal.tsx 11 additions, 1 deletion...ions/containers/ActionCreatorModal/ActionCreatorModal.tsx
- frontend/src/metabase/actions/containers/ActionCreatorModal/ActionCreatorModal.unit.spec.tsx 240 additions, 21 deletions...iners/ActionCreatorModal/ActionCreatorModal.unit.spec.tsx
- frontend/src/metabase/models/containers/ModelDetailPage/ModelDetailPage.unit.spec.tsx 1 addition, 1 deletion.../containers/ModelDetailPage/ModelDetailPage.unit.spec.tsx
Loading
Please register or sign in to comment