Bug 146612 - UI Warning dialog when pressing Apply in Hyperlink dialog - New Document tab
Summary: UI Warning dialog when pressing Apply in Hyperlink dialog - New Document tab
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Gabor Kelemen (allotropia)
Whiteboard: target:7.4.0
Depends on:
Blocks: Hyperlink-Dialog
  Show dependency treegraph
Reported: 2022-01-06 12:29 UTC by Gabor Kelemen (allotropia)
Modified: 2022-01-19 09:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

The warning after pressing Apply on an empty New Document tab (122.11 KB, image/png)
2022-01-06 12:29 UTC, Gabor Kelemen (allotropia)

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-01-06 12:29:40 UTC
Created attachment 177345 [details]
The warning after pressing Apply on an empty New Document tab

This is a followup to bug 109390

When you open the Hyperlink dialog, go to the New Document tab and press Apply without doing anything, a popup warns "Please type in a valid file name." 
The fix to bug 109390 removed this on pressing the OK button, so the behavior of OK is now consistent with other tabs OK button.

On this tab one is supposed to specify a file name in the File dropdown by either typing it in or choosing one with the "Document" icon button on the right. This file name will be the target of the new hyperlink.

On other tabs there is no similar warning when pressing Apply or OK and the link target is not provided: just nothing happens on pressing Apply and on OK the dialog closes.

So the questions are:
- is this warning necessary, given there is no similar warning popping up on other tabs?
- if necessary, should this also be displayed when pressing OK (for consistency on the same tab)?
Comment 1 Heiko Tietze 2022-01-10 10:51:31 UTC
Apply behaves like Okay but keeps the dialog open. If a warning would be needed it was required for both. But Apply "nothing" does nothing - likewise all other options and like pressing Okay. So removing the message seems to be acceptable.

Any text in the input field (including ",?,%) is accepted as valid file name and creates a new file (at least on Linux). Not sure this is safe (and makes the error message pointless).

But it's a bit weird anyway to press Okay and nothing happens (applies to all options/tabs). The best solution is to block Okay in case of inappropriate or missing user input. The control should give feedback and ideally show some explanation in a tooltip. But in case of the overly complex hyperlink dialog this would be an overkill. 

Me does not see the need to create a "New Document" in addition to (existing) "Document" in a dialog to insert a hyperlink. It might be handy in one of a million workflows but has always detrimental effect on usability.
Comment 2 Gabor Kelemen (allotropia) 2022-01-14 20:07:50 UTC
Proposed patch to drop that confirmation: https://gerrit.libreoffice.org/c/core/+/128424
Comment 3 Commit Notification 2022-01-18 22:22:12 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":


tdf#146612 Drop confirmation question when applying new doc hyperlink

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.