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

Don't prompt to save when no changes have been made #786

Open
K4LCIFER opened this issue Dec 19, 2022 · 4 comments
Open

Don't prompt to save when no changes have been made #786

K4LCIFER opened this issue Dec 19, 2022 · 4 comments
Labels
UX UI/UX (User Interface / User Experience)

Comments

@K4LCIFER
Copy link

Describe the bug

With a PDF open in PDF Arranger, even if you don't make any changes, you are prompted to save on close

To Reproduce

Steps to reproduce the behavior:

  1. Open a pdf
  2. click exit
  3. observe that a save prompt appears

Expected behavior

I expect that if I open a PDF document, and I dont make any changes, I should be able to immediately close it without having to save anything. Sometimes I just want to open PDFs to make a export of a selection, and not create an overall project with the PDF..

System and Versions

  • PDF Arranger version and where you get it (distro package, flatpak, pip, git, download, ...) 1.9.2 (flatpak)
  • pikepdf version and where you get it (distro package, pip, git, ...) 6.2.6 (came with the program)
  • OS name and version (e.g.: Windows 10, Fedora 33, ...) Arch Linux (Gnome 43.2 wayland)
@kbengs
Copy link
Member

kbengs commented Dec 30, 2022

As I see it the idea has been that you start with an empty "workspace" and then import pages to it. So as soon as you add a document the document/workspace is "unsaved", and then it will ask if you want to save changes when closing.
Now that we have a "Open" button this is more confusing..

Here are som ideas what we could do.

Idea 1: (make "Open" behave more like it does in texteditors)

  • Allow to open only one pdf with the "Open" action
  • "Open" action set self.export_file and set the filename in titlebar
  • "Open" action do not set the "unsaved" flag
  • Now if user press "Save" there would be a dialog warning about "forms and outlines are lost on saving" and maybe something more too. This would have a "Don't show this warning again" checkbutton. And it would have buttons for "Overwrite" and "Save as"
  • All other methods of adding documents would be treated as imports and would set document "unsaved".

So in a new pdfarranger instance if you drag in a document and do no changes you would still be prompted to save on close.
If you open the document with "Open" and do no changes you would not be prompted to save on cĺose.

Idea 2:
Another idea would be to not set it unsaved when the instance is "clean" and exactly one full pdf is added, regardless of how the pdf is added. Maybe rename "Open" to "Import in new window" or something.

Idea 3:
A third idea would be to continue as before. Maybe rename "Open" to "Import in new window".

What do you think?

@dreua
Copy link
Member

dreua commented Dec 30, 2022

Could we use/modify the undo manager to check whether there is exactly one import in the history? Don't we already have a star or something indicating whether a file has been changed? (I really should test / look at the code before commenting on my phone, sorry.)

Maybe rename "Open" to "Import in new window" or something.

Sounds like a correct way to name it, but for UX its too complicated IMO.

@dreua dreua added the UX UI/UX (User Interface / User Experience) label Dec 30, 2022
@jeromerobert
Copy link
Member

I vote for Idea 2.

"Import in new window" is the right name and is fine as tooltip in the toolbar but, indeed, may be it would too large in the hamburger menu.

kbengs added a commit to kbengs/pdfarranger that referenced this issue Jan 14, 2023
kbengs added a commit to kbengs/pdfarranger that referenced this issue Jan 14, 2023
jeromerobert pushed a commit that referenced this issue Jan 14, 2023
@ppareit
Copy link

ppareit commented Jan 28, 2023

Related to this is the behaviour of the two buttons Save and Save as. The save also asks the filename. In fact, the Save behaves as the Save as unless a document has been saved at least once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX UI/UX (User Interface / User Experience)
Projects
None yet
Development

No branches or pull requests

5 participants