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: exports via main button don't include orphans (#287) #288

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

frano-m
Copy link
Contributor

@frano-m frano-m commented Dec 3, 2024

Closes #287.

Copy link
Collaborator

@MillenniumFalconMechanic MillenniumFalconMechanic left a 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!

@@ -51,6 +51,7 @@ export type FileManifestState = {
isSummaryLoading: boolean;
requestParams?: URLSearchParams;
requestURL?: string;
setOfFormFacetNames: Set<FileFacet["name"]>;
Copy link
Collaborator

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.
Copy link
Collaborator

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!

Comment on lines 38 to 46
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"] },
];
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exports via main button don't include orphans
3 participants