You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is for Tags specifically, but this concept could be applied to other types of objects as well.
Is your feature request related to a problem? Please describe.
sorting tags by name there is often an order that would be preferable but does not work with a standard alphanumeric sort without altering the name of the tag
Describe the solution you'd like
the addition of a sort_name attribute to Tags that when present would be used over name when sorting tags
example:
SELECT COALESCE(sort_name, name) as sname ORDER BY sname
Describe alternatives you've considered
I often add a prefix that changes the sort order of the tags, while useful this makes the tag ugly where it is displayed in the UI this also changes the main name for the tag which can make scraping difficult
Implementation
Ideally the sort_name would also be available in the DOM so that userscripts might take advantage of it. Perhaps as an addental attribute in the <a> element like <a href="link" data-tag-sort-name="sort_name">Tag Name<a>
Additional context
As has been mentioned elsewhere this could also be used as an ad-hoc way of a user adding namespaces (#1253) to tags.
For example:
a sort name for a Performer tag could be Performer - Tall and with relatively minimal effort, tags being added in a performer context could be filtered by {"sort_name": {"modifier":"MATCHES_REGEX", "value": "^Performer"}}, which could be defined in a config by the user to filter tags in such a context, allowing for namespaces in a way which preserves most of the current functionality of tags
The text was updated successfully, but these errors were encountered:
To add onto the "alternatives" section, adding a prefix to the name also breaks tag matching in draft submissions to a Stash-Box. It expects the name in Stash to match either the primary name, an alias, or a previously merged name in the Stash-Box. The other solution to this problem is to add StashIDs to tags for matching instead, same as studios and performers.
This issue is for Tags specifically, but this concept could be applied to other types of objects as well.
Is your feature request related to a problem? Please describe.
sorting tags by name there is often an order that would be preferable but does not work with a standard alphanumeric sort without altering the name of the tag
Describe the solution you'd like
the addition of a
sort_name
attribute to Tags that when present would be used overname
when sorting tagsexample:
Describe alternatives you've considered
I often add a prefix that changes the sort order of the tags, while useful this makes the tag ugly where it is displayed in the UI this also changes the main name for the tag which can make scraping difficult
Implementation
Ideally the sort_name would also be available in the DOM so that userscripts might take advantage of it. Perhaps as an addental attribute in the
<a>
element like<a href="link" data-tag-sort-name="sort_name">Tag Name<a>
Additional context
As has been mentioned elsewhere this could also be used as an ad-hoc way of a user adding namespaces (#1253) to tags.
For example:
a sort name for a Performer tag could be
Performer - Tall
and with relatively minimal effort, tags being added in a performer context could be filtered by{"sort_name": {"modifier":"MATCHES_REGEX", "value": "^Performer"}}
, which could be defined in a config by the user to filter tags in such a context, allowing for namespaces in a way which preserves most of the current functionality of tagsThe text was updated successfully, but these errors were encountered: