Bug 124443 - AutoInput tooltip positioning is inconsistent when editing formula, covering different parts of UI
Summary: AutoInput tooltip positioning is inconsistent when editing formula, covering ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Ayhan Yalçınsoy
URL:
Whiteboard: target:7.0.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks: Tooltip
  Show dependency treegraph
 
Reported: 2019-03-30 08:28 UTC by Mike Kaganski
Modified: 2020-03-05 08:52 UTC (History)
3 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 Mike Kaganski 2019-03-30 08:28:45 UTC
In Calc, with Tools->AutoInput enabled, entering a formula (both in Formula Bar, and directly in cell) shows tooltips for suggested functions/named ranges/arguments; and the problem is that the tooltip jumps up and down depending on if the tooltip is about suggested names or about function arguments.

1. Start entering a formula:
"=S"
=> you will see the tooltip *above* the entered text, which suggests you available functions, e.g. SEARCH, SEARCHB, etc.
2. Continue the input, and have a parenthesis open:
"=SUM("
=> the tooltip jumps *below* the entered text, showing you the function's arguments: "SUM(>Number 1; Number 2; ...): ..."

The problem is that when doing that in Formula Bar, when the tooltip is *below* the bar, it covers the column letters (see https://ask.libreoffice.org/en/question/136998). If the tooltip placement was consistently above, then it would only cover toolbar buttons, which is supposedly irrelevant for the formula entry case.

Tested with Version: 6.2.2.2 (x64)
Build ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL
Comment 1 Roman Kuznetsov 2019-03-30 22:52:45 UTC
confirm in

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 5cb2db6dd7d234a610a6501668a9901af8472b7f
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-26_23:06:31
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 2 aSystemOverload 2019-06-04 21:13:43 UTC
Still an issue in:
Version: 6.2.4.2.0+  Build ID: 6.2.4-1
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded

Waiting for 6.3 version in Arch Repositories.
Comment 3 Mike Kaganski 2019-07-18 06:10:30 UTC
Code pointer:

ScInputHandler (sc/source/ui/inc/inputhdl.hxx) has relevant ShowTip/HideTip and ShowTipBelow/HideTipBelow (implemented in sc/source/ui/app/inputhdl.cxx). They display the tip respectively above/below the edited line. It seems that the "Below" tip may be displayed *in addition* to the normal one, as a secondary tooltip.

So the question is, if it's really implemented in some case to show two tooltips simultaneously; if not, then simply drop the "*Below" methods and replace their usage with normal variants.
Comment 4 Eike Rathke 2020-02-13 21:52:42 UTC
It makes very much sense to display the arguments' tooltip below when editing cells in the first two rows, where a tooltip above would hide the column headers. Also, usually formulas are edited more frequently below a column of data than above, so again displaying the tooltip below does not hide the data. Editing a formula in the Input Line IMHO is less common.

To change this it should rather be detected whether editing happens in the Formula Bar's Input Line and only then display the arguments' tooltip above.
Comment 5 Eike Rathke 2020-02-14 18:50:13 UTC
Assigning to who was actually working on this.
Comment 6 Commit Notification 2020-02-14 21:59:24 UTC
ayhanyalcinsoy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8705ca0c8a8f87fc4880922064f1f84cac1ea42c

tdf#124443: show arguments' tooltip above if in Formula Bar's Input Line

It will be available in 7.0.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.