-
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
Rearranged facets #170
Rearranged facets #170
Conversation
config.add_facet_field 'community_root_name_ssi', label: 'Community' | ||
config.add_facet_field 'subcommunity_name_ssi', label: 'Subcommunity' | ||
config.add_facet_field 'collection_name_ssi', label: 'Collection' | ||
config.add_facet_field 'author_ssim', label: 'Author', limit: true |
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.
limit:true
is what allows Blacklight to display the "more" value in the facet list that opens the pop-up window to view all facet values.
// Hide the subcommunity facet unless we are faceting by community or subcommunity. | ||
if (!activeFacet("community_root_name_ssi") && !activeFacet("subcommunity_name_ssi")) { | ||
hideFacetGroup("subcommunity_name_ssi"); | ||
} |
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.
This is the code that hides the subcommunity facet unless it's relevant.
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.
I love that you left a comment about where the inspiration for this came from. Very useful for long-term maintenance and kind to your colleagues!
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.
🚀
// Hide the subcommunity facet unless we are faceting by community or subcommunity. | ||
if (!activeFacet("community_root_name_ssi") && !activeFacet("subcommunity_name_ssi")) { | ||
hideFacetGroup("subcommunity_name_ssi"); | ||
} |
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.
I love that you left a comment about where the inspiration for this came from. Very useful for long-term maintenance and kind to your colleagues!
Updated the order in which facets are displayed as requested in #161 and included the proper Blacklight configuration to allow the user to view "more" facet values when there are more than 10. I also fixed a problem with Author facet that was using a non-existing field.
Notice that the Subcommunity facet displays only when (1) the user filters by community and the community has subcommunities (in practice this means it only shows when the community is PPPL)
Closes #161