-
Notifications
You must be signed in to change notification settings - Fork 22
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
Overriding filter definition info in config file #268
Comments
Plan of action:
|
For the sortable setting, we need:
|
Some additional points:
|
Proposed idea: <filters>
<filter key="Document Category">
<!--Multiple XHTML labels (for i18n) -->
<label xmlns="http://www.w3.org/1999/xhtml" lang="en"></label>
<label xmlns="http://www.w3.org/1999/xhtml" lang="fr"></label>
<!--If sortable/@value="false",
then ascending and descending shouldn't exist -->
<!-- Content model: either empty OR ascending AND descending -->
<sortable value="true">
<!--If specified, by the -->
<ascending>
<!--By default, the label is:
{$FILTER_LABEL} ({$DEFAULT_ASC}) -->
<label xmlns="http://www.w3.org/1999/xhtml"></label>
</ascending>
<descending>
<!--By default, the label is:
{$FILTER_LABEL} ({$DEFAULT_DESC}) -->
<label xmlns="http://www.w3.org/1999/xhtml"></label>
</descending>
</sortable>
</filter>
</filters> |
Working on this in branch issue-268-filters. |
… on handling them in the config processing.
The first phase of this is done and ready for a pull request. Note that instead of |
The label stuff has now been merged, so the next stage is to nail down the details of the ascending/descending thing. Do we really think that each individual filter should need distinct labels for ascending and descending? I can see that there are probably different types of filter that might benefit from different labels ("earliest first", "smallest last"), but I wonder if a single global caption for "ascending" and "descending" would cover it for most cases. But if we do go for custom labels in the filter config, shouldn't we allow all the languages as well? |
@joeytakeda The Jenkins build is broken for some reason. I'll try to take a look at it this weekend. |
Next is the documentation of the labels. When that is done, we can close issue #248, and move on to (3) in the plan of action above. |
See issue #283 before proceeding with this. |
There are a number of issues related to filter features, including #248 (allowing markup in filter labels), and #86 (allowing sorting results by filter value), and we think the way to approach this is to define a filter element in the config which allows you to override the name with a richer label, set the sortable feature, and possibly other things. This will require allowing some HTML into our config file, probably rooted on the HTML label element, so people can do styling.
The sortability feature will also require a label, so it should be a child element with a single HTML label element child.
The label element should have a language setting, presumably using
@xml:lang
and/or@lang
. We're leaning towards@lang
because it also has specialized CSS support.The filter element needs
@key
which should be identical (after normalization) to themeta/@name
value in the collection documents.The text was updated successfully, but these errors were encountered: