finos / legend-studio

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

Allow DND column and explorer property to filter condition #3340

Closed travisstebbins closed 3 months ago

travisstebbins commented 3 months ago

Summary

This change allows users to drag a property from the explorer panel or a column from the fetch structure panel and drop it on a filter condition value. This enables users to create a filter where they can directly compare one model property to another model property, which is not currently possible without manually editing the filter in text mode.

How did you test this change?

DND valid explorer property to filter panel: DNDValidExplorerNode

DND invalid explorer property to filter panel: DNVInvalidExplorerNode

DND valid fetch structure column to filter panel: DNDValidFetchStructureColumn

DND invalid fetch structure column to filter panel: DNDInvalidFetchStructureColumn

DND derived property from explorer panel to filter panel: DNDDerivedPropFromExplorer

DND derived property from fetch structure panel to filter panel: DNDDerivedPropFromFetchStructure

End-to-end example of using derived properties: DerivedProperty_E2E_Example

Collection (exploded) property: ExplodedProperty

Editing pure code: EditingPure

Constants still work: DNDConstant

Parameters still work: DNDParameter

Post-filter panel still works: PostFilter

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: bba5731e4c9ebe5690ad1085bb940d93bfaaf8bc

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-bootstrap | 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-deployment | 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-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 3 months ago

Codecov Report

Attention: Patch coverage is 90.07804% with 89 lines in your changes missing coverage. Please review.

Project coverage is 46.26%. Comparing base (ce3f9fd) to head (bba5731).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3340 +/- ## ========================================== + Coverage 46.17% 46.26% +0.08% ========================================== Files 2089 2090 +1 Lines 358279 358866 +587 Branches 10891 15411 +4520 ========================================== + Hits 165446 166028 +582 + Misses 192201 191897 -304 - Partials 632 941 +309 ``` | [Files](https://app.codecov.io/gh/finos/legend-studio/pull/3340?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | Coverage Δ | | |---|---|---| | [.../\_\_test-utils\_\_/QueryBuilderComponentTestUtils.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2F__test-utils__%2FQueryBuilderComponentTestUtils.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvX190ZXN0LXV0aWxzX18vUXVlcnlCdWlsZGVyQ29tcG9uZW50VGVzdFV0aWxzLnRzeA==) | `97.80% <100.00%> (+0.22%)` | :arrow_up: | | [...y-builder/src/stores/QueryBuilderStateHashUtils.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2FQueryBuilderStateHashUtils.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9RdWVyeUJ1aWxkZXJTdGF0ZUhhc2hVdGlscy50cw==) | `100.00% <100.00%> (ø)` | | | [...ter/operators/QueryBuilderPostFilterOperator\_In.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffetch-structure%2Ftds%2Fpost-filter%2Foperators%2FQueryBuilderPostFilterOperator_In.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9mZXRjaC1zdHJ1Y3R1cmUvdGRzL3Bvc3QtZmlsdGVyL29wZXJhdG9ycy9RdWVyeUJ1aWxkZXJQb3N0RmlsdGVyT3BlcmF0b3JfSW4udHM=) | `75.25% <100.00%> (ø)` | | | [...rc/stores/filter/QueryBuilderFilterStateBuilder.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffilter%2FQueryBuilderFilterStateBuilder.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9maWx0ZXIvUXVlcnlCdWlsZGVyRmlsdGVyU3RhdGVCdWlsZGVyLnRz) | `54.77% <100.00%> (ø)` | | | [...lter/operators/QueryBuilderFilterOperator\_Equal.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffilter%2Foperators%2FQueryBuilderFilterOperator_Equal.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9maWx0ZXIvb3BlcmF0b3JzL1F1ZXJ5QnVpbGRlckZpbHRlck9wZXJhdG9yX0VxdWFsLnRz) | `98.87% <100.00%> (ø)` | | | [...ors/QueryBuilderFilterOperator\_GreaterThanEqual.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffilter%2Foperators%2FQueryBuilderFilterOperator_GreaterThanEqual.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9maWx0ZXIvb3BlcmF0b3JzL1F1ZXJ5QnVpbGRlckZpbHRlck9wZXJhdG9yX0dyZWF0ZXJUaGFuRXF1YWwudHM=) | `80.26% <100.00%> (-0.26%)` | :arrow_down: | | [...r/operators/QueryBuilderFilterOperator\_LessThan.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffilter%2Foperators%2FQueryBuilderFilterOperator_LessThan.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9maWx0ZXIvb3BlcmF0b3JzL1F1ZXJ5QnVpbGRlckZpbHRlck9wZXJhdG9yX0xlc3NUaGFuLnRz) | `96.71% <100.00%> (-0.05%)` | :arrow_down: | | [...rators/QueryBuilderFilterOperator\_LessThanEqual.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Ffilter%2Foperators%2FQueryBuilderFilterOperator_LessThanEqual.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9maWx0ZXIvb3BlcmF0b3JzL1F1ZXJ5QnVpbGRlckZpbHRlck9wZXJhdG9yX0xlc3NUaGFuRXF1YWwudHM=) | `79.60% <100.00%> (-0.27%)` | :arrow_down: | | [...rc/stores/shared/ValueSpecificationEditorHelper.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fstores%2Fshared%2FValueSpecificationEditorHelper.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL3N0b3Jlcy9zaGFyZWQvVmFsdWVTcGVjaWZpY2F0aW9uRWRpdG9ySGVscGVyLnRz) | `70.91% <100.00%> (+1.83%)` | :arrow_up: | | [.../src/components/shared/QueryBuilderFilterHelper.ts](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2Fshared%2FQueryBuilderFilterHelper.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvc2hhcmVkL1F1ZXJ5QnVpbGRlckZpbHRlckhlbHBlci50cw==) | `98.03% <98.03%> (ø)` | | | ... and [10 more](https://app.codecov.io/gh/finos/legend-studio/pull/3340?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | | ... and [231 files with indirect coverage changes](https://app.codecov.io/gh/finos/legend-studio/pull/3340/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos)