Bug 160580 - Provide config option for "Wraparound" of next/previous sheet shortcut in Calc
Summary: Provide config option for "Wraparound" of next/previous sheet shortcut in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.1.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UNO-Command-New Sheet-Tabs-Bar
  Show dependency treegraph
 
Reported: 2024-04-08 02:55 UTC by alex
Modified: 2024-04-19 09:26 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 alex 2024-04-08 02:55:46 UTC
Description:
I’m a long-time Calc fan and user, and in a relatively recent update I’ve noticed that the CTRL-PGUP/CTRL-PGDN shortcuts for switching sheets behave differently.

Previously (as recently as 7.6.4.1), once on the very first or last sheet of a workbook, using the shortcut CTRL-PGUP or CTRL-PGDN would stop.
This behaviour was:
* Consistent the GUI buttons for “Scroll to next/previous sheet”, which do nothing once you are at the “end” of the strip.
* A convenient and long standing way to return to the start/end by holding the keyboard shortcut - essentially a shortcut to “Scroll to last/first sheet”.

In a recent update, this keyboard shortcut now “wraps around”, so that the selected sheet infinitely returns from the start to the other end.
This is inconsistent with the GUI, and breaks prior behaviour for no reason.

Is there any setting to revert this, or is it simply a bug that needs fixing?

Steps to Reproduce:
1. Create a Calc workbook with multiple sheets
2. Use the CTRL-PGDN (To next sheet) shortcut repeatedly to move to the last sheet of the workbook
3. Once on the last sheet, press CTRL-PGDN again

Actual Results:
The first sheet of the the workbook is selected, unlike if you attempt to click the gui button for "Scroll to next sheet".

Expected Results:
The "To next sheet" shortcut should not move focus if there is no next sheet to move to.
The same applies to "To previous sheet"


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-NZ (en_NZ.UTF-8); UI: en-US
Calc: threaded
Comment 1 alex 2024-04-08 06:28:15 UTC
I had replies over on ask/ pointing out that this was a newly added feature per https://bugs.documentfoundation.org/show_bug.cgi?id=156311.

As such, clearly it's a desired behaviour for some: is it possible to provide a configuration option to disable this - or perhaps rebind the keyboard customisation to a slightly different option?
Comment 2 ady 2024-04-08 15:08:06 UTC
While I agree with the request to have a keyboard shortcut(s) to go to the first/last worksheet(s), there are several problems with the request, unfortunately.

The first problem to bind a keyboard shortcut to "navigate/go to first worksheet" (and another shortcut for the last worksheet) is that the function is not defined/listed in the Customize list.

I am not sure, but I believe a new UNO command would be needed?


The "second" problem related to this request is that the arrows that should allow to navigate to first/prior/next/last worksheets are not working.

STR:
1. New Calc.
2. Add 3 (empty) worksheets.
3. Try to use the arrow "icons" to navigate to first/prior/next/last worksheets by clicking on any of them.

 > the arrows are all grayed out. AFAIR, these never worked.

There is probably some bug report about this other issue. While this "second" issue is about mouse interaction instead of using the keyboard, these are probably related/connected in some area.

Since this request is a consequence of tdf#156311, I am CC'ing Denis Sorotnik and Heiko.
Comment 3 alex 2024-04-08 18:30:01 UTC
To clarify, I am not suggesting a new shortcut to go to the first/last sheet - just that the former behaviour of the next/previous shortcuts be made available in some way.
The change made in 24.2 alters long standing things that work:just hold down CTRL-PGDN and you end up at the last sheet. If you really need to get there fast, move to the mouse button. Both options give a certain outcome, while the new reaction of the shortcut is to create uncertainty about which sheet will be active. 

I don't understand any of the architecture, but the buttons in the GUI retain this behaviour, and it existed prior to 24.2, so it's hard to imagine it needs something totally new built.

Regarding exposing something new in the customise list, perhaps a separate entry for "next sheet - wrap at last" might be comprehensible to users?
Comment 4 ady 2024-04-08 20:23:24 UTC
(In reply to alex from comment #3)
> To clarify, I am not suggesting a new shortcut to go to the first/last sheet
> - just that the former behaviour of the next/previous shortcuts be made
> available in some way.

The request is clear. It would be some advance experimental setting, buried within some not-so-obvious dialogue.

OTOH, since there are no shortcuts available for "go to first/last worksheets", having the possibility to assign a shortcut would be less "advance/experimental".

I was just taking part of your comment 0 and suggesting a possible alternative way to solve the UX problem.

> 
> the buttons in the GUI
> retain this behaviour, and it existed prior to 24.2, so it's hard to imagine
> it needs something totally new built.

For some users, the arrow UI icons to go to first/prior/next/last worksheet are always grayed out, not clickable. You can click on a specific worksheet tab, but not on the arrows. This is a separate bug report, but somewhat related to this request.

> 
> Regarding exposing something new in the customise list, perhaps a separate
> entry for "next sheet - wrap at last" might be comprehensible to users?

The functions I mentioned in my comment 2 would be "to first (work)sheet" and "to last (work)sheet". These do not exist, AFAIK. Whether these would deserve to be added, or to provide whichever alternative to this request, it is for the UX Team and other devs to evaluate.
Comment 5 alex 2024-04-08 20:42:12 UTC
(In reply to ady from comment #4)
> (In reply to alex from comment #3)
> > To clarify, I am not suggesting a new shortcut to go to the first/last sheet
> > - just that the former behaviour of the next/previous shortcuts be made
> > available in some way.
> 
> The request is clear. It would be some advance experimental setting, buried
> within some not-so-obvious dialogue.
> 
> OTOH, since there are no shortcuts available for "go to first/last
> worksheets", having the possibility to assign a shortcut would be less
> "advance/experimental".
> 
> I was just taking part of your comment 0 and suggesting a possible
> alternative way to solve the UX problem.
> 
> > 
> > the buttons in the GUI
> > retain this behaviour, and it existed prior to 24.2, so it's hard to imagine
> > it needs something totally new built.
> 
> For some users, the arrow UI icons to go to first/prior/next/last worksheet
> are always grayed out, not clickable. You can click on a specific worksheet
> tab, but not on the arrows. This is a separate bug report, but somewhat
> related to this request.
> 
> > 
> > Regarding exposing something new in the customise list, perhaps a separate
> > entry for "next sheet - wrap at last" might be comprehensible to users?
> 
> The functions I mentioned in my comment 2 would be "to first (work)sheet"
> and "to last (work)sheet". These do not exist, AFAIK. Whether these would
> deserve to be added, or to provide whichever alternative to this request, it
> is for the UX Team and other devs to evaluate.

Thanks for the extra info - I realise we're mostly agreeing and hope some improvement can come from the discussion!
Comment 6 Heiko Tietze 2024-04-09 15:00:47 UTC
My take: introduce UNO commands for first/last sheet and keep the patch unconditional.
Comment 7 ady 2024-04-09 17:47:03 UTC
(In reply to ady from comment #2)
>  > the arrows are all grayed out. AFAIR, these never worked.

That is tdf#156328.



(In reply to ady from comment #2)
> I am not sure, but I believe a new UNO command would be needed?
> 

(In reply to Heiko Tietze from comment #6)
> My take: introduce UNO commands for first/last sheet and keep the patch
> unconditional.


@Denis, since you very recently solved tdf#156311 that triggered this tdf#160580, maybe you could take a look at this.