Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the pdf-viewer shouldn't allow continuous and single page at the same time #3958

Open
octaeder opened this issue Jan 20, 2025 · 16 comments
Open

Comments

@octaeder
Copy link
Contributor

Describe the feature and the current behavior/state

I want to change txs as follows: The pdf-viewer (embedded or windowed) has actions continuous and single page step. Currently you can activate or inactivate each of them individually. In my opinion, of the four possible combinations, it would be better not to allow the one that has both actions activated.

Explanation: From my experience activating single page step together with continous can be irritating. If single page step is active, the effect of single page step is almost canceled out by activcating continuous mode. What remains is a page offset of 0. But this could be simply done with continuous by a simple mouse click in the left column of the grid. But single page step prevents changing page offset wether continuous is active or not, If you select grid 2x1, you would expect that page offset changes to 1 . But this is not the case. When continuous is active, and you activate single page step, then a noticable change only happens in case a page offset is greater 1 and the first page is visible.

Who will benefit with this feature?

This should be particularly helpful for less experienced users (and sometimes for advanced users 😀).

Any Other info

Both options should be grouped together. In the context menu of the viewer both options are placed together. But in the view menu there is continuous only. You wanted to keep continuous there because it has been there ever since and for quicker access. So I hope I can convince you that it is sensible to remove continuous from the view menu. Besides this, my current build looks like this:

Lower part of View menu:

Image

Context menu:

Image

@octaeder
Copy link
Contributor Author

@sunderme are you waiting for a PR?

@sunderme
Copy link
Member

well, I have no plans to change anything here.

@octaeder
Copy link
Contributor Author

You have read Any Other info? So we keep the duplicate Continuous?

@sunderme
Copy link
Member

is the lower part of the view menu newly changed to this behavior ?

@benibela
Copy link
Member

but the option has a purpose

It is to switch between starting at the first page:

Image

or skipping the first page:

Image

@octaeder
Copy link
Contributor Author

Continuous was in View menu before. Then we talked about having Continuous and Single Page Step together (Grid in View in menu bar and Grid in Context menu). As I understood your answer I should do so. But I've overseen that Grid is used twice -- in View/Grid and in Grid from the Context menu of the pdf. I prepared a fix to remove Continuous from View menu (from menu bar) and keep it in the View/Grid menu. But since I expected that this would happen with my PR #3958 I didn't create a PR.

@octaeder
Copy link
Contributor Author

@benibela

but the option has a purpose
It is to switch between starting at the first page:

This is not necessary. Allow me to cite from above:

If single page step is active, the effect of single page step is almost canceled out by activcating continuous mode. What remains is a page offset of 0. But this could be simply done with continuous by a simple mouse click in the left column of the grid. But single page step prevents changing page offset wether continuous is active or not, If you select grid 2x1, you would expect that page offset changes to 1 . But this is not the case.

@sunderme
Copy link
Member

"by a simple mouse click in the left column of the grid"
This is not a easy to remember operation (it only works in pan mode, not easy to find by accident, I had to look into source code)

@octaeder
Copy link
Contributor Author

octaeder commented Jan 27, 2025

it is in the manual

@octaeder
Copy link
Contributor Author

octaeder commented Jan 27, 2025

I'm still convinced that a less experienced user might forgett that Single Page Step is active. Ever since a switch to grid 2x1 uses a page offset of 1 (I made offset changable with #2364, but starting the viewer with 2x1 will always use offset 1, except for single page step). And it's quite difficult to figure out why the first page doesn't move to the right in this case or when you use the a click in a grid column.

@octaeder
Copy link
Contributor Author

it only works in pan mode

Is this the scroll mode with the hand cursor (depending on the icon set you use)? Indeed I didn't made it available in magnifier mode. One reason was that I wanted to spare shortcuts for future operations.

@octaeder
Copy link
Contributor Author

Using Single Page Offset with Continuous to set page offset to 0 in a grid of size 2x1 is not suitable. Because when you disable Continuous then Single Page Step does what's in the name. So you can't scroll fast with the wheel row by row (which keeps left pages to the left) through your document. But this behavior is one of the advantages of disabling Continuous.

@benibela
Copy link
Member

If single page step is active, the effect of single page step is almost canceled out by activcating continuous mode. What remains is a page offset of 0. But this could be simply done with continuous by a simple mouse click in the left column of the grid. But single page step prevents changing page offset wether continuous is active or not, If you select grid 2x1, you would expect that page offset changes to 1 . But this is not the case.

oh, I did not notice there was a new feature. But that shows the feature is not easy to find

It would be easier to find if the offset option were in the menu, too. At least in the grid/custom dialog

Or the page offset could work with single page step enabled as well. And toggling single page step could toggle the page offset for backwards compatibility

@octaeder
Copy link
Contributor Author

octaeder commented Jan 28, 2025

Single Page Step should use page offset 0. The first page is to the left and you can shift pages horizontaly like images on a strip of (analog 😀) film. But to do so you need to disable Continuous. And to have support of variable page offsets (with or without Continuous) you need to disable Single Page Step. That's why I think both options should be exclusive-optional.

The fact that Continuous and Single Page Step are on different levels of the View menu now prevents us from putting them in one action group. Since sunderme wants Continuous to stay where it is (in View), we would have to move Single Page Step there. I would be fine with it, even so I eplained in an earlier PR (not merged) that these options are strongly related to the grid.

@octaeder
Copy link
Contributor Author

This shows a change of current upstream/master where I moved Continuous to Grid and added missing menu key accelerators:

Image

This would speed up access to specific submenu and actions.

@octaeder
Copy link
Contributor Author

Key points (SPS=Single Page Step, CT=Continuous):

  • SPS and CT are actions related to the grid not to zooming
  • CT needs to be available in context menu of embedded viewer
  • avoid strange interactions of SPS and CT with exclusive-optional action group
  • same context menus for embedded and windowed viewer (simple coding, easy usage)
  • use same Grid sub menu in View menu (menubar) and the context menus (simple coding, easy usage)
  • quick access to Grid and main actions in Grid with menu key accelerators (also works in context menus)
  • context menus look cleaner with SPS and CT in Grid sub menu (especially the context menus)

There are two possible options: SPS and CT on same level as Grid menu action or both in Grid sub menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants