Skip to content

Add word cloud of most used tags on dashboard 馃寪聽#578

Description

@anoopcodehack

Add word cloud of most used tags on dashboard 馃寪

File: client/src/pages/Dashboard.jsx

No visual summary of what tags are
used most across all tasks 馃拃 fr!!

Fix: calculate tag frequency:
const tagFrequency = tasks
.flatMap(t => t.tags || [])
.reduce((acc, tag) => {
acc[tag] = (acc[tag] || 0) + 1
return acc
}, {})

const topTags = Object.entries(tagFrequency)
.sort((a, b) => b[1] - a[1])
.slice(0, 8)

// show as sized badges:

{topTags.map(([tag, count]) => ( setActiveTag(tag)}> #{tag} ))}

~15 lines! No backend needed 馃幆
Bigger tag = used more!! 馃敟

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions