BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.43k stars 1.94k forks source link

Ability to set a manual shelf sort order #5209

Open Extrapilot1 opened 2 months ago

Extrapilot1 commented 2 months ago

Describe the feature you'd like

I would like to see some control over how shelves are sorted, other than the existing alphabetical or creation date.

Describe the benefits this would bring to existing BookStack users

For many of us, shelves are not quite broad enough for categorization. Reasonable people could disagree about how effective it is to broaden the shelf concept (i.e. as with school libraries- where you may have a Bio/Sci library, a Poly Sci library etc) to limit shelves, vs having more broad Shelf content (where a Shelf might end up with books that arent all that closely related in some cases). But for many of us, we are using Bookstack for research data compilation, or business info etc, where it would be convenient to display certain shelves first (where they represent a major project, or something less generic than other shelves (which may contain archive/reference info etc).

It seems to me that since there is already a method which permits sort based on creation date, the idea of forcing the sort as alphabetical is permitted an exception. And while I see less upside in sorting by creation date, its just an option available to users who may need it. Im thinking it wouldnt be so difficult to add, say, a list order value to the Chapter properties. Or perhaps a Group order would be even better, where if you want to be sure that, say, a parent entity is always shown first, it is Group A. If there are multiple other shelves that are higher priority/use, they could be group B (say, 5 of those, where the sort option would be by group, and within that, alphabetical). It adds a single 'order by' term to the query, and if there is no entry used for Group, it is simply ignored since all shelves would have equal group value...

Can the goal of this request already be achieved via other means?

I have not been able to find a way to manage this via the native capabilities of Bookstack. There isnt a provision as there is with books/chapters to set priority, and there isnt a top-level Sort option that supports anything but title (Alphabetical) or creation date. Absent an option to sort by tag or group ID, or something more native (as with books/chapters), about the only option is to use group letters as part of the title as (A) Suppliers, (B) Corporate etc. But that is an ugly workaround (not attractive, doesnt scale, where the addition of a shelf you want between A and B requires a manual cascade of changes etc.

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

1 to 5 years

Additional context

No response

ssddanbrown commented 2 months ago

Thanks for the request @Extrapilot1. This is closely related to issue #180. I'm going to update the request title to be specific to allowing manual shelf ordering since some general ordering options already exist.