purxiz / deckollab

0 stars 1 forks source link

Secondary Sorting #2

Open purxiz opened 4 years ago

purxiz commented 4 years ago

add support for secondary sorting, "none" should be an allowable option. Any two sorts should be able to be applied in order. deep_alphabetize handles the object structure below already for tertiary sorting secondary sorting should divide into columnar bins, visually for a single sort, primary_sort_bin should be an ordered array list of cards. sorted object should have the following format if two sorts are selected

 sorted_cards: {
    primary_sort_bin1: {
        secondary_sort_sub_bin1: [
            { /* card object */ },
            { /* second card object in order */ },
        ],
        secondary_sort_sub_bin2: [
            { ... },
            { ... },
        ],
        ...
    },
    primary_sort_bin2: {
        ...
    },
    ...
 }

It will also be necessary to update get_sorted_labels to handle a multi-tier sort, and update_card to handle displaying a multi tier sort. I'd like multi tier sorts to have the primary sort displayed as it is now, and then horizontal lines with a bit of padding between secondary sort sections.

purxiz commented 4 years ago

24 finishes most of this.