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

Option for tag members to be sorted non-alphabetically #1463

Closed
richardtkemp opened this issue Apr 25, 2020 · 9 comments · Fixed by #2202
Closed

Option for tag members to be sorted non-alphabetically #1463

richardtkemp opened this issue Apr 25, 2020 · 9 comments · Fixed by #2202
Assignees
Labels
enhancement New feature inactive This issue hasn't seen any activity recently.

Comments

@richardtkemp
Copy link

It seems to me that when a tag is chosen from the tags menu, its members are displayed sorted alphabetically. I would like to sort by recency, the same way I have history set to sort.

I request an option, either
a) sort tag members the same way history is sorted, or
b) choose sort method for tag members from the algos currently available for history.

@richardtkemp richardtkemp added the enhancement New feature label Apr 25, 2020
@Neamar
Copy link
Owner

Neamar commented Apr 27, 2020

cc-ing @TBog :)

@richardtkemp
Copy link
Author

In fact the sort of tag members is actually not consistent. I have no idea what it is! It seemed to be alphabetic when I glanced at it to submit this issue, but since then I've seen the apps in many orders, none of which make any sense to me. Possibly they are unsorted and presented in the order they are returned from some DB or other?

@TBog
Copy link
Collaborator

TBog commented Apr 27, 2020

Will look into it after I publish 'custom icon' and 'rename app' PR

@TBog TBog self-assigned this Apr 27, 2020
@saveman71
Copy link
Collaborator

The tags are basically just an ugly hack ;) You don't have "tagS" you have one string reprenting all the tags, separated by spaces. It's stored as a single string and matched as a single string as well.

As far as I know there is no special "sorting" done when you edit/save them.

@richardtkemp
Copy link
Author

I'm not referring to the order tags are shown on an app, but the way apps are shown when a favourite tag is selected. To me the order actually appears non-deterministic? If there's a rule I've not noticed it.

@saveman71
Copy link
Collaborator

saveman71 commented May 3, 2020

Aaah sorry, I do no use that feature actually.

After looking at the code yes, there is nothing that dictates the order right now, apart from the "search" relevance, but since it's the same search matching the same tags, it's the same score!

protected Void doInBackground(Void... voids) {
MainActivity activity = activityWeakReference.get();
if (activity == null)
return null;
KissApplication.getApplication(activity).getDataHandler().requestAllRecords(this);
return null;
}

VS

protected Void doInBackground(Void... voids) {
MainActivity activity = activityWeakReference.get();
if (activity == null)
return null;
// Have we ever made the same query and selected something ?
List<ValuedHistoryRecord> lastIdsForQuery = DBHelper.getPreviousResultsForQuery(activity, trimmedQuery);
knownIds = new HashMap<>();
for (ValuedHistoryRecord id : lastIdsForQuery) {
knownIds.put(id.record, id.value);
}
// Request results via "addResult"
KissApplication.getApplication(activity).getDataHandler().requestResults(trimmedQuery, this);
return null;
}

I think the Tag earcher could inherit from the Query searcher? Should be pretty straightforward.

@stale stale bot added the inactive This issue hasn't seen any activity recently. label Feb 21, 2021
@sbennett18
Copy link

sbennett18 commented Dec 27, 2022

Any chance this could be looked at again @TBog @Neamar? The order of apps in a favorited tag is arbitrary.
I've noticed that immediately after restarting KISS through the advanced settings the order is alphabetical, but after some time the order is seemingly arbitrary.

@SanskritFritz
Copy link

The order of the tag members depends on the previously used mode:

  • If you press the Kiss button (or long tap on the background) then all apps are listed in alphabetical order. Selecting a tag afterwards presents the tag members in alphabetical order.
  • If you list the history (in my case by tapping onto the background) the last n apps are presented in the order chosen in the settings (in my case the last used apps at the bottom). Selecting a tag afterwards presents the tag members in history order.

Here is both cases demonstrated: https://www.youtube.com/watch?v=HnQHys1X-0w

I would like to have the history order even after viewing all apps. Or my question is: can we have history ordering on all apps too?

@sbennett18
Copy link

One caveat to your second bullet is if any/all of the tagged apps are marked Excluded from history. Then the history order does not apply. I'd be happy with the order being consistent either way rather than the order based upon the last thing you did -- checked history or opened the full app list.

marunjar added a commit to marunjar/KISS that referenced this issue Nov 13, 2023
- refactor `TagsSearcher` and `UntaggedSearcher` as they have a lot in common
- add method to apply relevance from history to any number of pojo
- when tagged/untagged results are shown order is taken from history by default
- add new preference for setting custom order of tagged/untagged results
- collect all tag related preferences from `KISS Settings -> UX` in a `Tags` category
- fixes Neamar#2187, Neamar#1609, Neamar#1463
marunjar added a commit to marunjar/KISS that referenced this issue Nov 15, 2023
- refactor `TagsSearcher` and `UntaggedSearcher` as they have a lot in common
- add method to apply relevance from history to any number of pojo
- when tagged/untagged results are shown order is taken from history by default
- add new preference for setting custom order of tagged/untagged results
- collect all tag related preferences from `KISS Settings -> UX` in a `Tags` category
- fixes Neamar#2187, Neamar#1609, Neamar#1463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature inactive This issue hasn't seen any activity recently.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants