finos / legend-studio

Legend Studio
https://legend.finos.org
Apache License 2.0
89 stars 114 forks source link

Query builder/editor require user confirmation when losing changes #3300

Open travisstebbins opened 3 months ago

travisstebbins commented 3 months ago

Summary

Prompt user for confirmation when they take an action that will cause loss of changes on a query:

How did you test this change?

Query builder

Warn after fetch structure change: QueryBuilder_FetchStructure_Warn

Warn after filter panel change: QueryBuilder_FilterPanel_Warn

Warn after parameter creation: QueryBuilder_Parameter_Warn

Warn after constant creation: QueryBuilder_Constant_Warn

Query editor (unsaved/new query)

Warn after fetch structure change: QueryEditor_FetchStructure_Warn

Warn after filter panel change: QueryEditor_FilterPanel_Warn

Warn after parameter creation: QueryEditor_Parameter_Warn

Warn after constant creation: QueryEditor_Constant_Warn

Query editor (saved query)

Warn after fetch structure change: QueryEditor_SavedQuery_FetchStructure

No warning when no change: QueryEditor_SavedQuery_NoWarn

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: e7840c240010a815e884a4427ee85deb4c00dceb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages | Name | Type | | --------------------------------------------- | ----- | | @finos/legend-extension-dsl-service | Patch | | @finos/legend-application-studio | Patch | | @finos/legend-application-query | Patch | | @finos/legend-query-builder | Patch | | @finos/legend-application-query-bootstrap | Patch | | @finos/legend-application-studio-bootstrap | Patch | | @finos/legend-extension-assortment | Patch | | @finos/legend-extension-dsl-data-space-studio | Patch | | @finos/legend-extension-dsl-diagram | Patch | | @finos/legend-extension-dsl-persistence | Patch | | @finos/legend-extension-dsl-text | Patch | | @finos/legend-extension-store-flat-data | Patch | | @finos/legend-extension-store-relational | Patch | | @finos/legend-extension-store-service-store | Patch | | @finos/legend-extension-dsl-data-space | Patch | | @finos/legend-application-query-deployment | Patch | | @finos/legend-application-studio-deployment | Patch | | @finos/legend-application-pure-ide | Patch | | @finos/legend-application-pure-ide-deployment | Patch | | @finos/legend-application-repl-deployment | Patch | | @finos/legend-server-showcase-deployment | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

linux-foundation-easycla[bot] commented 3 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 67.39130% with 30 lines in your changes missing coverage. Please review.

Project coverage is 47.90%. Comparing base (6763f24) to head (e7840c2). Report is 233 commits behind head on master.

