Bug 132007 - Improve the password-protected document unlock prompt dialog's text strings and layout
Summary: Improve the password-protected document unlock prompt dialog's text strings a...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium enhancement
Assignee: Devansh Varshney
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Password-Protected
  Show dependency treegraph
 
Reported: 2020-04-09 16:51 UTC by Jeff Fortin Tam
Modified: 2024-03-25 17:06 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screnshot with https://gerrit.libreoffice.org/c/core/+/163924 PS 9 in place for discussion in the Gerrit change (14.86 KB, image/png)
2024-03-15 14:15 UTC, Michael Weghorn
Details
message box after c#15 (16.49 KB, patch)
2024-03-19 03:03 UTC, Devansh Varshney
Details
without the Password label (112.34 KB, image/png)
2024-03-19 17:23 UTC, Devansh Varshney
Details
with the password label (125.84 KB, image/png)
2024-03-19 17:24 UTC, Devansh Varshney
Details
File created after patchset 15 (104.17 KB, image/png)
2024-03-25 15:59 UTC, Devansh Varshney
Details
Title is Set Password (138.84 KB, image/png)
2024-03-25 17:06 UTC, Devansh Varshney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2020-04-09 16:51:02 UTC
Description:
When you open a password-protected document, you are presented with a simple GtkDialog window that has "Enter password" as the window title and this following layout:

Enter password to open file:
file:///home/bob/path/to/the/file.ods
[ *******************                ]
( Help )             ( Cancel ) ( OK )

The "file:///full_path_blahblah" part bugs me, because it eats 90% of the space and makes it harder to see the actual file name. The path is also irrelevant to me because I _just_ requested to open the file, which either means I tried opening it from my file browser application (and therefore know the path) or that I tried opening it with LibreOffice's file open dialog (ditto) or that I tried opening it from the "Recent Files" quick menu (in which case I clearly don't care about the file's path, since I couldn't even be bothered to use a file manager to dig it up).

So I would suggest that the string becomes:

'The file "%s" is password-protected. Enter the password to open it:'

Where %s is the human-readable file name. It could be without the extension (ex: "TPS report") or with the extension (ex: "<b>TPS report</b>.ods") if you're worried about non-technical users needing to be able to cite the file extension along with the filename.

The "OK" button in that GtkDialog should also be "insensitive" until something has been entered in the password field.

Actual Results:
 

Expected Results:
 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Jean-Baptiste Faure 2020-04-19 14:56:17 UTC
What is your LibreOffice version? In a recent version, at least since LibreOffice 6.0, this dialog can be resized, so that the length of the path does not matter.

Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 2 QA Administrators 2020-10-17 04:20:52 UTC Comment hidden (obsolete)
Comment 3 Jeff Fortin Tam 2020-10-19 12:51:31 UTC
Hi J-B, I'm running version 6.4. Sure the dialog is resizeable, but the user shouldn't have to resize it, that's a pain in the butt (and I can assure you most will not even think of this possibility, judging from the non-technical users I study), it should be easily and quickly readable in the first place.
Comment 4 Heiko Tietze 2021-08-18 08:39:56 UTC
We decided to make dialog non-resizable unless user input requires to resize. And I support the idea. 

Code pointer: STR_ENTER_PASSWORD_TO_OPEN and STR_ENTER_PASSWORD_TO_MODIFY in uui/inc/strings.hrc and uui/uiconfig/ui/password.ui (we have 5 different passwd dialogs!) for the UI. Code is at uui/source/passworddlg.cxx.

It's a generic dialog that might be used somewhere else. => medium difficulty and Thorsten for a second opinion.
Comment 5 Devansh Varshney 2024-02-26 08:49:04 UTC
After tinkering on the code related to this there are few things I wanted to ask/say -

1> The tdf#66553 - add file name to title bar for password managers 
   - has added the file name along with its extension in the Password title box.

2> The link to the file doesn't seem wrong in the case of if this functionality is used by some extension to open a file (in case of remote access) it will help the user to know exactly where the file is located.

This is how currently the password dialog pops-up -

  -|-------------------------------------------------------------------|-
   |                      Enter Password - dev.odt                     |   
   |                                                                   |
   |  The file is password-protected. Enter the password to open it:   |
   |  file:///home/devansh/Documents/dev.odt                           | 
   |                                                                   |
   |   Help                                         Cancel       OK    |
   |                                                                   | 
  -|-------------------------------------------------------------------|-

