Bug 162287 - Cycle references everywhere
Summary: Cycle references everywhere
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Ahmed Hamed
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Reference
  Show dependency treegraph
 
Reported: 2024-07-31 20:46 UTC by Ahmed Hamed
Modified: 2024-08-28 08:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast range picker (340.13 KB, image/gif)
2024-08-02 07:58 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmed Hamed 2024-07-31 20:46:28 UTC
Description:
I do not know the exact scope of this report/RFE, but since the questions seem open, I'd like to mention that typical keyboard shortcuts are not available when using the Function Wizard nor the Functions Deck sidebar.

Examples:

A. F4 (cycle between absolute/relative references)
B. [CTRL]+([SHIFT])+... (e.g. [HOME], [END]...); [PgDn]; [PgUp]...
C. arrow keys
D. the [ENTER] key should have "smarter" default actions in each particular case.

What specific shortcuts you wish to see here or would be most useful ?

Actual Results:
---

Expected Results:
---


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 342670dc6b0fc5b93a40b9cf86b8cca67fac88a3
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Ahmed Hamed 2024-07-31 21:04:45 UTC
I copied ady's comment from bug 161542 comment 1.
I forgot to remove the context :)
Comment 2 ady 2024-07-31 22:17:10 UTC
(In reply to Ahmed Hamed from comment #0)
> Description:
> I do not know the exact scope of this report/RFE, but since the questions
> seem open, I'd like to mention that typical keyboard shortcuts are not
> available when using the Function Wizard nor the Functions Deck sidebar.
> 
> Examples:
> 
> A. F4 (cycle between absolute/relative references)
> B. [CTRL]+([SHIFT])+... (e.g. [HOME], [END]...); [PgDn]; [PgUp]...
> C. arrow keys
> D. the [ENTER] key should have "smarter" default actions in each particular
> case.
> 
> What specific shortcuts you wish to see here or would be most useful ?

How about starting by those listed as examples?


For those that don't have enough experience with Calc (and spreadsheets in general)...

When building a formula by typing-in in the formula bar input box, you can use the F4 key in order to cycle between absolute and relative the cell/range references.

But when using the Function Wizard, F4 has no effect, so changing from relative to absolute references (and cycling between the 8 possible combinations) is only possible by manually adding the "$" symbol precisely where it is desired.

Note that, depending on the specific function, the FW will automatically modify the type of reference (and that's fine). Sometimes this is exactly what the use-case needs, but sometimes it isn't, so the user needs to modify the absolute/relative combination.

The alternative is to first introduce the formula with the FW, and then manually edit it in order to use the F4 key.

The F4 key should work in the FW, whether the FW dialog is seen on screen, or when it is shrunk. ATM, it is not available in either case. The behavior should be the same as its behavior when introducing a formula by typing-in in the formula bar input box.

And talking about the FW dialog being shrunk, the goal of that status is for the user to be able to select an area (or similar) in order for such selection to be automatically introduced into the relevant (argument) field of the FW, so when the dialog is shown again ("un-shrinking" it), the aforementioned selection would be in used in the relevant field. But...

...The FW does not support the use of typical selection keyboard shortcuts (see example "B" above). This means that, in the FW, the arguments have to be either manually typed-in, or the selection is quite inefficient (e.g. by mouse), instead of being able to use for example [CTRL]+[SHIFT]+[END] and other typical keyboard shortcuts).

There are many more examples of features in the FW (that have been available and more efficiently used in other spreadsheet tools since decades ago). The more experience a user has with building formulas, the lack of keyboard shortcuts (and other inefficiencies) are more notable in Calc.
Comment 3 Heiko Tietze 2024-08-01 07:17:05 UTC
I suggest to focus on cycle reference and change the summary accordingly.

MSO cycles in any UI, formular bar, range selector, function wizard etc., but not when the focus is in the sheet (probably to avoid accidental modifications). We cycle only in this case and in the formula bar.

In case of a formula with more than one references like =A1+B1, MSO cycles the selection or the reference where the cursor is. We do the same, but assume a full selection when starting from the sheet.
Comment 4 Andreas Heinisch 2024-08-01 07:29:13 UTC
You may check the function FindEndPosR1C1 to find where the actual cycle will be done.
Comment 6 ady 2024-08-01 08:09:02 UTC Comment hidden (off-topic)
Comment 7 Heiko Tietze 2024-08-01 08:17:10 UTC Comment hidden (off-topic)
Comment 8 ady 2024-08-01 08:57:49 UTC Comment hidden (off-topic)
Comment 9 Heiko Tietze 2024-08-02 07:58:40 UTC Comment hidden (off-topic)
Comment 10 ady 2024-08-02 08:50:08 UTC Comment hidden (off-topic)
Comment 11 ady 2024-08-02 09:00:05 UTC
(In reply to Heiko Tietze from comment #9)
> Do you expect sheet interactions when the focus is on the range
> picker?

Although I answered that question in comment 10 regarding the navigation and selection shortcuts, let me add that the F4 key should work on the argument field, whether the FW dialog is seen, or shrunk. To be clear JIC, on MS Windows the F4 "cycle" key doesn't not work / is not available ATM.
Comment 12 Heiko Tietze 2024-08-02 09:04:55 UTC Comment hidden (off-topic)
Comment 13 ady 2024-08-02 09:26:17 UTC Comment hidden (off-topic)
Comment 14 Ahmed Hamed 2024-08-18 16:12:00 UTC
Is the shortcut desired in the parameters entries, the formula section, or both?
In addition, I would like some assistance on how to link a keyEvent to a ParaWin or a weld_text_view.
Comment 15 ady 2024-08-18 23:12:20 UTC
(In reply to Ahmed Hamed from comment #14)
> Is the shortcut desired in the parameters entries, the formula section, or
> both?

In every situation in which a reference can be either introduced or edited, the F4 shortcut key should rather be available.

Examples:
* in each field of the Function Wizard (whether the wizard dialog is fully seen on screen or when it is shrunk in order to make the selection of a range easier)

* In the FW, within the "Formula" big field that shows the "live" result of the formula (at the bottom area of the FW dialog), because this field is also editable

* Manage Conditional Format dialog range
* Conditional Format (we have several alternative dialogs now)
* Data Validity (e.g. "Cell Range" and "Custom" types of Criteria)
* Manage Names
* ...

ATM, it is only available in the formula bar input window box, when manually introducing or editing a formula.

I have not checked whether the F4 key is reserved (for other purposes) under some specific condition within Calc (other than the formula bar input window box). IOW, I have not checked any potential keyboard shortcut conflict.
Comment 16 Ahmed Hamed 2024-08-28 01:52:36 UTC
I'm a bit stuck and could use some assistance.
I want to ensure that the F4 shortcut works everywhere, and I believe this might involve implementing it within a shell like ScEditShell, which handles cycling references in the formula bar's input window. I tried finding a shell that responds to key presses so I could add the reference toggle there, but I couldn't find one. I don't think creating a new shell is needed of course, so what would be the best approach to achieve this?
Comment 17 Heiko Tietze 2024-08-28 08:36:27 UTC
Best way to get a tip for implementation is to ask on IRC https://web.libera.chat/?chan=#libreoffice-dev