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

Tag filters #144

Open
2 tasks
geoversed opened this issue Jul 23, 2024 · 4 comments
Open
2 tasks

Tag filters #144

geoversed opened this issue Jul 23, 2024 · 4 comments
Assignees
Labels
feature This is a feature request. tags Relevant to tagging content.

Comments

@geoversed
Copy link
Owner

geoversed commented Jul 23, 2024

Is your feature request related to a problem? Please describe.
Sometimes I want to look for tags that I recently created because they are more relevant to me. Though in the current system, it is stored alphabetically.

Describe the solution you'd like

  • Ability to sort your tags by date created and alphabetically
  • Ability to sort all tags by date created and alphabetically

Describe alternatives you have considered
By default, we could always sort tags by date creation, and then add an optional parameter to control whether or not it should be ordered alphabetically. This could even be made a setting?

Additional context
With tags, you can store text that may be useful to you for later retrieval. If you made a tag recently, you would expect to use it sooner than later. This functionality makes it possible.

@geoversed geoversed added feature This is a feature request. tags Relevant to tagging content. labels Jul 23, 2024
@geoversed geoversed self-assigned this Jul 23, 2024
@geoversed geoversed moved this to Backlog in c2c Development Jul 24, 2024
@geoversed
Copy link
Owner Author

By default, we could always sort tags by date creation, and then add an optional parameter to control whether or not it should be ordered alphabetically. This could even be made a setting?

This will become a setting. We initially went down the parameter route, and well, it was quickly reconsidered when we discovered that prefix commands are now impossible to use alongside it.

Some creativity is required here. It could be made a setting and be customizable at any time when interacting with the command, through an item (select) within the paginator view. One select for displaying the filter (what to sort by) and possibly another one for displaying the order method (ascending or descending).

@geoversed
Copy link
Owner Author

We will also most likely add buttons to the view enabling you to change your "default order by" setting (date created, alphabetical) and "default tag order" setting (ascending/descending) without having to change the setting on a per-view basis.

@geoversed geoversed removed the planned label Oct 16, 2024
@geoversed
Copy link
Owner Author

geoversed commented Oct 16, 2024

SQL

  • Sort by date created:
ORDER BY rowid DESC
  • Sort alphabetically:
ORDER BY name ASC

The ASC is not really needed because it defaults to ascending order, but it is better to be explicit.

The options to toggle between the two filters will be in a select alongside the paginator(s).

Option Names

  1. By date created: Recent tags come first
  2. Alphabetically: Special characters first, then from A onwards.

@geoversed geoversed changed the title Add option to sort tags by date created Tag filters Oct 16, 2024
@geoversed
Copy link
Owner Author

Initial perspective

ORDER BY time_created DESC -- get the oldest tags first
ORDER BY rowid ASC -- also get the oldest tags first

ORDER BY time_created ASC -- get the newest tags first
ORDER BY rowid DESC -- also get the newest tags first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is a feature request. tags Relevant to tagging content.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant