You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/09 07:17:43 UTC
[GitHub] [superset] simcha90 opened a new pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
simcha90 opened a new pull request #13021:
URL: https://github.com/apache/superset/pull/13021
### SUMMARY
This PR decouple hardcoded per filter params from Filter config modal.
Now they generated dynamically based on `controlPanel` config.
In first phase we take all params that have `renderTrigger` property and render then in the bottom of the Modal.
also we added new property `resetConfig` to reset `defaultValue` if current property is changed
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
https://user-images.githubusercontent.com/56388545/107328399-530f4080-6ab7-11eb-891b-9e7e9427c4aa.mov
### TEST PLAN
<!--- What steps should be taken to verify the changes -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] amitmiran137 commented on a change in pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
amitmiran137 commented on a change in pull request #13021:
URL: https://github.com/apache/superset/pull/13021#discussion_r575544275
##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/FilterConfigForm.tsx
##########
@@ -290,39 +304,33 @@ export const FilterConfigForm: React.FC<FilterConfigFormProps> = ({
{t('Apply changes instantly')}
</Checkbox>
</StyledCheckboxFormItem>
- <StyledCheckboxFormItem
- name={['filters', filterId, 'allowsMultipleValues']}
- initialValue={filterToEdit?.allowsMultipleValues}
- valuePropName="checked"
- colon={false}
- >
- <Checkbox
- onChange={() => {
- setFilterFieldValues(form, filterId, {
- defaultValue: null,
- });
- forceUpdate();
- }}
- >
- {t('Allow multiple selections')}
- </Checkbox>
- </StyledCheckboxFormItem>
- <StyledCheckboxFormItem
- name={['filters', filterId, 'inverseSelection']}
- initialValue={filterToEdit?.inverseSelection}
- valuePropName="checked"
- colon={false}
- >
- <Checkbox>{t('Inverse selection')}</Checkbox>
- </StyledCheckboxFormItem>
- <StyledCheckboxFormItem
- name={['filters', filterId, 'isRequired']}
- initialValue={filterToEdit?.isRequired}
- valuePropName="checked"
- colon={false}
- >
- <Checkbox>{t('Required')}</Checkbox>
- </StyledCheckboxFormItem>
+ {controlItems
+ .filter(
+ (controlItem: CustomControlItem) =>
+ controlItem?.config?.renderTrigger,
+ )
+ .map(controlItem => (
+ <StyledCheckboxFormItem
+ name={['filters', filterId, 'controlValues', controlItem.name]}
+ initialValue={filterToEdit?.controlValues?.[controlItem.name]}
+ valuePropName="checked"
+ colon={false}
+ >
+ <Checkbox
+ onChange={() => {
+ if (!controlItem.config.resetConfig) {
+ return;
+ }
Review comment:
```suggestion
if (!isValidChange(controlItem.config)) {
return;
}
```
extract `!controlItem.config.resetConfig ` to isValidChange(config)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io edited a comment on pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13021:
URL: https://github.com/apache/superset/pull/13021#issuecomment-776199988
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] simcha90 commented on a change in pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13021:
URL: https://github.com/apache/superset/pull/13021#discussion_r573183581
##########
File path: superset-frontend/src/filters/components/Range/controlPanel.ts
##########
@@ -16,29 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t, validateNonEmpty } from '@superset-ui/core';
-import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
+import { ControlPanelConfig } from '@superset-ui/chart-controls';
const config: ControlPanelConfig = {
- // For control input types, see: superset-frontend/src/explore/components/controls/index.js
- controlPanelSections: [
- // @ts-ignore
- sections.legacyRegularTime,
- {
- label: t('Query'),
- expanded: true,
- controlSetRows: [['groupby'], ['adhoc_filters']],
- },
- ],
- controlOverrides: {
- groupby: {
- validators: [validateNonEmpty],
- clearable: false,
- },
- row_limit: {
- default: 100,
- },
- },
+ controlPanelSections: [],
Review comment:
done
##########
File path: superset-frontend/src/filters/components/Select/controlPanel.ts
##########
@@ -35,17 +29,21 @@ const config: ControlPanelConfig = {
{
label: t('Query'),
expanded: true,
+ controlSetRows: [['groupby']],
+ },
+ {
+ label: t('UI Configuration'),
+ expanded: true,
controlSetRows: [
- ['groupby'],
- ['metrics'],
- ['adhoc_filters'],
[
{
name: 'multiSelect',
config: {
type: 'CheckboxControl',
label: t('Multiple select'),
default: multiSelect,
+ resetConfig: true,
+ renderTrigger: true,
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io edited a comment on pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13021:
URL: https://github.com/apache/superset/pull/13021#issuecomment-776199988
# [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=h1) Report
> Merging [#13021](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=desc) (d276974) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `19.78%`.
> The diff coverage is `51.07%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13021/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #13021 +/- ##
===========================================
+ Coverage 53.06% 72.84% +19.78%
===========================================
Files 489 553 +64
Lines 17314 20276 +2962
Branches 4482 5301 +819
===========================================
+ Hits 9187 14770 +5583
+ Misses 8127 5381 -2746
- Partials 0 125 +125
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `53.40% <57.81%> (+0.34%)` | :arrow_up: |
| javascript | `61.69% <32.97%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...end/src/SqlLab/components/RunQueryActionButton.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1J1blF1ZXJ5QWN0aW9uQnV0dG9uLnRzeA==) | `64.28% <ø> (+11.50%)` | :arrow_up: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0UmVuZGVyZXIuanN4) | `77.02% <0.00%> (+0.31%)` | :arrow_up: |
| [...perset-frontend/src/common/components/Dropdown.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL0Ryb3Bkb3duLnRzeA==) | `54.76% <ø> (+4.76%)` | :arrow_up: |
| [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `86.36% <0.00%> (+11.36%)` | :arrow_up: |
| [...set-frontend/src/components/URLShortLinkButton.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rQnV0dG9uLmpzeA==) | `100.00% <ø> (ø)` | |
| [...src/dashboard/components/HeaderActionsDropdown.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlckFjdGlvbnNEcm9wZG93bi5qc3g=) | `71.23% <ø> (+3.66%)` | :arrow_up: |
| [...end/src/dashboard/components/StickyVerticalBar.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1N0aWNreVZlcnRpY2FsQmFyLnRzeA==) | `100.00% <ø> (ø)` | |
| [...iveFilters/FilterConfigModal/FilterConfigModal.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvRmlsdGVyQ29uZmlnTW9kYWwudHN4) | `89.79% <ø> (+10.79%)` | :arrow_up: |
| [...omponents/nativeFilters/FilterConfigModal/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| ... and [468 more](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=footer). Last update [bc4c837...d276974](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io edited a comment on pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13021:
URL: https://github.com/apache/superset/pull/13021#issuecomment-776199988
# [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=h1) Report
> Merging [#13021](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=desc) (d276974) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `8.63%`.
> The diff coverage is `32.97%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13021/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #13021 +/- ##
==========================================
+ Coverage 53.06% 61.69% +8.63%
==========================================
Files 489 553 +64
Lines 17314 20253 +2939
Branches 4482 5301 +819
==========================================
+ Hits 9187 12495 +3308
+ Misses 8127 7544 -583
- Partials 0 214 +214
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `61.69% <32.97%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...end/src/SqlLab/components/RunQueryActionButton.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1J1blF1ZXJ5QWN0aW9uQnV0dG9uLnRzeA==) | `64.28% <ø> (+11.50%)` | :arrow_up: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0UmVuZGVyZXIuanN4) | `39.18% <0.00%> (-37.53%)` | :arrow_down: |
| [...perset-frontend/src/common/components/Dropdown.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL0Ryb3Bkb3duLnRzeA==) | `54.76% <ø> (+4.76%)` | :arrow_up: |
| [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `86.36% <0.00%> (+11.36%)` | :arrow_up: |
| [...set-frontend/src/components/URLShortLinkButton.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rQnV0dG9uLmpzeA==) | `100.00% <ø> (ø)` | |
| [...src/dashboard/components/HeaderActionsDropdown.jsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlckFjdGlvbnNEcm9wZG93bi5qc3g=) | `54.79% <ø> (-12.78%)` | :arrow_down: |
| [...end/src/dashboard/components/StickyVerticalBar.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1N0aWNreVZlcnRpY2FsQmFyLnRzeA==) | `50.00% <ø> (-50.00%)` | :arrow_down: |
| [...ponents/nativeFilters/FilterBar/CascadePopover.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0Nhc2NhZGVQb3BvdmVyLnRzeA==) | `20.28% <0.00%> (-76.38%)` | :arrow_down: |
| [...d/components/nativeFilters/FilterBar/FilterBar.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlckJhci50c3g=) | `70.93% <0.00%> (-24.46%)` | :arrow_down: |
| ... and [520 more](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=footer). Last update [bc4c837...d276974](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] simcha90 commented on a change in pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13021:
URL: https://github.com/apache/superset/pull/13021#discussion_r573183764
##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/utils.ts
##########
@@ -175,6 +177,30 @@ export const setFilterFieldValues = (
});
};
+const secondaryFields = ['defaultValueQueriesData', 'defaultValueFormData'];
+
+export const filterOutSecondaryFields = (formInputs: NativeFiltersFormItem) =>
+ Object.entries(formInputs).reduce((resultInFormInputs, [key, value]) => {
+ if (!secondaryFields.includes(key)) {
+ return {
+ ...resultInFormInputs,
+ [key]: value,
+ };
+ }
+ return resultInFormInputs;
+ }, {} as NativeFiltersFormItem);
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] villebro commented on a change in pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #13021:
URL: https://github.com/apache/superset/pull/13021#discussion_r575655621
##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/FilterConfigModal.tsx
##########
@@ -54,7 +54,7 @@ const StyledForm = styled(Form)`
const StyledSpan = styled.span`
cursor: pointer;
color: ${({ theme }) => theme.colors.primary.dark1};
- &: hover {
+ & :hover {
Review comment:
nit:
```suggestion
&:hover {
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io edited a comment on pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13021:
URL: https://github.com/apache/superset/pull/13021#issuecomment-776199988
# [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=h1) Report
> Merging [#13021](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=desc) (ce0c3f9) into [master](https://codecov.io/gh/apache/superset/commit/c440d98fadaf5ee1859bd8c4a01036fb71f1753a?el=desc) (c440d98) will **increase** coverage by `15.44%`.
> The diff coverage is `36.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13021/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #13021 +/- ##
===========================================
+ Coverage 53.17% 68.61% +15.44%
===========================================
Files 449 546 +97
Lines 14826 20174 +5348
Branches 3959 5268 +1309
===========================================
+ Hits 7884 13843 +5959
+ Misses 6942 6173 -769
- Partials 0 158 +158
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `43.61% <10.52%> (-9.56%)` | :arrow_down: |
| javascript | `61.86% <33.33%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...components/nativeFilters/FilterBar/FilterValue.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlclZhbHVlLnRzeA==) | `23.07% <0.00%> (-60.65%)` | :arrow_down: |
| [...iveFilters/FilterConfigModal/FilterConfigModal.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvRmlsdGVyQ29uZmlnTW9kYWwudHN4) | `69.89% <ø> (-9.11%)` | :arrow_down: |
| [...omponents/nativeFilters/FilterConfigModal/state.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvc3RhdGUudHM=) | `70.58% <0.00%> (+15.03%)` | :arrow_up: |
| [...omponents/nativeFilters/FilterConfigModal/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/dashboard/components/nativeFilters/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/dashboard/components/nativeFilters/utils.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvdXRpbHMudHM=) | `84.61% <0.00%> (-15.39%)` | :arrow_down: |
| [...ntend/src/filters/components/Range/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9jb250cm9sUGFuZWwudHM=) | `33.33% <ø> (-66.67%)` | :arrow_down: |
| [...tiveFilters/FilterConfigModal/FilterConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvRmlsdGVyQ29uZmlnRm9ybS50c3g=) | `63.95% <33.33%> (-13.41%)` | :arrow_down: |
| [...omponents/nativeFilters/FilterConfigModal/utils.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvdXRpbHMudHM=) | `90.24% <60.00%> (+65.60%)` | :arrow_up: |
| [...tend/src/filters/components/Select/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvY29udHJvbFBhbmVsLnRz) | `33.33% <100.00%> (-66.67%)` | :arrow_down: |
| ... and [441 more](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=footer). Last update [c440d98...ce0c3f9](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] villebro merged pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
villebro merged pull request #13021:
URL: https://github.com/apache/superset/pull/13021
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io edited a comment on pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13021:
URL: https://github.com/apache/superset/pull/13021#issuecomment-776199988
# [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=h1) Report
> Merging [#13021](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=desc) (7891786) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `8.80%`.
> The diff coverage is `33.33%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13021/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #13021 +/- ##
==========================================
+ Coverage 53.06% 61.86% +8.80%
==========================================
Files 489 546 +57
Lines 17314 20152 +2838
Branches 4482 5268 +786
==========================================
+ Hits 9187 12467 +3280
+ Misses 8127 7471 -656
- Partials 0 214 +214
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `61.86% <33.33%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `86.36% <0.00%> (+11.36%)` | :arrow_up: |
| [...components/nativeFilters/FilterBar/FilterValue.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlclZhbHVlLnRzeA==) | `23.07% <0.00%> (-60.65%)` | :arrow_down: |
| [...iveFilters/FilterConfigModal/FilterConfigModal.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvRmlsdGVyQ29uZmlnTW9kYWwudHN4) | `69.74% <ø> (-9.27%)` | :arrow_down: |
| [...omponents/nativeFilters/FilterConfigModal/state.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvc3RhdGUudHM=) | `70.58% <0.00%> (+15.03%)` | :arrow_up: |
| [...omponents/nativeFilters/FilterConfigModal/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/dashboard/components/nativeFilters/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/dashboard/components/nativeFilters/utils.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvdXRpbHMudHM=) | `84.61% <0.00%> (-15.39%)` | :arrow_down: |
| [...ntend/src/filters/components/Range/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9jb250cm9sUGFuZWwudHM=) | `0.00% <ø> (-100.00%)` | :arrow_down: |
| [...tend/src/filters/components/Select/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvY29udHJvbFBhbmVsLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...perset-frontend/src/views/CRUD/chart/ChartList.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY2hhcnQvQ2hhcnRMaXN0LnRzeA==) | `71.65% <ø> (-2.66%)` | :arrow_down: |
| ... and [471 more](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=footer). Last update [3e0681b...7891786](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io commented on pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #13021:
URL: https://github.com/apache/superset/pull/13021#issuecomment-776199988
# [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=h1) Report
> Merging [#13021](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=desc) (ce0c3f9) into [master](https://codecov.io/gh/apache/superset/commit/c440d98fadaf5ee1859bd8c4a01036fb71f1753a?el=desc) (c440d98) will **increase** coverage by `8.68%`.
> The diff coverage is `33.33%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13021/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #13021 +/- ##
==========================================
+ Coverage 53.17% 61.86% +8.68%
==========================================
Files 449 546 +97
Lines 14826 20152 +5326
Branches 3959 5268 +1309
==========================================
+ Hits 7884 12467 +4583
- Misses 6942 7471 +529
- Partials 0 214 +214
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `61.86% <33.33%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...components/nativeFilters/FilterBar/FilterValue.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlclZhbHVlLnRzeA==) | `23.07% <0.00%> (-60.65%)` | :arrow_down: |
| [...iveFilters/FilterConfigModal/FilterConfigModal.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvRmlsdGVyQ29uZmlnTW9kYWwudHN4) | `69.74% <ø> (-9.27%)` | :arrow_down: |
| [...omponents/nativeFilters/FilterConfigModal/state.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvc3RhdGUudHM=) | `70.58% <0.00%> (+15.03%)` | :arrow_up: |
| [...omponents/nativeFilters/FilterConfigModal/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/dashboard/components/nativeFilters/types.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/dashboard/components/nativeFilters/utils.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvdXRpbHMudHM=) | `84.61% <0.00%> (-15.39%)` | :arrow_down: |
| [...ntend/src/filters/components/Range/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9jb250cm9sUGFuZWwudHM=) | `0.00% <ø> (-100.00%)` | :arrow_down: |
| [...tend/src/filters/components/Select/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvY29udHJvbFBhbmVsLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...tiveFilters/FilterConfigModal/FilterConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvRmlsdGVyQ29uZmlnRm9ybS50c3g=) | `64.70% <35.71%> (-12.66%)` | :arrow_down: |
| [...omponents/nativeFilters/FilterConfigModal/utils.ts](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQ29uZmlnTW9kYWwvdXRpbHMudHM=) | `90.24% <60.00%> (+65.60%)` | :arrow_up: |
| ... and [470 more](https://codecov.io/gh/apache/superset/pull/13021/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=footer). Last update [c440d98...ce0c3f9](https://codecov.io/gh/apache/superset/pull/13021?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] villebro commented on a change in pull request #13021: refactor(native-filters): decouple params from filter config modal (first phase)
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #13021:
URL: https://github.com/apache/superset/pull/13021#discussion_r572894530
##########
File path: superset-frontend/src/filters/components/Range/controlPanel.ts
##########
@@ -16,29 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t, validateNonEmpty } from '@superset-ui/core';
-import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
+import { ControlPanelConfig } from '@superset-ui/chart-controls';
const config: ControlPanelConfig = {
- // For control input types, see: superset-frontend/src/explore/components/controls/index.js
- controlPanelSections: [
- // @ts-ignore
- sections.legacyRegularTime,
- {
- label: t('Query'),
- expanded: true,
- controlSetRows: [['groupby'], ['adhoc_filters']],
- },
- ],
- controlOverrides: {
- groupby: {
- validators: [validateNonEmpty],
- clearable: false,
- },
- row_limit: {
- default: 100,
- },
- },
+ controlPanelSections: [],
Review comment:
I think we should leave legacyRegularTime (the others can be removed). Also, let's add a `// TODO:` here to add the relevant controls (I can do that in a follow-up PR).
##########
File path: superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/utils.ts
##########
@@ -175,6 +177,30 @@ export const setFilterFieldValues = (
});
};
+const secondaryFields = ['defaultValueQueriesData', 'defaultValueFormData'];
+
+export const filterOutSecondaryFields = (formInputs: NativeFiltersFormItem) =>
+ Object.entries(formInputs).reduce((resultInFormInputs, [key, value]) => {
+ if (!secondaryFields.includes(key)) {
+ return {
+ ...resultInFormInputs,
+ [key]: value,
+ };
+ }
+ return resultInFormInputs;
+ }, {} as NativeFiltersFormItem);
Review comment:
To avoid having to do this, would it make sense to introduce a new prop `controlValues` in which we place all control values that are specific to the filter at hand? In the case of the Select filter, it would then contain `enableEmptyFilter`, `inverseSelection` and `multiSelect`. It would also minimize the risk of name collision.
##########
File path: superset-frontend/src/filters/components/Select/controlPanel.ts
##########
@@ -35,17 +29,21 @@ const config: ControlPanelConfig = {
{
label: t('Query'),
expanded: true,
+ controlSetRows: [['groupby']],
+ },
+ {
+ label: t('UI Configuration'),
+ expanded: true,
controlSetRows: [
- ['groupby'],
- ['metrics'],
- ['adhoc_filters'],
[
{
name: 'multiSelect',
config: {
type: 'CheckboxControl',
label: t('Multiple select'),
default: multiSelect,
+ resetConfig: true,
+ renderTrigger: true,
Review comment:
Filtering on only renderTrigger might be fragile. But we can probably come up with a better option for this in a follow-up PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org