Bug 97551 - add “formula marker” feature like in Quattro Pro
Summary: add “formula marker” feature like in Quattro Pro
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Grigory
URL:
Whiteboard: target:7.6.0 target:24.2.0
Keywords: difficultyInteresting, easyHack, skillCpp, topicUI
Depends on:
Blocks: Calc-UX
  Show dependency treegraph
 
Reported: 2016-02-04 09:13 UTC by Brolin Empey
Modified: 2023-09-14 18:31 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
The same simple test document is open in both Quattro (70.87 KB, image/png)
2016-02-04 09:13 UTC, Brolin Empey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brolin Empey 2016-02-04 09:13:56 UTC
Created attachment 122371 [details]
The same simple test document is open in both Quattro

Version 9 and later of Quattro Pro for Windows (QPW) have a useful and unique “formula marker” feature that draws a blue triangle in the bottom-left corner of a cell that contains a formula.  When pointing over the blue triangle, the formula is shown in a tooltip even if a different cell is selected.  Please add this feature to LibreOffice Calc.
Comment 1 Brolin Empey 2016-02-04 09:28:40 UTC
I prematurely submitted this bug by accidentally pressing Enter instead of Shift whilst writing a description of the attached file.  Now I cannot edit the description of the attached file in the prematurely-submitted bug because I always get the following error page:

“Software error:

DBD::Pg::db do failed: ERROR:  value too long for type character varying(255) [for Statement "UPDATE attachments SET description = ? WHERE attach_id = ?"] at Bugzilla/Object.pm line 385
	Bugzilla::Object::update('Bugzilla::Attachment=HASH(0x30c9ec8)') called at Bugzilla/Attachment.pm line 890
	Bugzilla::Attachment::update('Bugzilla::Attachment=HASH(0x30c9ec8)', '2016-02-04 09:22:15') called at /srv/bugzilla//bugzilla-4.4.6/attachment.cgi line 714
	main::update() called at /srv/bugzilla//bugzilla-4.4.6/attachment.cgi line 103
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.”

The description of the attached file is supposed to be:

“The same simple test document is open in both Quattro Pro and LibreOffice Calc.  The mouse cursor, which is not included in the screen capture, is pointing at the formula marker (blue triangle) in the bottom-left corner of cell C6 in the document in Quattro Pro.”

Please correct the description of the attached file.
Comment 2 Buovjaga 2016-02-10 18:57:30 UTC
I daresay, UX team, would you mind taking a look at this?
Comment 3 Yousuf Philips (jay) (retired) 2016-02-22 19:57:27 UTC
We currently have an indicator to show when a cell has a comment, so having a similar one for when a cell has a calculation isnt unreasonable for those who wish to notice this at a glance. This feature is available also in WPS/Kingsof Office, which puts the green indicator in the top left corner.

LibreOffice does have the option Tools > Options > Calc > View > Display > Value highlighting, that colors numeric and formula values blue and green respectively.

@Eike: Any opinions about this?
Comment 4 Brolin Empey 2018-10-23 18:12:10 UTC
Bump.  Any news?  Apparently we never heard from Eike.  I requested this feature to be added to Google Sheets too:

