Page MenuHomePhabricator

Add Tag Cloud in Cronos
Open, Needs TriagePublic

Description

This task is about implementing an awesome "Tag Cloud" for Cronos (or more likely, we will try not to make it too horrible).

Proposed solution n. 1

Every now and then I like to reinvent the wheel so this how I would generate a Tag Cloud with variable font-size according to the importance of each Tag.

Having this proportion:

minTagCount : maxTagCount = minPx : maxPx

From that relation you can obtain this formula:

Cronos Tag Cloud formula.png (72×664 px, 12 KB)

Where:

NameDescriptionType
tagCountweight of the Tag (for example 2 if its used 2 times)variable
maxCountmax tagCount available in the Tag setconstant
minCountmin tagCount available in the Tag setconstant
maxPxmaximum font-size in pixels desiredconstant
minPxminimum font-size in pixels desiredconstant

So the idea is to just shuffle the Tag set (retrieved by the freshly introduced Cronos._tags() method) and display the Tag chips bigger of smaller by that formula.

This was more-or-less how I've implemented a Tag Cloud from scratch in another project. This is how it appeared:

image.png (300×280 px, 118 KB)

Over the next few days, I would like to try hammering this thing into Lua.

Proposed solution n. __

...

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone

Event Timeline

I have not time at the moment as volunteer :(