Files with missing lines Patch % Lines
...d-application-query/src/stores/QueryEditorStore.ts 0.00% 7 Missing :warning:
...rc/stores/data-space/DataSpaceQueryCreatorStore.ts 0.00% 5 Missing :warning:
...r/src/components/QueryBuilderNavigationBlocker.tsx 0.00% 5 Missing :warning:
packages/legend-query-builder/src/index.ts 0.00% 4 Missing :warning:
...gend-query-builder/src/stores/QueryBuilderState.ts 94.44% 3 Missing :warning:
...c/components/Core_LegendQueryApplicationPlugin.tsx 0.00% 2 Missing :warning:
...ure/graph-fetch/QueryBuilderGraphFetchTreeState.ts 50.00% 2 Missing :warning:
...dio/src/components/editor/EmbeddedQueryBuilder.tsx 0.00% 1 Missing :warning:
...query/DSL_Service_LegendQueryApplicationPlugin.tsx 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3300 +/- ## ========================================== + Coverage 47.82% 47.90% +0.07% ========================================== Files 2019 2019 Lines 343383 343416 +33 Branches 10741 15122 +4381 ========================================== + Hits 164225 164505 +280 + Misses 178765 178025 -740 - Partials 393 886 +493 ``` | [Files with missing lines](https://app.codecov.io/gh/finos/legend-studio/pull/3300?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | Coverage Δ | | |---|---|---| | [...ery-builder/src/components/QueryBuilderSideBar.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2FQueryBuilderSideBar.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvUXVlcnlCdWlsZGVyU2lkZUJhci50c3g=) | `86.24% <100.00%> (+0.06%)` | :arrow_up: | | [...der/src/stores/QueryBuilderChangeDetectionState.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2FQueryBuilderChangeDetectionState.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9RdWVyeUJ1aWxkZXJDaGFuZ2VEZXRlY3Rpb25TdGF0ZS50cw==) | `52.41% <ø> (+5.82%)` | :arrow_up: | | [...e/QueryBuilderFetchStructureImplementationState.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffetch-structure%2FQueryBuilderFetchStructureImplementationState.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9mZXRjaC1zdHJ1Y3R1cmUvUXVlcnlCdWlsZGVyRmV0Y2hTdHJ1Y3R1cmVJbXBsZW1lbnRhdGlvblN0YXRlLnRz) | `100.00% <100.00%> (ø)` | | | [...stores/fetch-structure/tds/QueryBuilderTDSState.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffetch-structure%2Ftds%2FQueryBuilderTDSState.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9mZXRjaC1zdHJ1Y3R1cmUvdGRzL1F1ZXJ5QnVpbGRlclREU1N0YXRlLnRz) | `79.21% <100.00%> (+0.09%)` | :arrow_up: | | [...dio/src/components/editor/EmbeddedQueryBuilder.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-application-studio%2Fsrc%2Fcomponents%2Feditor%2FEmbeddedQueryBuilder.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLWFwcGxpY2F0aW9uLXN0dWRpby9zcmMvY29tcG9uZW50cy9lZGl0b3IvRW1iZWRkZWRRdWVyeUJ1aWxkZXIudHN4) | `94.24% <0.00%> (+4.31%)` | :arrow_up: | | [...query/DSL\_Service\_LegendQueryApplicationPlugin.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-extension-dsl-service%2Fsrc%2Fcomponents%2Fquery%2FDSL_Service_LegendQueryApplicationPlugin.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLWV4dGVuc2lvbi1kc2wtc2VydmljZS9zcmMvY29tcG9uZW50cy9xdWVyeS9EU0xfU2VydmljZV9MZWdlbmRRdWVyeUFwcGxpY2F0aW9uUGx1Z2luLnRzeA==) | `0.00% <0.00%> (ø)` | | | [...c/components/Core\_LegendQueryApplicationPlugin.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-application-query%2Fsrc%2Fcomponents%2FCore_LegendQueryApplicationPlugin.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLWFwcGxpY2F0aW9uLXF1ZXJ5L3NyYy9jb21wb25lbnRzL0NvcmVfTGVnZW5kUXVlcnlBcHBsaWNhdGlvblBsdWdpbi50c3g=) | `53.78% <0.00%> (+3.64%)` | :arrow_up: | | [...ure/graph-fetch/QueryBuilderGraphFetchTreeState.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffetch-structure%2Fgraph-fetch%2FQueryBuilderGraphFetchTreeState.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9mZXRjaC1zdHJ1Y3R1cmUvZ3JhcGgtZmV0Y2gvUXVlcnlCdWlsZGVyR3JhcGhGZXRjaFRyZWVTdGF0ZS50cw==) | `65.69% <50.00%> (+0.06%)` | :arrow_up: | | [...gend-query-builder/src/stores/QueryBuilderState.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2FQueryBuilderState.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9RdWVyeUJ1aWxkZXJTdGF0ZS50cw==) | `74.13% <94.44%> (+1.07%)` | :arrow_up: | | [packages/legend-query-builder/src/index.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Findex.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2luZGV4LnRz) | `0.00% <0.00%> (ø)` | | | ... and [3 more](https://app.codecov.io/gh/finos/legend-studio/pull/3300?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | | ... and [358 files with indirect coverage changes](https://app.codecov.io/gh/finos/legend-studio/pull/3300/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos)
stale[bot] commented 1 week ago

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.