logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

sourcehut-design.md (4312B)


  1. ---
  2. date: 2019-03-04
  3. layout: post
  4. title: Sourcehut's spartan approach to web design
  5. tags: ["sourcehut", "philosophy"]
  6. ---
  7. [Sourcehut](https://sourcehut.org) is known for its brutalist design, with its
  8. mostly shades-of-gray appearance, conservative color usage, and minimal
  9. distractions throughout. This article aims to share some insights into the
  10. philosophy that guides this design, both for the curious reader and for the
  11. new contributor to the open-source project.
  12. The most important principle is that sr.ht is an engineering tool first and
  13. foremost, and when you're there it's probably because you're in engineering
  14. mode. Therefore, it's important to bring the information you're there for to the
  15. forefront, and minimize distractions. In practice, this means that the first
  16. thing on any page to grab your attention should be the thing that brought you
  17. there. Consider [the source file view on git.sr.ht][gitsrht-blob]. For
  18. reference, here are similar pages on [GitHub][github-blob] and
  19. [Gitlab][gitlab-blob].
  20. [gitsrht-blob]: https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht/service.py
  21. [github-blob]: https://github.com/torvalds/linux/blob/master/init/main.c
  22. [gitlab-blob]: https://gitlab.freedesktop.org/libinput/libinput/blob/master/src/evdev.c
  23. [![Screenshot of git.sr.ht](https://sr.ht/kkJm.png)][gitsrht-blob]
  24. <style>
  25. img {
  26. box-shadow: 0 0 2px 2px #888;
  27. max-width: 90%;
  28. }
  29. </style>
  30. The vast majority of the git.sr.ht page is dedicated to the source code we're
  31. reading here, and it's also where most of the colors are. Your eye is drawn
  32. straight to the content. Any additional information we show on this page is
  33. directly relevant to the content: breadcrumbs to other parts of the tree, file
  34. mode & size, links to other views on this repository. The nav can take you away
  35. from this page, but it's colored a light grey to avoid being distracting and
  36. each link is another engineering tool - no marketing material or fluff. Contrast
  37. with GitHub: a large, dark, attention grabbing navbar with links to direct you
  38. away from the content and towards marketing pages. If you're logged out, you get
  39. a giant sign-up box which pushes the content halfway off the page. Colors here
  40. are also distracting: note the large line of colorful avatars that catches your
  41. eye despite almost certainly being unrelated to your purpose on this page.
  42. ![Screenshot of builds.sr.ht](https://sr.ht/1qdZ.png)
  43. Colors are used much more conservatively on sourcehut. If you log into
  44. builds.sr.ht and visit the index page, you're greeted with a large blue "submit
  45. manifest" button, and very little color besides. This is probably why you were
  46. here - so it's made obvious and colorful so your eyes can quickly find it and
  47. get on with your work. Other pages are similar: the todo.sr.ht tracker page has
  48. a large form with a blue "submit" button for creating a new ticket, email views
  49. on lists.sr.ht have a large blue "reply to thread" button, and
  50. [man.sr.ht](https://man.sr.ht) has a large green button enticing new users
  51. towards the tutorials. Red is also used throughout for dangerous actions, like
  52. deleting things. Each button also is unambiguous and relies on the text within
  53. itself rather than the text nearby: the git.sr.ht repository deletion page uses
  54. "Delete $reponame", rather than "Continue".
  55. ![Screenshot of repo deletion UI](https://sr.ht/d6Vx.png)
  56. The last important point in sourcehut's design is the use of icons, or rather
  57. the lack thereof. Icons are used extremely conservatively on sr.ht. Interactive
  58. icons (things you are expected to click) are never shown without text that
  59. clarifies what happens when you click them. Informational icons usually have a
  60. tooltip which explains their meaning, and are quite rare - only used in cases
  61. where real estate limits the use of text. Assigning an icon to every action or
  62. detail is not necessary and would add more distractions to the screen.
  63. I'm not a particularly skilled UI designer, so keeping it simple like this also
  64. helps to make a reasonably nice UI attainable for an engineer-oriented developer
  65. like me. Adding new pages is generally easy and requires little thought by
  66. applying these basic principles throughout, and the simple design doesn't take
  67. long to execute on. It's not perfect, but I like it and I've received positive
  68. feedback from my users.