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(listviews): SIP-34 filters for charts, dashboards, datasets #10335

Merged
merged 9 commits into from
Jul 27, 2020

Conversation

nytai
Copy link
Member

@nytai nytai commented Jul 16, 2020

SUMMARY

  • api endpoint /api/v1/database/schemas for fetching list of schemas.
  • adds SIP-34 filters to datasets list view
  • removes LIST_VIEWS_SIP34_FILTER_UI feature flag
  • enabled SIP-34 filters for datasts, charts, dashboards, listview
  • moves src/views/* -> src/views/CRUD/* (eg, src/views/datasetList/DatasetList.tsx -> src/views/CRUD/dataset/DatasetList.tsx ) -- idea being that src/views/CRUD namespace can share code, ie, data fetching logic, state hooks, edit modals, delete modals, etc

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2020-07-15 at 6 46 41 PM

Screen Shot 2020-07-15 at 6 46 49 PM

TEST PLAN

  • unit tests pass
  • can filter on charts, dashboards, datasets list views

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI: Behind ENABLE_REACT_CRUD_VIEWS flag
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@nytai nytai changed the title feature: enabled SIP-34 listview filters for react CRUD feat(listviews): SIP-34 filters for charts, dashboards, datasets Jul 16, 2020
@nytai nytai force-pushed the tai/datasets-listview-filters branch from fe39e3f to 86284b4 Compare July 16, 2020 02:29
@nytai nytai mentioned this pull request Jul 16, 2020
6 tasks
@nytai nytai force-pushed the tai/datasets-listview-filters branch from 437e504 to b44cf7e Compare July 16, 2020 23:57
@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2020

Codecov Report

Merging #10335 into master will decrease coverage by 0.09%.
The diff coverage is 47.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10335      +/-   ##
==========================================
- Coverage   70.25%   70.16%   -0.10%     
==========================================
  Files         605      605              
  Lines       32425    32386      -39     
  Branches     3295     3270      -25     
==========================================
- Hits        22781    22724      -57     
- Misses       9535     9553      +18     
  Partials      109      109              
Flag Coverage Δ
#cypress 54.51% <ø> (-0.01%) ⬇️
#javascript 58.90% <28.73%> (-0.37%) ⬇️
#python 69.82% <89.74%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
...rc/components/ErrorMessage/TimeoutErrorMessage.tsx 5.45% <0.00%> (ø)
superset-frontend/src/components/ListView/utils.ts 75.00% <ø> (-8.15%) ⬇️
superset-frontend/src/featureFlags.ts 100.00% <ø> (ø)
...uperset-frontend/src/views/CRUD/dataset/Button.tsx 100.00% <ø> (ø)
superset-frontend/src/welcome/App.tsx 0.00% <0.00%> (ø)
superset/config.py 90.15% <ø> (ø)
...et-frontend/src/views/CRUD/dataset/DatasetList.tsx 61.20% <22.72%> (ø)
superset-frontend/src/views/CRUD/utils.tsx 25.00% <25.00%> (ø)
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 57.36% <33.33%> (ø)
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 64.06% <60.00%> (ø)
... and 10 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 09dfbab...276f614. Read the comment docs.

@nytai nytai marked this pull request as ready for review July 17, 2020 00:16
@bkyryliuk
Copy link
Member

can't wait to see it live!

Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

first pass, couple of comments

page:
type: integer
filter:
type: string
Copy link
Member

Choose a reason for hiding this comment

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

It's nicer to use a reference here to the schema, so we don't have to repeat ourselfs. Take a look at: https://github.com/apache/incubator-superset/blob/master/superset/charts/api.py#L502

value:
type: string
text:
type: string
Copy link
Member

Choose a reason for hiding this comment

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

Here also, declare a marshmallow schema for the response and reference that. Register your schema on OpenAPI using openapi_spec_component_schemas FAB attr

@nytai nytai force-pushed the tai/datasets-listview-filters branch 2 times, most recently from 84f38c3 to b27ae88 Compare July 22, 2020 17:55
@mistercrunch
Copy link
Member

mistercrunch commented Jul 23, 2020

This looks amazing, let's get it through!

@nytai nytai requested a review from dpgaspar July 23, 2020 23:51
@nytai nytai force-pushed the tai/datasets-listview-filters branch from 64e7136 to 71517d5 Compare July 24, 2020 20:32
@nytai nytai force-pushed the tai/datasets-listview-filters branch from 71517d5 to c8e89a0 Compare July 24, 2020 20:33
@nytai nytai force-pushed the tai/datasets-listview-filters branch from c8e89a0 to 276f614 Compare July 24, 2020 21:37
@nytai nytai closed this Jul 24, 2020
@nytai nytai reopened this Jul 24, 2020
Copy link
Member

@rusackas rusackas 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 little nits/questions, but in general this LGTM! Excited to see these changes!!

superset-frontend/src/views/CRUD/chart/ChartList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/dataset/DatasetList.tsx Outdated Show resolved Hide resolved
endpoint: `${resourceEndpoint}?q=${queryParams}`,
});

return json?.result?.map(
Copy link
Member

Choose a reason for hiding this comment

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

I still get a little excited when I see or use these operators.

superset-frontend/src/views/CRUD/dataset/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/dataset/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/dataset/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/CRUD/utils.tsx Outdated Show resolved Hide resolved
@nytai nytai merged commit 6f56cd5 into apache:master Jul 27, 2020
@nytai nytai deleted the tai/datasets-listview-filters branch July 27, 2020 17:14
@rusackas
Copy link
Member

Impacts #8976

auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.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 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants