finos / legend-studio

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

Fix bug with calculated constant modal #3408

Closed travisstebbins closed 2 months ago

travisstebbins commented 3 months ago

Summary

This PR fixes a bug with the calculated constant modal. Previously, if the user entered an invalid expression in the calculated constant lambda editor and then clicked the cancel button, an backdrop element would still persist overlayed over the whole UI, making it impossible to interact with the UI.

Also, it optimizes the cloneQueryBuilderConstantLambdaEditorState function to make it more performant.

How did you test this change?

Example using calculated constant modal: DerivedConstant

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 7ccefc7a2a9219dce4e8f0374f3eaba552e9f537

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

This PR includes changesets to release 23 packages | Name | Type | | --------------------------------------------- | ----- | | @finos/legend-query-builder | Patch | | @finos/legend-application-query | Patch | | @finos/legend-application-studio | Patch | | @finos/legend-extension-dsl-data-quality | Patch | | @finos/legend-extension-dsl-data-space-studio | Patch | | @finos/legend-extension-dsl-data-space | Patch | | @finos/legend-extension-dsl-service | Patch | | @finos/legend-application-query-bootstrap | Patch | | @finos/legend-application-studio-bootstrap | Patch | | @finos/legend-extension-assortment | 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-vscode-extension-dependencies | 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

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.

Project coverage is 46.27%. Comparing base (f3a8062) to head (7ccefc7). Report is 3 commits behind head on master.

Files Patch % Lines
...components/QueryBuilderConstantExpressionPanel.tsx 0.00% 2 Missing :warning:
...y-builder/src/stores/QueryBuilderConstantsState.ts 87.50% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3408 +/- ## ========================================== - Coverage 46.32% 46.27% -0.06% ========================================== Files 2097 2097 Lines 360917 360992 +75 Branches 15607 15158 -449 ========================================== - Hits 167196 167047 -149 - Misses 192803 193509 +706 + Partials 918 436 -482 ``` | [Files](https://app.codecov.io/gh/finos/legend-studio/pull/3408?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | Coverage Δ | | |---|---|---| | [...components/QueryBuilderConstantExpressionPanel.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3408?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2FQueryBuilderConstantExpressionPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvUXVlcnlCdWlsZGVyQ29uc3RhbnRFeHByZXNzaW9uUGFuZWwudHN4) | `97.73% <0.00%> (-0.18%)` | :arrow_down: | | [...y-builder/src/stores/QueryBuilderConstantsState.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3408?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2FQueryBuilderConstantsState.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9RdWVyeUJ1aWxkZXJDb25zdGFudHNTdGF0ZS50cw==) | `80.57% <87.50%> (+0.22%)` | :arrow_up: | ... and [379 files with indirect coverage changes](https://app.codecov.io/gh/finos/legend-studio/pull/3408/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos)