Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(native-filters): enable filter indicator and make datasource optional #13148

Merged
merged 10 commits into from
Feb 16, 2021

Conversation

simcha90
Copy link
Contributor

SUMMARY

This PR decouple decouple filter params from native filters config modal. In this phase we decoupled datasource based on datasourceCount property that exported from every viz-plugin

More changes:

  • we update filter badge logic for a case if filter doesn't have datasource, in this case we show applied indicator if this chart affected by scope
  • we build filter types dropdown in filter config modal based on behavior property exported from viz-plugin

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-02-16.at.12.09.49.mov

TEST PLAN

ADDITIONAL INFORMATION

  • 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

Copy link
Member

@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.

Wow, this is incredible once again! Nothing much to add here, except perhaps the renaming of the filter classes and changing the title from refactor to feat, as this is also adding significant new functionality.

@simcha90 simcha90 changed the title refactor(native-filters): decouple filter params from native filters config modal (phase 2) feat(native-filters): enable filter indicator and make datasource optional Feb 16, 2021
const [state, setState] = useState([]);
const [error, setError] = useState<boolean>(false);
const [formData, setFormData] = useState<Partial<QueryFormData>>({});
const inputRef = useRef<HTMLInputElement>(null);
const [target] = targets;
const { datasetId = 18, column } = target;
const {
datasetId = 18,
Copy link
Member

Choose a reason for hiding this comment

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

why 18?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no idea, it was here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but may be good remove it

@codecov-io
Copy link

codecov-io commented Feb 16, 2021

Codecov Report

Merging #13148 (f513b7d) into master (2ce7982) will increase coverage by 0.46%.
The diff coverage is 70.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13148      +/-   ##
==========================================
+ Coverage   53.06%   53.52%   +0.46%     
==========================================
  Files         489      493       +4     
  Lines       17314    17398      +84     
  Branches     4482     4521      +39     
==========================================
+ Hits         9187     9313     +126     
+ Misses       8127     8085      -42     
Flag Coverage Δ
cypress 53.52% <70.04%> (+0.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...end/src/SqlLab/components/RunQueryActionButton.tsx 52.77% <ø> (ø)
superset-frontend/src/chart/ChartContainer.jsx 100.00% <ø> (ø)
superset-frontend/src/chart/ChartRenderer.jsx 75.67% <0.00%> (-1.04%) ⬇️
...perset-frontend/src/common/components/Dropdown.tsx 50.00% <ø> (ø)
...rontend/src/components/ListView/CardSortSelect.tsx 78.94% <ø> (ø)
...ontend/src/components/ListViewCard/ImageLoader.tsx 75.00% <0.00%> (ø)
...set-frontend/src/components/URLShortLinkButton.jsx 100.00% <ø> (ø)
...rset-frontend/src/components/URLShortLinkModal.tsx 77.77% <ø> (ø)
...src/dashboard/components/HeaderActionsDropdown.jsx 68.49% <ø> (+0.92%) ⬆️
...end/src/dashboard/components/StickyVerticalBar.tsx 100.00% <ø> (ø)
... and 69 more

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 5ab613d...f513b7d. Read the comment docs.

@villebro villebro merged commit 5aa38ef into apache:master Feb 16, 2021
@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Mar 12, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels dashboard:native-filters Related to the native filters of the Dashboard size/XL 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants