[tor-bugs] #24717 [Metrics/Bot]: Improve design of relay and bridge badges and map overlay
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Dec 22 18:20:20 UTC 2017
#24717: Improve design of relay and bridge badges and map overlay
-----------------------------+----------------------
Reporter: irl | Owner: antonela
Type: enhancement | Status: assigned
Priority: Medium | Milestone:
Component: Metrics/Bot | Version:
Severity: Normal | Keywords: ux-team
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-----------------------------+----------------------
The code that draws the badges is at the end of the
org.torproject.metrics.bot.BaseRelayImpl class:
https://gitweb.torproject.org/user/irl/metrics-
bot.git/tree/src/main/java/org/torproject/metricsbot/tor/BaseRelayImpl.java#n297
For the redesign, mockups are all that's needed as I can do the actual
Java code, but it might help to see how they are created. Essentially it
builds up the image by drawing on to a canvas at fixed coordinates.
These badges are then converted into a bitmap image and uploaded for
Twitter and Mastodon. The size of the badge is currently based on some
"best practices" I found on a blog for Twitter, it works mostly in
Mastodon too but I wonder if a change of size/aspect ratio would be
useful.
In the future, I'd like to write JavaScript too that can build these as
SVGs for dynamic inclusion in web pages so that relay/bridge operators can
include them on their blog. These means that any dynamic text must be in a
font we're allowed to embed.
There are currently 3 image types generated by metrics-bot:
Relay: https://twitter.com/TorAtlas/status/944267221769089024
Bridge: https://twitter.com/TorAtlas/status/944255643728441344
World Map: https://twitter.com/TorAtlas/status/944255648551849987
The world map image is mostly generated by xplanet
(http://xplanet.sourceforge.net/) but there is an overlay bar at the
bottom to add branding.
One idea that I have been thinking about is adding a "country" badge,
which shows relay count, distinct AS count and advertised bandwidth
alongside an image of the outline of the shape of that country, but I have
no idea where I would get the country shapes from.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24717>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list