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

DAC Multi-Select Filtering #3037

Merged
merged 11 commits into from
Jul 8, 2024
Merged

DAC Multi-Select Filtering #3037

merged 11 commits into from
Jul 8, 2024

Conversation

elipe17
Copy link

@elipe17 elipe17 commented Jun 20, 2024

Summary of Changes

  • Added new dependency in favor of custom solution. New dependency also provides more DAC filtering options as opposed to a single option which may be useful later.
  • Updated appropriate filters to leverage dependency's solutions.
    Pull request closes [BUG] Django admin filter not working properly #3002

How to Test

cd tdrs-frontend && docker-compose up --build
cd tdrs-backend && docker-compose up --build
  1. Open http://localhost:3000/ and sign in.
  2. Submit some datafiles as multiple different STTs
  3. Verify the new filter dropdown only populates with STTs that have submitted data and that no STT is shown as a filter option if it cannot submit the selected record type.
  4. Select one or more STTs from the dropdown via CMD + Click and click the filter button
  5. Ensure only records with the selected STT are shown
  6. Stack other filters on top of the STT filter and ensure you see the correct results

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • STT filter is more readable
  • STT filter allows for multiple selections
  • Multiple filter selections work together

Deliverable 2: Tested Code

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces backend code changes, are they meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?
    • Frontend coverage: [insert coverage %] (see CodeCov Report comment in PR)
    • Backend coverage: [insert coverage %] (see CodeCov Report comment in PR)

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

Research product(s) clearly articulate(s):

  • the purpose of the research
  • methods used to conduct the research
  • who participated in the research
  • what was tested and how
  • impact of research on TDP
  • (if applicable) final design mockups produced for TDP development

@elipe17 elipe17 added bug backend dev raft review This issue is ready for raft review DAC Django Admin Console techdebt labels Jun 20, 2024
@elipe17 elipe17 self-assigned this Jun 20, 2024
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 38.09524% with 13 lines in your changes missing coverage. Please review.

Project coverage is 93.15%. Comparing base (c503e1d) to head (d8fcc54).
Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3037      +/-   ##
===========================================
+ Coverage    92.97%   93.15%   +0.17%     
===========================================
  Files          276      276              
  Lines         7316     7303      -13     
  Branches       646      642       -4     
===========================================
+ Hits          6802     6803       +1     
+ Misses         413      399      -14     
  Partials       101      101              
Flag Coverage Δ
dev-backend 93.24% <38.09%> (+0.20%) ⬆️
dev-frontend 92.60% <ø> (ø)

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

Files Coverage Δ
...drs-backend/tdpservice/search_indexes/admin/ssp.py 100.00% <ø> (ø)
...rs-backend/tdpservice/search_indexes/admin/tanf.py 100.00% <ø> (ø)
...-backend/tdpservice/search_indexes/admin/tribal.py 100.00% <ø> (ø)
tdrs-backend/tdpservice/settings/common.py 99.30% <ø> (ø)
...-backend/tdpservice/search_indexes/admin/mixins.py 45.90% <75.00%> (+0.13%) ⬆️
...backend/tdpservice/search_indexes/admin/filters.py 35.08% <29.41%> (+2.17%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@elipe17 elipe17 added the Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI label Jun 20, 2024
@elipe17 elipe17 marked this pull request as ready for review June 20, 2024 16:26
- Updated STT filter lookup options
@elipe17 elipe17 added Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI and removed Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI labels Jun 21, 2024
@elipe17 elipe17 requested a review from raftmsohani June 21, 2024 18:12
Copy link

@raftmsohani raftmsohani left a comment

Choose a reason for hiding this comment

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

LGTM!

@andrew-jameson andrew-jameson removed their request for review June 28, 2024 18:11
@andrew-jameson andrew-jameson added QASP Review and removed raft review This issue is ready for raft review labels Jun 28, 2024
@elipe17 elipe17 requested a review from ADPennington July 2, 2024 17:24
@ADPennington ADPennington added Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI and removed Deploy with CircleCI-raft Deploy to https://tdp-frontend-raft.app.cloud.gov through CircleCI labels Jul 2, 2024
@ADPennington
Copy link
Collaborator

@reitermb did you happen to give this an a11y pass? @ttran-hub and I were wondering if the stt dropdown needs to be in black font for readability? cc: @elipe17

Screenshot 2024-07-02 170905

@reitermb
Copy link

reitermb commented Jul 2, 2024

@reitermb did you happen to give this an a11y pass? @ttran-hub and I were wondering if the stt dropdown needs to be in black font for readability? cc: @elipe17

Screenshot 2024-07-02 170905

I don't think this went by me but I just hopped into QASP and took a look.
Looks like those are #999999 which is indeed too light for contrast compliance.

I also have some concerns about the screenreader accessibility of the mutliselect. I'd recommend label changes to make the broader actions clearer, "All" --> "Show all", "filter" --> "Filter to selection(s)". Functionally it would also be useful to add aria-mutliselectable="true" to the select component and aria-checked="true" to selected items.

cc @elipe17 @ADPennington @ttran-hub

@ADPennington
Copy link
Collaborator

@reitermb did you happen to give this an a11y pass? @ttran-hub and I were wondering if the stt dropdown needs to be in black font for readability? cc: @elipe17
Screenshot 2024-07-02 170905

I don't think this went by me but I just hopped into QASP and took a look. Looks like those are #999999 which is indeed too light for contrast compliance.

I also have some concerns about the screenreader accessibility of the mutliselect. I'd recommend label changes to make the broader actions clearer, "All" --> "Show all", "filter" --> "Filter to selection(s)". Functionally it would also be useful to add aria-mutliselectable="true" to the select component and aria-checked="true" to selected items.

cc @elipe17 @ADPennington @ttran-hub

@reitermb can you spin up a follow-on ticket for the a11y-related piece of this?

@elipe17 elipe17 requested a review from ADPennington July 5, 2024 19:08
@ADPennington ADPennington added Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI and removed Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI labels Jul 5, 2024
Copy link
Collaborator

@ADPennington ADPennington left a comment

Choose a reason for hiding this comment

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

thanks @elipe17 🚀

@ADPennington ADPennington added Ready to Merge and removed QASP Review Deploy with CircleCI-qasp Deploy to https://tdp-frontend-qasp.app.cloud.gov through CircleCI labels Jul 5, 2024
@elipe17 elipe17 merged commit 410ce8f into develop Jul 8, 2024
26 checks passed
@elipe17 elipe17 deleted the 3002-dac-filtering branch July 8, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Django admin filter not working properly
6 participants