Pub history: a brief history

Over the last few days I’ve been building out a fun new V6 feature, the pub (really, branch) history slider that lets you scrub back and forth to see intermediate states of the pub. Here’s a quick demo of how it’s looking:

Some salient features:

  • The history slider is toggled by the “history” button in the pub header.
  • When opening the history, we disable collaboration, editing, and discussions (due to physical limitations imposed by the one-way arrow of time)
  • The slider UI replaces the editor bar, and sticks to the top of the screen
  • There’s a button on the right that copies a permalink to the history at this point (/pub/X/branch/Y/step)
  • I changed the history button to be skewed like its neighbors. Visually I think it looks much better and semantically I think we can get away with it, since this is really the branch history.

Some limitations/open questions

  • Though the slider is labelled with datetimes, you’re really scrubbing back and forth between the changes in the pub history, rather than time. What I mean by this is that if you make 99 changes on January 1 and one change on June 1, 99% of the available slider space will be occupied by January 1. This way you can (with infinite mouse precision) scrub to any intermediate step, and we don’t have to query to find the nearest change to a given date. Since change histories are quite “lumpy”, I think this is the right decision, but…
  • I would like to the time corresponding to a given step as easy to understand as possible. Right now, we query this information when the slider moves — we ask the server “give me the document at step 3000” and it sends back a {document, timestamp} pair. We could cache/query more of the timestamps up front, but @trich and I agreed to defer that until later.
  • I was also interested in emulating a feature of the Google Docs history where changes are “bundled” by timestamp, so you can easily jump to the latest version before a period of inactivity. We’d need the aforementioned timestamps to do this, as well as some custom UI work, since the Blueprint sliders don’t seem to support non-uniform “tick” spacing out of the box.
  • (high priority) I’m still not enchanted with the layout of this thing. Blueprint puts some limitations on how the slider is structured, but I’d like the copy button to feel…better positioned, somehow. Any and all input welcome here!
1 Like

:tada: This is looking great! Nice work. After playing with it, you’re right that it’s about the branch, so ‘Pub History’ feels a bit odd on the button. Perhaps just ‘History’. Also, I’m really excited about the bundling and added features of marking up the timeline (grouping by day, by person, etc).

Please fix this.

This feature is brilliant. I showed it off on a call yesterday and they were amazed. Never seen anything like it.

This was the only real feedback I have – it would be nice to have some way to show where in the slider lots of changes are (my thought was bubbles of increasing size instead of ticks but whatever). Currently the smoothness is a bit offputting, especially when you’re scrolling through docs that don’t have a lot of changes for a long period of time.

Testing. Please ignore (sorry).

:confetti_ball: