A More Conversational Sublevel

Lucian Marin
2 min readDec 13, 2017

--

Sublevel saw some deeper changes lately. From design up to the way things work at a lower level. The challenge was always to bring complexity down to simple ways to understand and use the product. The premise is to have a conversation with anyone in the world.

The longest path

In graph theory and theoretical computer science, the longest path problem is the problem of finding a simple path of maximum length in a given graph. Comment threads are actually a graph. But it’s not possible to show the whole graph on mobile devices. The solution to this problem is to bring the graph down to a linear model. Paths are linear in nature, so the longest path becomes the most conversational path.

A child, its parent and its children

How did I do it?

My comment model has a parent field which is just a foreign key to itself and nothing else. I computed the ancestors with WITH RECURSIVE statement from PostgreSQL for the current post. Then I display these ancestors and prefetch the replies in Django along the way. This is much simpler than having to navigate the path using an up button, displaying the current post and fetching its children separately.

The top parent

Design has also been improved. Now Sublevel has an action bar at the top and it stays there wherever you are on the site. It can be a tab bar, a search bar, a reply bar or just the post bar. It can be anything.

--

--

Lucian Marin

Python developer and all things design. See lucianmarin.com for contact details.