-
Notifications
You must be signed in to change notification settings - Fork 0
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: exports via main button don't include orphans (#287) #288
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks F! I added just a couple of nits for your review!
src/providers/fileManifestState.tsx
Outdated
@@ -51,6 +51,7 @@ export type FileManifestState = { | |||
isSummaryLoading: boolean; | |||
requestParams?: URLSearchParams; | |||
requestURL?: string; | |||
setOfFormFacetNames: Set<FileFacet["name"]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about renaming this to help indicate these are the selected set of form facet names (e.g. selectedFormFacetNames
)?
|
||
/** | ||
* Generates the filters for a request URL based on the file manifest state. | ||
* If all terms in a facet are selected, the corresponding facet is excluded. | ||
* Determines if all form facet terms are fully selected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to add comments here about the "no values selected" case? (It took me a while to get that the no values case was considered fully selected.) Let me know if this isn't clear!
const SELECTED_FILTERS_FORM_COMPLETE_SET: Filters = [ | ||
{ categoryKey: "category01", value: ["value01", "value02"] }, | ||
{ categoryKey: "category02", value: ["value02", "value03", "value04"] }, | ||
]; | ||
|
||
const FILTERS_SUBSET: Filters = [ | ||
const SELECTED_FILTERS_FORM_SUBSET: Filters = [ | ||
{ categoryKey: "category01", value: ["value01"] }, | ||
{ categoryKey: "category02", value: ["value02", "value03", "value04"] }, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a third test case here where one of the categories has no selected values, so that the "no values equals all values" case is exercised?
Closes #287.