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: filter by me on CRUD list view #11683

Merged
merged 2 commits into from
Nov 25, 2020
Merged

Conversation

lilykuang
Copy link
Member

SUMMARY

Implement filter with Me option for list views:

  • Annotation Layers (Owner)
  • Charts (Owner, Created By)
  • CSS Templates (Created By)
  • Dashboards (Owner, Created By)
  • Datasets (Owner)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

  • Annotation Layers
    annotation-layers
  • Charts
    Screen Shot 2020-11-12 at 3 40 16 PM
  • CSS Templates
    Screen Shot 2020-11-12 at 3 46 06 PM
  • Dashboards
    Screen Shot 2020-11-12 at 3 42 47 PM
  • Datasets
    Screen Shot 2020-11-12 at 3 41 07 PM

TEST PLAN

  • add new cypress test filter by me
  • update unit test

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

@codecov-io
Copy link

codecov-io commented Nov 12, 2020

Codecov Report

Merging #11683 (24e6866) into master (91bcbc8) will decrease coverage by 12.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #11683       +/-   ##
===========================================
- Coverage   67.30%   55.05%   -12.25%     
===========================================
  Files         905      411      -494     
  Lines       43872    14535    -29337     
  Branches     4202     3729      -473     
===========================================
- Hits        29527     8002    -21525     
+ Misses      14241     6533     -7708     
+ Partials      104        0      -104     
Flag Coverage Δ
cypress 55.05% <100.00%> (-0.10%) ⬇️
javascript ?
python ?

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

Impacted Files Coverage Δ
...ews/CRUD/annotationlayers/AnnotationLayersList.tsx 2.29% <ø> (-75.59%) ⬇️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 76.59% <ø> (-7.95%) ⬇️
...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx 1.29% <ø> (-75.88%) ⬇️
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 71.79% <ø> (-7.16%) ⬇️
...ontend/src/views/CRUD/data/dataset/DatasetList.tsx 2.41% <ø> (-66.82%) ⬇️
.../src/views/CRUD/data/savedquery/SavedQueryList.tsx 2.60% <ø> (-58.76%) ⬇️
superset-frontend/src/views/CRUD/utils.tsx 35.13% <100.00%> (-14.87%) ⬇️
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
... and 756 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 91bcbc8...24e6866. Read the comment docs.

({ text: label, value }: { text: string; value: any }) => ({
label,
value,
}),
);

return options.concat(data);
Copy link
Member

Choose a reason for hiding this comment

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

I believe some of these results are paginated so each request will end up with multiple me entries.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, nvm. Looks like these results are merged in with the existing ones and get properly deduped. 👍

@lilykuang lilykuang marked this pull request as ready for review November 13, 2020 16:55
) => async (filterValue = '', pageIndex?: number, pageSize?: number) => {
const resourceEndpoint = `/api/v1/${resource}/${method}/${relation}`;

const options =
userId && pageIndex === 0 ? [{ label: 'me', value: userId }] : [];
Copy link
Contributor

Choose a reason for hiding this comment

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

small nit, but should me be capitalized?

Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

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

LGTM after rebase

@nytai nytai merged commit 9c69679 into apache:master Nov 25, 2020
@nytai nytai deleted the lily/filter-by-me branch November 25, 2020 19:56
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.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 size/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants