Armchair PM: Medium’s Unhighlight Bug

Ed Weng
3 min readDec 21, 2015

--

One Medium feature that I love is the ability to highlight interesting passages. If you’re not familiar with the functionality, it works like this: A user can select text with their cursor and check the highlighter icon to save it to “my highlights.” If a user experiences highlight remorse, she can simply revisit the highlighted text and uncheck the same highlighter icon.

The “my highlights” section of my profile page

I recently discovered a bug with the highlight functionality! If a user has highlighted a post’s text, but the text is later modified by the author, the user will no longer be able to see his highlight and hence won’t be able to unhighlight the text. Despite this, the old highlighted text is still shown in the “my highlights” section. I suspect that Medium is using exact text matching to show previous highlights on a post.

The highlighted blog post, wording slightly changed, but now with no highlight!

There’s two options to handle this bug:

  • Solution #1: Attempt to intelligently update the highlighted text to be consistent with the corresponding “new” text. For instance, if you highlight a full paragraph and the paragraph is only partially changed, then update the highlight to reflect the updated paragraph and display a notification in the margin (perhaps with a link to the original highlight).
Photoshopped mock of “smart highlighting”
  • Solution #2: Keep the text in “my highlights” the same as it was “at the time of highlight.” On the blog post, show no highlighted text, but allow users to unhighlight text from the “my highlights” page.
Photoshopped mock of the “my highlights” menu

Solution #1 is the better solution, albeit harder to engineer. This would fix the bug of not being able to unhighlight text and preserve the ability to see the original highlighted text. It’s unclear what the best algorithm would be to match the old highlighted text to the new text. Perhaps the Myers’s diff algorithm (what powers git diff) would help here.

Solution #2 would require less engineering work and is probably the lesser solution. However, it would still manage to fix the unhighlighting bug. UX-wise, it feels a little strange that the highlights a user makes can disappear from a blog post without any notification.

I’ve notified the Medium team about the bug, so we’ll see shortly if the team agrees with my solution!

--

--

Ed Weng

keeping things 100 at @hypelab. formerly @goldmansachs, @livingsocial, @google. http://www.edweng.com