Skip to content

Add Sorting back to ViewRaid page #51

@nobrayner

Description

@nobrayner

Previous Svelte version had a select to change the sorting of the ranking based on commits, additions, or deletions.

Currently no sort whatsoever has been applied. This should be added back in.

See the below for reference:

const userStatSorts: {
[key: string]: (a: UserStats, b: UserStats) => number
} = {
commits: (a, b) => b.commits - a.commits,
additions: (a, b) => b.additions - a.additions,
deletions: (a, b) => b.deletions - a.deletions,
}
const userStatSortNames = Object.keys(userStatSorts)
let currentSort = userStatSortNames[0]
Sort by:<select bind:value={currentSort} disabled={data.commits <= 1}>
{#each userStatSortNames as theSort}
<option value={theSort}>
{theSort}
</option>
{/each}
</select>

Metadata

Metadata

Assignees

No one assigned

    Labels

    CTA: Help WantedCALL TO ACTION: Rally to Aid a fellow Raid Member!!!Difficulty: Beginner 🤓Good for newbie to start Raiding!!Priority: High ⚠️This could slow down other Raid/Guild members OR effect Raid completion!!!Type: FeatureNew Feature and/or functionality - significant code rewrite or additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions