KFNEXUS / KFNEXUS.github.io

GNU Lesser General Public License v3.0
3 stars 6 forks source link

Organization For Listing Sets #16

Open CrazyVulcan opened 8 years ago

CrazyVulcan commented 8 years ago

I've been thinking recently as I have been working with Utopia, for yesterday I had to reset my browser history and cookies. When I went in today to make some new builds I had to go through the entire list of ships selecting the ones I have. No big deal but doing so I noticed just how large and expansive that list has become and it is growing rapidly every month. Also, we have the issue where Wizkids are planning to rerelease 2 reprints every month for the next year.

Can either of you think of a way we can re-organize this? Jorg, I know you said you like having the reprints listed to make each wave feel more fleshed out but I am wondering if there could be a way re-order and sort each item. As a novice programmer, I have little knowledge as the how to for many things. But what would be involved in adding three buttons to the set viewer and fleet builder?

At the top of the set viewer can we add 3 buttons under the title and link to the builder? "Sort by Release", "Sort by Name", and "Sort by Faction". These buttons do what they say on the tin. Take the items on the side and reorder them to make searching them browsing easier. Even if I know the name of the expansion I am looking for and the general location for when it came out it is still difficult to find and that is on my PC. I can only imagine how difficult this must be to navigate on mobile.

Also these three buttons could be placed in the builder under the "check all" & "uncheck all" buttons.

I don't know how everyone else feels about the current set up but I feel this will make a nice quality of life feature.

-Christopher

jsterner73 commented 8 years ago

Hi,

I think I know what you want to do. I came back from a vacation yesterday and still have to sort stuff for the rest of the week. I'll try to take a look at it and see if I can modify the code to add those features. Worst case we can just remove the buttons again and everything is back to the way it's now.

Thanks for bringing this up.

Joerg

jsterner73 commented 8 years ago

I've taken a look at this and for the Set Viewer there are few easy ways to do what you suggested.

You can try this out on your local version. Just edit the file "staw_utopia\set-viewer.html" and there you'll find a line

            <ul class="set-list">
                <li ng-repeat="set in setList | orderBy:'-releaseDate'" ng-click="viewer.set = set" ng-class="{'set-selected': viewer.set == set}">{{set.parentSet}}: {{set.name}}</li>
            </ul>

If you change the "orderBy" parameter (the '-' prefix means the order is reversed) to another value you get different orders.

The valid values for that are the ones defined in the data.json file - for sets that is (for example):

    {
        "type" : "set",
        "id" : "72270p",
        "name" : "Kohlar’s Battle Cruiser",
        "releaseDate" : "2016-10-30",
        "parentSet" : "Trouble with Tribbles"
    },

So, if you want it to be sorted by the set, you'd write "orderBy:'parentSet'" in the "set-viewer.html".

As you can see, there's no reference to the faction, as this is only the definition of the set item.

Please let me know, if that what you had in mind.

Thanks

Joerg

CrazyVulcan commented 8 years ago

Yes, that is what I was wanting, I actually changed it to sort by name as well as parent type and that was just too much of a mess. I will head back to the drawing board

On Sun, Sep 11, 2016 at 4:52 AM, Joerg Sterner notifications@github.com wrote:

I've taken a look at this and for the Set Viewer there are few easy ways to do what you suggested.

You can try this out on your local version. Just edit the file "staw_utopia\set-viewer.html" and there you'll find a line

        <ul class="set-list">
            <li ng-repeat="set in setList | orderBy:'-releaseDate'"

ng-click="viewer.set = set" ng-class="{'set-selected': viewer.set == set}">{{set.parentSet}}: {{set.name}}

If you change the "orderBy" parameter (the '-' prefix means the order is reversed) to another value you get different orders.

The valid values for that are the ones defined in the data.json file - for sets that is (for example):

{
    "type" : "set",
    "id" : "72270p",
    "name" : "Kohlar’s Battle Cruiser",
    "releaseDate" : "2016-10-30",
    "parentSet" : "Trouble with Tribbles"
},

So, if you want it to be sorted by the set, you'd write "orderBy:'parentSet'" in the "set-viewer.html".

As you can see, there's no reference to the faction, as this is only the definition of the set item.

Please let me know, if that what you had in mind.

Thanks

Joerg

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.