finos / legend-studio

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

Enhance query filter editors #3285

Closed travisstebbins closed 3 weeks ago

travisstebbins commented 3 weeks ago

Summary

How did you test this change?

Enhance the query filter editor to behave similarly to fetch structure column name editor. Filter condition values should be displayed as blue editable text, and clicking the value shows the BasicValueSpecificationEditor to allow editing the value.

For date values, I have updated the DateInstanceValueEditor to take a displayAsEditableValue prop, so that instead of showing the default trigger button, it displays the blue, underlined editable text, and clicking on the text brings up the date picker popover.

"Is in"/"Is not in" filter value editors are not changed.

String filter: StringFilter

Numeric filter: NumericFilter

Date filter: DateFilter

Boolean filter: BooleanFilter

Enum filter: EnumFilter

Filter with an exploded property: ExplodedProperty

"is in" filter (unchanged): ListEditor

DND constant to filter value: NumericFilter_Constant

DND invalid constant to filter value: InvalidConstantFilter

Complex filter example: ComplexFilter

Filter with a property with a long name: FilterWithLongName

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: 6600a40cac796214296456b1fb20a19fa741fe2e

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

This PR includes changesets to release 25 packages | Name | Type | | --------------------------------------------- | ----- | | @finos/legend-application-studio | Patch | | @finos/legend-art | Patch | | @finos/legend-application-query-bootstrap | Patch | | @finos/legend-query-builder | 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-service | 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-application-pure-ide-deployment | Patch | | @finos/legend-application-pure-ide | Patch | | @finos/legend-application-query | Patch | | @finos/legend-application-repl-deployment | Patch | | @finos/legend-application-repl | Patch | | @finos/legend-application | Patch | | @finos/legend-extension-dsl-data-space | Patch | | @finos/legend-lego | Patch | | @finos/legend-application-query-deployment | Patch | | @finos/legend-application-studio-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 weeks ago

Codecov Report

Attention: Patch coverage is 93.55670% with 25 lines in your changes missing coverage. Please review.

Project coverage is 47.78%. Comparing base (9929468) to head (6600a40).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3285 +/- ## ========================================== + Coverage 47.71% 47.78% +0.06% ========================================== Files 2019 2019 Lines 342446 342743 +297 Branches 15081 10723 -4358 ========================================== + Hits 163415 163782 +367 - Misses 178176 178396 +220 + Partials 855 565 -290 ``` | [Files](https://app.codecov.io/gh/finos/legend-studio/pull/3285?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | Coverage Δ | | |---|---|---| | [...oup/service-editor/testable/ServiceTestsEditor.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-application-studio%2Fsrc%2Fcomponents%2Feditor%2Feditor-group%2Fservice-editor%2Ftestable%2FServiceTestsEditor.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLWFwcGxpY2F0aW9uLXN0dWRpby9zcmMvY29tcG9uZW50cy9lZGl0b3IvZWRpdG9yLWdyb3VwL3NlcnZpY2UtZWRpdG9yL3Rlc3RhYmxlL1NlcnZpY2VUZXN0c0VkaXRvci50c3g=) | `69.09% <100.00%> (ø)` | | | [...components/QueryBuilderConstantExpressionPanel.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?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.90% <100.00%> (ø)` | | | [...der/src/components/QueryBuilderParametersPanel.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2FQueryBuilderParametersPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvUXVlcnlCdWlsZGVyUGFyYW1ldGVyc1BhbmVsLnRzeA==) | `95.39% <100.00%> (ø)` | | | [...omponents/QueryBuilderPropertyExpressionEditor.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2FQueryBuilderPropertyExpressionEditor.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvUXVlcnlCdWlsZGVyUHJvcGVydHlFeHByZXNzaW9uRWRpdG9yLnRzeA==) | `83.01% <100.00%> (ø)` | | | [.../\_\_test-utils\_\_/QueryBuilderComponentTestUtils.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?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.58% <100.00%> (+0.02%)` | :arrow_up: | | [...xplorer/QueryBuilderMilestoningParameterEditor.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2Fexplorer%2FQueryBuilderMilestoningParameterEditor.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvZXhwbG9yZXIvUXVlcnlCdWlsZGVyTWlsZXN0b25pbmdQYXJhbWV0ZXJFZGl0b3IudHN4) | `83.33% <100.00%> (ø)` | | | [...ts/fetch-structure/QueryBuilderPostFilterPanel.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2Ffetch-structure%2FQueryBuilderPostFilterPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvZmV0Y2gtc3RydWN0dXJlL1F1ZXJ5QnVpbGRlclBvc3RGaWx0ZXJQYW5lbC50c3g=) | `83.17% <100.00%> (ø)` | | | [.../src/components/filter/QueryBuilderFilterPanel.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2Ffilter%2FQueryBuilderFilterPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvZmlsdGVyL1F1ZXJ5QnVpbGRlckZpbHRlclBhbmVsLnRzeA==) | `82.85% <100.00%> (+0.14%)` | :arrow_up: | | [...builder/src/components/shared/CustomDatePicker.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2Fshared%2FCustomDatePicker.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvc2hhcmVkL0N1c3RvbURhdGVQaWNrZXIudHN4) | `47.45% <100.00%> (+0.90%)` | :arrow_up: | | [.../components/shared/LambdaParameterValuesEditor.tsx](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree&filepath=packages%2Flegend-query-builder%2Fsrc%2Fcomponents%2Fshared%2FLambdaParameterValuesEditor.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos#diff-cGFja2FnZXMvbGVnZW5kLXF1ZXJ5LWJ1aWxkZXIvc3JjL2NvbXBvbmVudHMvc2hhcmVkL0xhbWJkYVBhcmFtZXRlclZhbHVlc0VkaXRvci50c3g=) | `97.20% <100.00%> (ø)` | | | ... and [10 more](https://app.codecov.io/gh/finos/legend-studio/pull/3285?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos) | | ... and [168 files with indirect coverage changes](https://app.codecov.io/gh/finos/legend-studio/pull/3285/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=finos)
YannanGao-gs commented 3 weeks ago

@travisstebbins It looks awesome! Thank you! I just left minor comments.