-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EREGCSC-2826 -- Granular counts on the front end (#1419)
* feat: first pass at type counts * feat: crude counts working * feat: label count styles * feat: tweak loading styles for counts * fix: spacing tweak * test: update fixtures with counts; assert count label exists * chore: walk back certain typeCount logic; prettier formatting * feat: very basic fetch counts implementation * feat: feature complete implementation * chore: add prettier config; undo prettier trailing comma damage * chore: add prettier config; undo prettier trailing comma damage * refactor: move fetchCounts/ref logic to composable * chore: clean up unused dependencies * test: add content-search/counts to API api e2e test suite * test: add counts fixture * fix: return top margin to subjects label in sidebar * style: count style tweaks
- Loading branch information
Showing
14 changed files
with
285 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"internal_resource_count": 1, | ||
"public_resource_count": 2, | ||
"regulation_text_count": 3 | ||
} |
248 changes: 124 additions & 124 deletions
248
solution/ui/e2e/cypress/fixtures/policy-docs-subjects.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,132 @@ | ||
{ | ||
"count": 3, | ||
"next": null, | ||
"previous": null, | ||
"results": [ | ||
{ | ||
"type": "internal_file", | ||
"id": 2007, | ||
"created_at": "2024-07-09 15:19:36.129789", | ||
"updated_at": "2024-07-10 10:38:27.931896", | ||
"approved": true, | ||
"category": { | ||
"id": 26, | ||
"name": "Mock Category", | ||
"description": "This is a mock category", | ||
"order": 0, | ||
"show_if_empty": false, | ||
"is_fr_link_category": false, | ||
"type": "internal_category" | ||
}, | ||
"cfr_citations": [ | ||
"count": 3, | ||
"next": null, | ||
"previous": null, | ||
"results": [ | ||
{ | ||
"id": 18, | ||
"title": 42, | ||
"part": 430, | ||
"type": "subpart", | ||
"subpart_id": "A" | ||
"type": "internal_file", | ||
"id": 2007, | ||
"created_at": "2024-07-09 15:19:36.129789", | ||
"updated_at": "2024-07-10 10:38:27.931896", | ||
"approved": true, | ||
"category": { | ||
"id": 26, | ||
"name": "Mock Category", | ||
"description": "This is a mock category", | ||
"order": 0, | ||
"show_if_empty": false, | ||
"is_fr_link_category": false, | ||
"type": "internal_category" | ||
}, | ||
"cfr_citations": [ | ||
{ | ||
"id": 18, | ||
"title": 42, | ||
"part": 430, | ||
"type": "subpart", | ||
"subpart_id": "A" | ||
}, | ||
{ | ||
"id": 25, | ||
"title": 42, | ||
"part": 430, | ||
"type": "section", | ||
"section_id": 10 | ||
} | ||
], | ||
"subjects": [ | ||
{ | ||
"id": 3, | ||
"full_name": "Access to Services", | ||
"short_name": "", | ||
"abbreviation": "", | ||
"description": "" | ||
} | ||
], | ||
"document_id": "internal document id field", | ||
"title": "mock internal file", | ||
"date": "2024-09-09", | ||
"url": "", | ||
"related_resources": [], | ||
"summary": "This is the summary to the mock internal file", | ||
"file_name": "ff-test.pdf", | ||
"file_type": "", | ||
"uid": "1149e520-6691-4f00-9094-d741b0b114a5" | ||
}, | ||
{ | ||
"id": 25, | ||
"title": 42, | ||
"part": 430, | ||
"type": "section", | ||
"section_id": 10 | ||
} | ||
], | ||
"subjects": [ | ||
{ | ||
"id": 3, | ||
"full_name": "Access to Services", | ||
"short_name": "", | ||
"abbreviation": "", | ||
"description": "" | ||
} | ||
], | ||
"document_id": "internal document id field", | ||
"title": "mock internal file", | ||
"date": "2024-09-09", | ||
"url": "", | ||
"related_resources": [], | ||
"summary": "This is the summary to the mock internal file", | ||
"file_name": "ff-test.pdf", | ||
"file_type": "", | ||
"uid": "1149e520-6691-4f00-9094-d741b0b114a5" | ||
}, | ||
{ | ||
"type": "public_link", | ||
"id": 1000, | ||
"created_at": "2024-07-08 10:21:58.934030", | ||
"updated_at": "2024-07-10 09:42:40.084033", | ||
"approved": true, | ||
"category": { | ||
"id": 4, | ||
"name": "Subregulatory Guidance", | ||
"description": "SMDLs, SHOs, CIBs, FAQs, SMM", | ||
"order": 400, | ||
"show_if_empty": true, | ||
"is_fr_link_category": false, | ||
"type": "public_category" | ||
}, | ||
"cfr_citations": [ | ||
{ | ||
"id": 209, | ||
"title": 42, | ||
"part": 433, | ||
"type": "subpart", | ||
"subpart_id": "A" | ||
}, | ||
{ | ||
"id": 938, | ||
"title": 42, | ||
"part": 447, | ||
"type": "section", | ||
"section_id": 253 | ||
}, | ||
{ | ||
"id": 975, | ||
"title": 42, | ||
"part": 447, | ||
"type": "section", | ||
"section_id": 509 | ||
"type": "public_link", | ||
"id": 1000, | ||
"created_at": "2024-07-08 10:21:58.934030", | ||
"updated_at": "2024-07-10 09:42:40.084033", | ||
"approved": true, | ||
"category": { | ||
"id": 4, | ||
"name": "Subregulatory Guidance", | ||
"description": "SMDLs, SHOs, CIBs, FAQs, SMM", | ||
"order": 400, | ||
"show_if_empty": true, | ||
"is_fr_link_category": false, | ||
"type": "public_category" | ||
}, | ||
"cfr_citations": [ | ||
{ | ||
"id": 209, | ||
"title": 42, | ||
"part": 433, | ||
"type": "subpart", | ||
"subpart_id": "A" | ||
}, | ||
{ | ||
"id": 938, | ||
"title": 42, | ||
"part": 447, | ||
"type": "section", | ||
"section_id": 253 | ||
}, | ||
{ | ||
"id": 975, | ||
"title": 42, | ||
"part": 447, | ||
"type": "section", | ||
"section_id": 509 | ||
}, | ||
{ | ||
"id": 976, | ||
"title": 42, | ||
"part": 447, | ||
"type": "section", | ||
"section_id": 510 | ||
} | ||
], | ||
"subjects": [ | ||
{ | ||
"id": 3, | ||
"full_name": "Access to Services", | ||
"short_name": "", | ||
"abbreviation": "", | ||
"description": "" | ||
} | ||
], | ||
"document_id": "document id field", | ||
"title": "mock public link", | ||
"date": "2017-06-29", | ||
"url": "https://www.medicaid.gov/sites/default/files/medicaid-chip-program-information/by-topics/prescription-drugs/downloads/rx-releases/mfr-releases/mfr-rel-105.pdf", | ||
"related_resources": [] | ||
}, | ||
{ | ||
"id": 976, | ||
"title": 42, | ||
"part": 447, | ||
"type": "section", | ||
"section_id": 510 | ||
} | ||
], | ||
"subjects": [ | ||
{ | ||
"id": 3, | ||
"full_name": "Access to Services", | ||
"short_name": "", | ||
"abbreviation": "", | ||
"description": "" | ||
"type": "public_link", | ||
"id": 1000, | ||
"created_at": "2024-07-08 10:21:58.934030", | ||
"updated_at": "2024-07-10 09:42:40.084033", | ||
"approved": true, | ||
"category": {}, | ||
"cfr_citations": [], | ||
"subjects": [], | ||
"document_id": "document id field", | ||
"title": "public link without subject or category or keyword", | ||
"date": "2017-06-29", | ||
"url": "https://www.medicaid.gov/sites/default/files/medicaid-chip-program-information/by-topics/prescription-drugs/downloads/rx-releases/mfr-releases/mfr-rel-105.pdf", | ||
"related_resources": [] | ||
} | ||
], | ||
"document_id": "document id field", | ||
"title": "mock public link", | ||
"date": "2017-06-29", | ||
"url": "https://www.medicaid.gov/sites/default/files/medicaid-chip-program-information/by-topics/prescription-drugs/downloads/rx-releases/mfr-releases/mfr-rel-105.pdf", | ||
"related_resources": [] | ||
}, | ||
{ | ||
"type": "public_link", | ||
"id": 1000, | ||
"created_at": "2024-07-08 10:21:58.934030", | ||
"updated_at": "2024-07-10 09:42:40.084033", | ||
"approved": true, | ||
"category": {}, | ||
"cfr_citations": [], | ||
"subjects": [], | ||
"document_id": "document id field", | ||
"title": "public link without subject or category or keyword", | ||
"date": "2017-06-29", | ||
"url": "https://www.medicaid.gov/sites/default/files/medicaid-chip-program-information/by-topics/prescription-drugs/downloads/rx-releases/mfr-releases/mfr-rel-105.pdf", | ||
"related_resources": [] | ||
} | ||
] | ||
] | ||
} |
Oops, something went wrong.