Is this intuition okay?
Comment 6 Heiko Tietze 2024-02-26 09:38:42 UTC
(In reply to Devansh Varshney from comment #5)
> Is this intuition okay?
Reading c0 again sounds like the way to go. 

(In reply to Jeff Fortin Tam from comment #0)
> 'The file "%s" is password-protected.\nPlease enter the password:'
Actual issue was the potentially lengthy folder structure; sometimes it might be relevant but most often it isn't. We could show the full URI in a tooltip.
Comment 7 Devansh Varshney 2024-02-26 10:43:54 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Devansh Varshney from comment #5)
> > Is this intuition okay?
> Reading c0 again sounds like the way to go. 
> 
> (In reply to Jeff Fortin Tam from comment #0)
> > 'The file "%s" is password-protected.\nPlease enter the password:'
> Actual issue was the potentially lengthy folder structure; sometimes it
> might be relevant but most often it isn't. We could show the full URI in a
> tooltip.

I did made changes and this is currently what we are showing -

https://pasteboard.co/LL2eIt03QDA8.png

I am currently tweaking the OK button disability initially till any text is entered in the box.
Comment 8 Devansh Varshney 2024-02-26 15:27:53 UTC
https://pasteboard.co/YDGqDUqbO5C6.png


Working as expected -

https://youtu.be/BxyGar8kPbg
Comment 9 Jeff Fortin Tam 2024-03-10 01:37:09 UTC
What is demonstrated in the video seems like a nice improvement!

If you want to go the extra mile, as Heiko suggested maybe a tooltip on hover could be attached to label (for the folder path), though I don't know if that's really considered a must-have. Personally I can't think of a case where I would care to know the folder path for a file I just opened.

I guess the next step would be to send a git merge request for this, in any case.
Comment 10 Devansh Varshney 2024-03-13 08:31:55 UTC
(In reply to Jeff Fortin Tam from comment #9)
> What is demonstrated in the video seems like a nice improvement!
> 
> If you want to go the extra mile, as Heiko suggested maybe a tooltip on
> hover could be attached to label (for the folder path), though I don't know
> if that's really considered a must-have. Personally I can't think of a case
> where I would care to know the folder path for a file I just opened.
> 
> I guess the next step would be to send a git merge request for this, in any
> case.

Sorry for the delayed reply as I opened this today.

I did created the PR - https://gerrit.libreoffice.org/c/core/+/163924

I am looking for the option for the tooltip on hover.
Comment 11 Devansh Varshney 2024-03-14 03:30:25 UTC
(In reply to Jeff Fortin Tam from comment #9)
> What is demonstrated in the video seems like a nice improvement!
> 
> If you want to go the extra mile, as Heiko suggested maybe a tooltip on
> hover could be attached to label (for the folder path), though I don't know
> if that's really considered a must-have. Personally I can't think of a case
> where I would care to know the folder path for a file I just opened.
> 
> I guess the next step would be to send a git merge request for this, in any
> case.


added the option of complete file path on hovering the dialog box - https://youtu.be/p1K1U1FNdns
Comment 12 Michael Weghorn 2024-03-15 14:15:06 UTC
Created attachment 193130 [details]
Screnshot with https://gerrit.libreoffice.org/c/core/+/163924 PS 9 in place for discussion in the Gerrit change
Comment 13 Devansh Varshney 2024-03-15 17:42:10 UTC
(In reply to Michael Weghorn from comment #12)
> Created attachment 193130 [details]
> Screnshot with https://gerrit.libreoffice.org/c/core/+/163924 PS 9 in place
> for discussion in the Gerrit change

Have a look at this video https://youtu.be/ugqUnZI7mS0

is this now aligned with what we were looking?
Comment 14 Michael Weghorn 2024-03-18 10:39:00 UTC
(In reply to Devansh Varshney from comment #13)
> (In reply to Michael Weghorn from comment #12)
> > Created attachment 193130 [details]
> > Screnshot with https://gerrit.libreoffice.org/c/core/+/163924 PS 9 in place
> > for discussion in the Gerrit change
> 
> Have a look at this video https://youtu.be/ugqUnZI7mS0
> 
> is this now aligned with what we were looking?

I'll leave deciding what's the wanted design to our UX team.

In my opinion:
* There's extra unused space above and below the label seems unnecessary.
* The placeholder text in the GtkEntry is nice, but I wouldn't drop the prompt "Enter password to open file" (or similar) from above the entry, as it's e.g. otherwise no longer to be seen when starting to type a password (-> might be considered a bit of a lack of context).

FWIW, I personally prefer to see the whole file name at once, but that might be different from what most users would want.
Comment 15 Michael Weghorn 2024-03-18 10:47:55 UTC
(In reply to Michael Weghorn from comment #14)
> FWIW, I personally prefer to see the whole file name at once, but that might
> be different from what most users would want.

"... the whole file *path* at once ..." is what I mean. (Sorry for the confusion.)
Comment 16 Devansh Varshney 2024-03-18 17:06:15 UTC
(In reply to Michael Weghorn from comment #14)
> I'll leave deciding what's the wanted design to our UX team.
> 
> In my opinion:
> * There's extra unused space above and below the label seems unnecessary.
> * The placeholder text in the GtkEntry is nice, but I wouldn't drop the
> prompt "Enter password to open file" (or similar) from above the entry, as
> it's e.g. otherwise no longer to be seen when starting to type a password
> (-> might be considered a bit of a lack of context).
> 
> FWIW, I personally prefer to see the whole file name at once, but that might
> be different from what most users would want.

* I thought to add those space for a better hover if someone wants to look at the complete file path and it also seems a bit spacious.

* I did this as this is how most of the password forms are being used on the apps and web specially. I can revert/change these changes
Comment 17 Devansh Varshney 2024-03-19 03:03:57 UTC
Created attachment 193186 [details]
message box after c#15

This is now the UI for the password dialog is shown after the suggestion from c#15
Comment 18 Heiko Tietze 2024-03-19 08:27:35 UTC
(In reply to Devansh Varshney from comment #17)
> Created attachment 193186 [details]
> message box after c#15
> 
> This is now the UI for the password dialog is shown after the suggestion
> from c#15

Information text on top ending with period, buddy label for the control left of it (it's needed for a11y) ending with a colon. Distance between info label and control 6px between buddy label and control 3px. Margin around the parent frame/grid 12px.

 The file "Untitled 1.odt" is password protected.
 _P_assword: [             ]

I dislike the repetition at dialog title and content and suggest to change it to "Password protection", or the like.

Please test with a ridiculous long file name. But showing this once sounds okay to me.
Comment 19 Devansh Varshney 2024-03-19 17:23:24 UTC
Created attachment 193202 [details]
without the Password label
Comment 20 Devansh Varshney 2024-03-19 17:24:37 UTC
Created attachment 193203 [details]
with the password label
Comment 21 Devansh Varshney 2024-03-19 17:26:49 UTC
I have added two Screenshot with/out Password label.

here is the video for the file opening with a really long name

https://youtu.be/j5vOE3hdu9U
Comment 22 Devansh Varshney 2024-03-20 04:15:22 UTC
https://youtu.be/P_5cQJLRi0I

final clip
Comment 23 Devansh Varshney 2024-03-25 15:59:48 UTC
Created attachment 193297 [details]
File created after patchset 15

I created a file in the morning with the 

File -> Save As -> tick the checkbox to save with password

and it got saved with the password.
Comment 24 Devansh Varshney 2024-03-25 17:06:44 UTC
Created attachment 193298 [details]
Title is Set Password

 devansh   132007_improve_pswd_msg_lckd_dcmnt  instdir/program/soffice --writer
warn:unotools.misc:10880:10880:unotools/source/misc/mediadescriptor.cxx:372: url: 'private:factory/swriter' com.sun.star.ucb.ContentCreationException message: "No Content Provider available for URL: private:factory/swriter at /home/devansh/libreoffice/ucbhelper/source/client/content.cxx:208" eError: (com.sun.star.ucb.ContentCreationError) NO_CONTENT_PROVIDER
warn:legacy.tools:10880:10880:sfx2/source/control/bindings.cxx:1770: No cache for OfficeDispatch!
warn:sal.file:10880:10880:sal/osl/unx/file_misc.cxx:659: Invalid file URL
warn:sal.file:10880:10880:sal/osl/unx/file_misc.cxx:659: Invalid file URL