Default values for facets and resetting all facets #72
HadrienGardeur
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Here's my proposal for handling both default values in a facet group and resetting everything: we introduce a single new rel value that we use for the default value in a facet group or for resetting all facets in a feed. Since we already had Here's an example of the way this could be used in a feed: {
"links": [
{
"href": "/",
"rel": "http://opds-spec.org/facet/default",
"type": "application/opds+json"
}
],
"facets": [
{
"metadata": {
"title": "Sort",
"type": "http://opds-spec.org/facet/sort"
},
"links": [
{
"href": "/fr",
"rel": "http://opds-spec.org/facet/default",
"type": "application/opds+json",
"title": "Most popular"
},
{
"href": "/new/fr",
"rel": "self",
"type": "application/opds+json",
"title": "New releases"
}
]
},
{
"metadata": {
"title": "Language"
},
"links": [
{
"href": "/new",
"rel": "http://opds-spec.org/facet/default",
"type": "application/opds+json",
"title": "All",
"properties": { "numberOfItems": 56 }
},
{
"href": "/new/fr",
"rel": "self",
"type": "application/opds+json",
"title": "French",
"properties": { "numberOfItems": 10 }
},
{
"href": "/new/en",
"type": "application/opds+json",
"title": "English",
"properties": { "numberOfItems": 40 }
},
{
"href": "/new/de",
"type": "application/opds+json",
"title": "German",
"properties": { "numberOfItems": 6 }
}
]
}
]
} In this example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With the move to OPDS 2.0, we've cleaned up our approach for representing facets with three core concepts:
facet
collection which contains metadata (title of the group) plus links (list of values available)self
value in therel
of a Link ObjectHere's what we have in our current draft for it:
Once a facet is selected by the user, the client follows the URI indicated in
href
. If I select French, this could result in a feed with the following facet for example:As you can see in this example, there's nothing here that allows to me reset the value of the current facet, this would need to be added by the catalog, for example with a value pointing to "All" :
Even with this addition, there's nothing that indicates to the client which value is actually the default one. This lack of information about default values for facets has a negative impact on the kind of UX/UI that OPDS clients can provide, since it limits what we can do with them.
For example, it has become fairly common to use what Google calls an input chip in Material Design 3 for such use cases where:
Some mobile apps go even beyond that by allowing the user to dismiss all facets/filters that are currently active, for example by showing a dismiss action next to all active facets.
Example in Spotify
Example in Google Play Books
This concept has been explored in OPDS 1.x before by one of the oldest OPDS app out there called eBook Search where the default value for each facet is identified by a rel value, and a new link is also added to a catalog in order to reset all facets.
I think that there's some value in exploring that concept, either through a
rel
value or a new addition toproperties
.Beta Was this translation helpful? Give feedback.
All reactions