https://productforums.google.com/forum/#!topic/docs/OueezsrZoBA;context-place=forum/docs
Comment 5 Eike Rathke 2018-10-23 19:54:55 UTC
Shrug, if people find such thing useful and someone implements it..
I'd avoid an additional "blue triangel" or whatever marker though, which would be just distracting (if people want to distinguish formulas and other content there's value highlighting already). Displaying the formula in a tip help when hovering with the mouse on a cell for some decent time is sufficient.
Comment 6 Heiko Tietze 2018-10-24 10:21:44 UTC
Let's go with an option. I'm a bit concerned of all the indicators, font color, highlighting, triangles etc. not having a concept like "type of content is shown as color triangle", "kind of variable is denoted per font color" etc.
Comment 7 Heiko Tietze 2022-02-02 10:49:09 UTC
Hossein, I wonder if this could be an interesting easy hack. The prototype for implementation could be how comments are visualized in ScOutputData::DrawNoteMarks(). I would go with an option (off by default to consider Eike's concerns; actually we have value highlighting for this purpose which OTOH adds a lot of noise by itself) at Tools > Options > Application Colors: Spreadsheet similar to what I did for bug 128258. But open for other ideas.
Comment 8 Brolin Empey 2023-02-11 10:37:55 UTC
Grigory A. Mozhaev <zcrendel@gmail.com>, who I had hired via oDesk over a decade ago to change Mozilla before oDesk became Upwork, has generously added this feature and a preference for this feature to LibreOffice Calc and needs to share his patch, I guess by posting his patch as an attachment to this issue?  I am assuming that Grigory will be notified of this comment because I am assigning this issue to him in the same change as posting this comment so I will let him reply if he has something more to say.  Here is what he said privately to me about this issue approximately two days ago:

I think I've finished its first version and we can now provide a patch to review in bugzilla to someone who's responsible.
I have checked it along with today's git Master's branch (pulled and built today's sources of LibreOffice), it works for me.
I'm not familiar with how to provide it correctly, though.Maybe you can guide me.
I've already created an account in bugzilla that is corresponding to this email address.
Comment 9 Buovjaga 2023-02-11 10:42:18 UTC
(In reply to Brolin Empey from comment #8)
> Grigory A. Mozhaev <zcrendel@gmail.com>, who I had hired via oDesk over a
> decade ago to change Mozilla before oDesk became Upwork, has generously
> added this feature and a preference for this feature to LibreOffice Calc and
> needs to share his patch, I guess by posting his patch as an attachment to
> this issue?  I am assuming that Grigory will be notified of this comment
> because I am assigning this issue to him in the same change as posting this
> comment so I will let him reply if he has something more to say.  Here is
> what he said privately to me about this issue approximately two days ago:
> 
> I think I've finished its first version and we can now provide a patch to
> review in bugzilla to someone who's responsible.
> I have checked it along with today's git Master's branch (pulled and built
> today's sources of LibreOffice), it works for me.
> I'm not familiar with how to provide it correctly, though.Maybe you can
> guide me.
> I've already created an account in bugzilla that is corresponding to this
> email address.

Great news. If the code would be added as a patch here, somebody else would have to go through the trouble of submitting it and thus greatly reduce the chances of it happening. I recommend to

1. Register in Gerrit and set it up "the easy way" https://wiki.documentfoundation.org/Development/gerrit/setup
2. Submit the patch https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch
3. Send license statement https://wiki.documentfoundation.org/Development/GetInvolved#License_statement
4. If the patch needs to be modified per code review, follow https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch#Submitting_a_new_version

I am also available for private guidance.
Comment 10 Heiko Tietze 2023-02-13 10:39:11 UTC
Implemented something similar recently for bug 91415. And the follow-up discussion in bug 153106 proves Eike right in comment 5. But personally I'm not against such an option.
Comment 11 ady 2023-02-13 11:53:46 UTC
(In reply to Heiko Tietze from comment #10)
> Implemented something similar recently for bug 91415. And the follow-up
> discussion in bug 153106 proves Eike right in comment 5. But personally I'm
> not against such an option.

FWIW, if there is an option (off by default) to "show cell's content (as in formula bar) on tool tip when mouse hovers over cell for X time", that depends on users' preferences, and it should/shall/must not require more resources or trigger any difficulties for users that leave the option off. That's in contrast to bug 91415 and the follow up discussion in bug 153106, in which users would have no choice, no alternative.
Comment 12 ady 2023-02-13 12:05:21 UTC
(In reply to ady from comment #11)
> FWIW, if there is an option (off by default) to "show cell's content (as in
> formula bar) on tool tip when mouse hovers over cell for X time", 

... or whatever other marker or method you would add, whether on permanent basis or by hovering on cell, as long as it is a user's decision (whether it is not interfering with other things, with workflow, or demanding additional graphic resources)...
Comment 13 Grigory 2023-02-27 13:27:55 UTC
(In reply to Buovjaga from comment #9)
> (In reply to Brolin Empey from comment #8)

Thank you Brolin for introduction and assigning me to this feature request.
 
Thank you Buovjaga for these links they were very helpful. I have submitted a patch using gerrit. So lets wait for its review.

Thank you everyone for this discussion. I took into consideration your thoughts reading it. For now I've added a feature as a single setting (turned off by default while it is experimental): to switch both showing a hint and drawing a triangle. I assume this way it won't interfere with an existing UX.
Comment 14 Buovjaga 2023-02-27 14:07:40 UTC
(In reply to Grigory from comment #13)
> (In reply to Buovjaga from comment #9)
> > (In reply to Brolin Empey from comment #8)
> 
> Thank you Brolin for introduction and assigning me to this feature request.
>  
> Thank you Buovjaga for these links they were very helpful. I have submitted
> a patch using gerrit. So lets wait for its review.
> 
> Thank you everyone for this discussion. I took into consideration your
> thoughts reading it. For now I've added a feature as a single setting
> (turned off by default while it is experimental): to switch both showing a
> hint and drawing a triangle. I assume this way it won't interfere with an
> existing UX.

Patch for reference: https://gerrit.libreoffice.org/c/core/+/147914
Comment 15 Commit Notification 2023-03-08 10:52:24 UTC
Grigory A. Mozhaev committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3fcf9f864f9d12fdb0ade4741127c81cec74378a

tdf#97551 Added marker and hint for formula to Calc

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2023-03-17 16:27:32 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2327015285ef31430d8b6a1c18b45d3da1890306

Related tdf#97551 - Fixes XHierarchicalNameAccess warning

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2023-09-14 18:31:46 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/83cb5551ff5ce81e38396856c0c0595536815d9b

tdf#97551 Help for cell formula indicator and hint