Source Mode for Stencila Sheets


#1

With Stencila Sheets we want to help authors spot and fix errors faster. One idea we had is introducing a source mode view, to reveal what’s going on behind the curtain. Consider this simple calculation sheet with errors:

Instead of checking each cell individually, we could head over to source mode.

Implementation ideas:

  • a tool (in the toolbar) that lets you toggle between display and source mode
  • when you move the cursor inside a formula, you see all the dependencies visualized with dashed lines (In excel you need to enter a cell to see that, which is why you often overlook errors)
  • you also see the current value previewed in the status bar on cell selection (this is inverse to revealing the formula in display mode)
  • we use a fixed width font for everything to indicate we are editing the source here

Would you use such a feature? Please add your comments/ideas!


#2

Nice idea, +1 from me! Some ideas and comments:

  • It would be really good to have consistency in concepts and logic between Document cells and Sheet cells. In documents we already have the toolbar toggles for showing/hiding code in all cells (equivalent to a toggle between ‘display’ and ‘source’ mode):

  • Seeing dependencies when you mouse over a cell is a good idea. When you say ‘dashed lines’ I assume you mean coloured coded bounding boxes like Google Sheets and Excel does to indicate direct dependencies - not connecting lines between all upstream dependencies like Excel does to indicate a circular dependency and which could get pretty messy pretty quickly.

  • I don’t think the different font is necessary - I think it would feel “jumpy” - but it should be easy to implement and user test!


#3

+1 for source mode! From my perspective, the toolbar toggle would be a fine way to get there. Highlighting dependencies is key. Speaking as a person who has made excel dependency-based errors, then found an error, then then gone back through a giant sheet looking for other errors - I want the dependencies to be easily highlighted and not hidden away. :thumbsup:


#4

It could generally get jumpy during the switch. E.g. if there may be many formulas that don’t fit into the width of the cell’s output. I would accept that movement rather than trying to optimise space and how overlays which could all get pretty noisy and unusable.


#5

Yes, I agree :thumbsup:


#6

:thumbsup:

One of the things I miss most in the common spreadsheet interface.