# Sorting & Grouping

# Sorting & Grouping

Codecks comes with a powerful grouping mechanism. Learn how to slice and dice your cards to surface the important stuff.

[Watch on YouTube](https://www.youtube.com/watch?v=MPTy3lrag6A)

#### Basic principles

![Order options](https://manual.codecks.io/_astro/sorting-overview.BQY6FnpW_1Qdow0.webp)

The order button shows up in four contexts:

1. Search results
2. Decks
3. Milestones
4. [Runs](https://manual.codecks.io/runs/)

You can find it in the action bar to the left.

By default, cards will be grouped by `Manual` in milestones and Runs and by `Priority` everywhere else. By using the order panel (shortcut `shift+o`) you can pick any of the other available orders:

- [Priority](https://manual.codecks.io/priority/)\*
- [Effort](https://manual.codecks.io/effort/)\*
- [Workflow state](https://manual.codecks.io/workflow/)\*
- [Tags](https://manual.codecks.io/tags/)\*
- [Owner](https://manual.codecks.io/owner/)\*
- [Run](https://manual.codecks.io/runs/)\*
- [Milestone](https://manual.codecks.io/milestones/)\*
- Last updated
- Creation date
- Creator
- Deck\*
- [Project](https://manual.codecks.io/projects/)
- Title
- [Upvotes](https://manual.codecks.io/discord/)
- [Time tracked](https://manual.codecks.io/time-tracking/)
- [Due date](https://manual.codecks.io/due-dates/)
- [Hero Card](https://manual.codecks.io/hero-cards/)\*
- [Beast Level](https://manual.codecks.io/runs/#beast-mode)
- Manual (see below)

> **Drag and drop interactions**
>
> All orders marked with a `*` in the list above can be used to change a card's property via drag and drop. You can either drop a card directly into one of the other lanes or use the drop area to the right which will show a full list of available options.

> The **Creator** order groups cards by who created them (as opposed to **Creation date**, which sorts by _when_ they were made). For cards created via [Decky](https://manual.codecks.io/discord/), this groups them by Discord user — handy for spotting patterns in community-submitted cards.

To get a more compact view, you can activate the `Compact` toggle at the bottom. This will group all cards into a single swim lane. Tags do not support a compact view as a card can show up multiple times if it has more than one tag.

In Manual order, the `Hide empty` toggle hides Zones that have no cards.

#### Manual Order and Zones

![Zones](https://manual.codecks.io/_astro/sorting-zones.CAyx1h8Y_2bnWU4.webp)

Decks, Milestones and Runs have a special order: `Manual`. This allows to define a custom order via drag and drop which is shared amongst the team.

Note that within Manual order, relative positioning of cards is preserved when moving them from one milestone or deck to the next.

Rather than working with predefined swimlanes, Manual order allows you to define `Zones`. Cards can be freely moved across and within Zones.

If you have the [permission](https://manual.codecks.io/users/) to modify the respective Deck, Milestone or Run, you can create Zones via the `Add Zone` Button at the bottom. If you hover over the Zone name, you can modify its name or change the order. Empty zones can be deleted via the edit dialog.

You can use the `+` icon at the end of each zone to directly add a new card to it. When cards are added another way (either via moving them into the deck, milestone or Run, or via creating them with the red plus button) they are always added at the end of the top-most Zone.

> **Slice and Dice Your Data**
>
> Because Codecks isn't built around fixed Kanban boards, you can reorganize your cards by any dimension without losing information. Sort by owner, priority, milestone, deck, or workflow state - the card's properties stay intact.
>
> A card only exists in one place (its deck), but you can view it through any lens you need. This avoids the Kanban problem where you need to mirror cards across 20 different boards to see different perspectives, then struggle to keep them in sync.

#### Table View

![Table View](https://manual.codecks.io/_astro/table-view.CcOmQ5mt_2qkeHV.webp)

Table View is especially helpful for browsing large deck contents. You can find the option at the bottom of the sort panel.
It supports all sorting options as well as the drag and drop operations of both the manual mode and the other supported sorting options.

#### The swim lane header

![Swim lane header](https://manual.codecks.io/_astro/sorting-swimlane-header.OqvafNU1_vpH5T.webp)

> **What is a swim lane?**
>
> The term "swim lane" has been borrowed from the Kanban methodology. It describes the sections by which a Kanban board has been split into. Typically those sections sections reflect the workflow state of a card (pending, started, done). Codecks allows you to mimic these type of swim lanes by ordering by "Workflow state".
>
> Note that while typical Kanban swim lanes are vertical, Codecks uses a horizontal approach to make better use of space in the more typical scenarios of having few lanes with a lot of content.

The swim lane header consists of up to four parts:

1. **Swim lane label:** Most sorting order allow you to click on the label to add the underlying property as a search entry. This allows you to quickly drill down on interesting properties by continuously iterating search terms and order.
2. **Select all button:** This button only shows when hovering the area with the mouse. It allows you to quickly select all cards of the swim lane. **Pro tip:** if you selected a single card of a swim lane and hitting `ctrl/cmd + a` will select all cards of the current swim lane. Hitting `ctrl/cmd + a` once again will select all visible cards.
3. **Effort summary**: if at least one card in a swim lane has an effort set, this section will be present. It shows the effort of all cards. The number in brackets indicate the number of cards without an effort set. I.e. cards with an effort of "None".
4. **Time tracking summary**: If at least one card has time tracking information associated with it, this section will be shown. Hovering it will show a pop which breaks down the tracked time by user.

#### Secondary search order

For cards that share the same attribute of the primary sort order there's an implicit secondary sort order. It's based on priority, then effort and lastly creation date. So if you order by e.g. "Owner", then high priority cards will be shown first for each owner.

You can overwrite this behavior by turning on the `Multi Sort` toggle and clicking an order button, or by `ctrl/cmd + click` on an order button. This will effectively push the selected sort order in front of the implicit order defined above. So if you picked "Milestone" as a secondary order while keeping "Owner" as primary order it'll show cards in the nearest milestone first for cards with the same owner. Cards with the same owner and milestone will again use priority then effort and creation date to sort those further.

You can also define more than one secondary search order by clicking on additional buttons the same way. The number next to the button indicates the rank of the selected search order. To reset, turn off `Multi Sort`, or do a normal click on an order while `Multi Sort` is off. Manual order can't be combined with secondary orders, and Tags and Hero Card can't be used as one.

#### Default View

![Default View area](https://manual.codecks.io/_astro/default-view.Ba9XB03G_1gmEDq.webp)

Whenever you apply an order in a Deck, Run or Milestone, this choice will be remembered for your browser.

To share your preferences with your team (or in case of a public deck with your audience), you can define a **Default Order**. Do this by looking for the corresponding area at the bottom. When team members or visitors see the Deck, Run or Milestone for the first time they will see cards in the preferred order. They can still pick their own order but will see a small hint at the sort icon as a reminder that they might want to go back to the default view.
