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

Support filtering on ad-hoc vocab fields #201

Open
wu-lee opened this issue May 8, 2023 · 3 comments
Open

Support filtering on ad-hoc vocab fields #201

wu-lee opened this issue May 8, 2023 · 3 comments

Comments

@wu-lee
Copy link
Contributor

wu-lee commented May 8, 2023

Is your feature request related to a problem? Please describe.
What we call "ad-hoc vocabs" is defined in #199, bit in brief it means a vocab which is inferred from the data values present in a field. An example is "Sector - Simplified" in the CUK data, which contains a fixed set of values, but we aren't provided with a complete list of identifiers, and their translations as for cases like the ICA's "Economic Activites".

Currently these ad-hoc vocabs can be used in the directory panel - to do this they get put into the filterableFields config as the first item. This nominally defines the set of drop-down filters - ad-hoc vocabs are permitted but ignored, so that this special case can be supported.

For Owned by Oxford, and likely in other cases, we want to include an ad-hoc vocab "Nature of Organisation" as a filter, not as a the directory. This is because it only has two items. However, we cannot.

There is also a problem with the search history, since directory selection operations are not implemented as a filter operation, and are not included in the search history. This means they interact in unintuitive ways.

Describe the solution you'd like
We would like any non-vocab field to be used as an ad-hoc vocab field in the filterableFields config, and have it appear as a drop-down in the search panel.

We would like it also to be included in the search history as a first-class citizen, so that selections on these filters works like the selection of the other filters.

We would like directory selections to be included in the search history too, which field it is listing, ad-hoc or not.

The above are all related and dependent, and so I think probably belong in the same issue.

We would like these ad-hoc vocabs to be localisable, so that we can add translations - although that may be tantamount to promoting them into a full vocab, and probably belongs in a separate issue.

[edit: The documentation should also be updated to reflect these changes, including that in https://github.com/DigitalCommons/mykomap-site-example]

Describe alternatives you've considered
Most alternatives simply sidestep the problem and are suitable only in specific cases.

We could implement filtering without including it in the history. I'm not sure if that gains anything, as including it isn't a big step if it's written with that in mind.

We could not bother to implement directory selections as filters - but ditto.

Additional context
none currently

@ColmDC

@wu-lee
Copy link
Contributor Author

wu-lee commented May 8, 2023

Time estimate - in T-shirt sizes, medium. In hours, maybe best case about a day, worst a small number of days.

@ColmDC
Copy link
Contributor

ColmDC commented May 8, 2023

We would like these ad-hoc vocabs to be localisable, so that we can add translations - although that may be tantamount to promoting them into a full vocab, and probably belongs in a separate issue.

Shall we drop this requirement. I feel it would be more useful to make it much easier to support a full vocab? Does dropping that requirement materially effect your time estimate?

@wu-lee
Copy link
Contributor Author

wu-lee commented May 8, 2023

Shall we drop this requirement.

Yes, I think we should, and possibly spin it off as a new issue.

I wasn't really taking it into account, so no it doesn't affect the time estimate.

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

No branches or pull requests

2 participants