Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

feat(core): expand native filter hook and add chart metadata fields #943

Merged
merged 5 commits into from
Feb 10, 2021

Conversation

simcha90
Copy link
Contributor

@simcha90 simcha90 commented Feb 8, 2021

This PR:

  1. Update definition of SetExtraFormDataHook
  2. change isNativeFilter metadata flag to behaviours property that contains array of implemented behaviours
  3. Removing Antd filters from repository

💔 Breaking Changes

🏆 Enhancements

📜 Documentation

🐛 Bug Fix

🏠 Internal

@simcha90 simcha90 requested a review from a team as a code owner February 8, 2021 16:38
@vercel
Copy link

vercel bot commented Feb 8, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/o79i4996v
✅ Preview: https://superset-ui-git-fork-simcha90-nativeupgrades.superset.vercel.app

@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #943 (6c64ac2) into master (58ab28e) will increase coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #943      +/-   ##
==========================================
+ Coverage   27.49%   27.67%   +0.18%     
==========================================
  Files         412      401      -11     
  Lines        8311     8248      -63     
  Branches     1150     1137      -13     
==========================================
- Hits         2285     2283       -2     
+ Misses       5891     5830      -61     
  Partials      135      135              
Impacted Files Coverage Δ
...superset-ui-core/src/chart/models/ChartMetadata.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58ab28e...6c64ac2. Read the comment docs.

Copy link
Contributor

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments

Comment on lines 5 to 8
export enum Behaviour {
CROSS_FILTER = 'CROSS_FILTER',
NATIVE_FILTER = 'NATIVE_FILTER',
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I believe the codebase "speaks American", so this should probably be Behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines -1 to -9
import React from 'react';
import { action } from '@storybook/addon-actions';
import { boolean, withKnobs } from '@storybook/addon-knobs';
import { SuperChart, getChartTransformPropsRegistry } from '@superset-ui/core';
import { AntdSelectFilterPlugin } from '@superset-ui/plugin-filter-antd';
import transformProps from '@superset-ui/plugin-filter-antd/lib/Select/transformProps';
import data from './data';
import { withResizableChartDemo } from '../../../../shared/components/ResizableChartDemo';
import 'antd/dist/antd.css';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder: we need migrate these to the apache/superset storybook.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@villebro villebro changed the title refactor(native-filters): Native filters requires feat(core): expand native filter hook and add chart metadata fields Feb 9, 2021
@villebro villebro merged commit 16101d5 into apache-superset:master Feb 10, 2021
@@ -1,3 +1,5 @@
import { Behavior } from '../types/Base';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer this to be called ChartFilterBehavior (after first-time seeing it in apache/superset#13052 and being confused of what it is), but looks like I'm late to the party...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't necessarily be restricted to filtering behavior, for example drill-downs which are essentially groupbys, but ChartBehavior could also be ok. Let me know if you want to update this now, otherwise we'll stick to this naming.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's save the update to when we need to expand this functionality.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants