-
Notifications
You must be signed in to change notification settings - Fork 1
Add range as accepted facet type in config
#460
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for pss-scavenger-hunt ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for gbof-c19nyc-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for padp-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-life ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for universities-studying-slavery-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for libertos ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
❌ Deploy Preview for registro-project failed. Why did it fail? →
|
✅ Deploy Preview for juel-ancestry ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
dleadbetter
left a comment
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 think this should happen automatically for any numeric system fields or user-defined fields with type "Number". If it's not happening automatically with the correct configuration, then it's a bug we should fix. Users will likely never want to see a huge list of numbers.
It is definitely not happening automatically -- see e.g. https://juel-staging.netlify.app/en/search/people . Looks like the issue might be that the context provider is looking only for fields of type Seems like ideally we'd fix it in |
|
How much longer do you think it would take to fix in |

In this PR
Resolves #438 by adding
rangeto the set of allowedtypevalues for items in thesearch.facetsfield in the config. This is necessary because in some data models (e.g. JUEL) we may have numeric fields on models that aren't the dates of associated events, which is currently the only thing we display as a range facet by default I believe.Note that upon testing it seems that a non-numerical field with
rangeas the specified type will simply not render, and will not crash the page or cause any errors, so the danger is low in giving users this power.