Bug 132065 - Ease formula editing using multiline-block editing
Summary: Ease formula editing using multiline-block editing
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Function-Wizard
  Show dependency treegraph
 
Reported: 2020-04-12 13:14 UTC by jan d
Modified: 2021-03-01 11:47 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jan d 2020-04-12 13:14:39 UTC
Nested Formulas are hard to read and hard to edit as all content is on one line. This can lead to errors in the formulas or worse, unnoticed wrong calculations. 

One way to ease to editing would be implementing a view/edit mode which is compatible with the current behavior but makes understanding and editing easier. This could use a block-like visualization as known from tools like scratch. 

This approach has been suggested and evaluated by Jansen/Hermans in "XLBlocks: a Block-based Formula Editor for Spreadsheet Formulas", https://www.researchgate.net/publication/336187404_XLBlocks_a_Block-based_Formula_Editor_for_Spreadsheet_Formulas

Notes: 
- We have a "Structure" view, but this does only cover the nesting of the function calls as far as I am concerned and has no editing capabilities.
- A good place for this might be the sidebar
- A library for block based programming would be blockly, which is implemented in javascript. It uses SVG for diagrams and interactions (but there are many other implementations for block languages)
Comment 1 V Stuart Foote 2020-08-23 15:35:02 UTC
UX wise would love to see this make it into the Sidebar as a new Calc deck. Especially as it seems it would take similar work to implement in the Formula Bar edit shell.

But not sure this should be resident in core. Perhaps a distributed extension like the NLP Problem Solver?
Comment 2 Heiko Tietze 2020-09-07 07:39:32 UTC
While it looks quite fancy I'm not so sure if this graphical presentation is easier to read than out wizard (the authors claim advantage over the pure formula, IIUC). And the blocks likely requires more space, in particular with localization.
I'm not thrilled.
Comment 3 jan d 2020-09-07 17:09:24 UTC
> I'm not so sure if this graphical presentation is easier 
> to read than out wizard

You mean the "structure"-tab on the wizard? It provides a lisp-like function tree  structure-rendering of the formula. I assume this is really hard to read for most people.
Comment 4 jan d 2020-09-07 17:24:31 UTC
Added a related issue for a UI-change-free improvement at 136558