Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24717
Closed
Open
Created Dec 22, 2017 by irl@irl⌨

Improve design of relay and bridge badges and map overlay

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking