fix(SaveQueryDialog): should not duplicate component in DOM #1649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant refactoring to the
QueryEditor
andSaveQuery
components, focusing on integrating theNiceModal
library for improved modal handling. The changes also include updates to theSaveQueryDialog
and related components to enhance their functionality and usability.Key changes include:
Integration of
NiceModal
:src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx
: ImportedNiceModal
and replaced the direct usage ofSaveQueryDialog
withNiceModal.show
to display the dialog. [1] [2] [3] [4]src/containers/Tenant/Query/SaveQuery/SaveQuery.tsx
: IntroducedNiceModal
for showing theSaveQueryDialog
and createdSaveQueryDialogNiceModal
for modal registration. [1] [2] [3] [4] [5] [6]Refactoring of
SaveQueryDialog
:src/containers/Tenant/Query/SaveQuery/SaveQuery.tsx
: RefactoredSaveQueryDialog
to accept additional props (onClose
,open
) and updated its implementation to work withNiceModal
. [1] [2] [3]Removal of Unused Query Actions:
src/store/reducers/queryActions/types.ts
: Removed thesave
action from theQueryActions
type as it is no longer needed with the new modal handling.Hook Updates:
src/utils/hooks/withConfirmation/useChangeInputWithConfirmation.tsx
: Updated theExtendedSaveQueryButton
component to useNiceModal
for handling confirmation dialogs and refactored the related logic.Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Bundle Size: ✅
Current: 66.11 MB | Main: 66.11 MB
Diff: 0.00 MB (-0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information