nthiebes / old-world-builder

An army builder for Warhammer: The Old World and Warhammer Fantasy Battles.
https://old-world-builder.com
Other
25 stars 38 forks source link

Groups for lists #180

Open nthiebes opened 6 months ago

nthiebes commented 6 months ago

Quoting Candite:

Idea : it would be great to add an optional "folder" / "context" system where you can group different lists together, to havoid having an infinite scroll of lists to go through when you are looking for one of them, for people like me who love making multiple versions of the same list (and who have multiple armies in addition) without having to bother with the export/import feature. At the moment my only option to simulate this is to switch multiple web browsers, each of them using their own local storage.

The army selection as it's currently done feels great, I would not risk changing it.

So maybe, for this feature the easiest to handle would be a new page on your site (see image), with a dedicated icon on the menu of course.

On that "army list groups" page (or whatever you want to name it), you could manage your groups : Create / Rename / delete groups (a group would just need a name, I don't think a description is necessary) If you delete a group, all armies in that group just end up without a group

To assign an army to a group, it could be done in the Edit List menu display (see image).

Finally, to switch between groups, you could either : In the "army list groups" menu, add a dropdown with the currently selected group. This is a little hidden and would require multiple user inputs to switch between groups In your web site banner, only if there is at least one group defined, add a new dropdown action to quickly switch between groups (or get back to the "no group" context)

The feature would totally be optional, all army lists being in "no group" by default. The "no group" context would be the default one when we display your web site.

Technically, this could be handled by just adding an optional "group" tag to each army, and if a "group" context is selected, the display just filters any army list which does not have the selected "group" tag.

And you need a way to store the "group" list the user has defined.

When you switch between army tags, you could also have the option to display all armies - all groups - or just the armies without a group yet. And the default display on the web site would be the "all groups" context.