Bug 143144 - Input list field: Add confirmation dialog in order to prevent loss of data
Summary: Input list field: Add confirmation dialog in order to prevent loss of data
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-01 08:22 UTC by dainius.mazuika
Modified: 2022-08-23 03:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
"Input list" field edit dialog (12.27 KB, image/png)
2021-07-01 08:23 UTC, dainius.mazuika
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dainius.mazuika 2021-07-01 08:22:35 UTC
Description:
I usually forget to click "Add" button when editing "Input list" type of field. Additional check could be implemented in order to warn user about possible loss of text entered into input field.

Also, "ENTER" keypress could be made to act on "Add" button, instead of "OK" button of the dialog.

Steps to Reproduce:
1. Place "Input list" field in the document;
2. Double click on it to open field edit dialog in order to add new items;
3. Pretend you are intending to add only single item (string "YES" as an example), so:
4. Type in string "YES" inside input field (step no 1);
5. Click "Add" button (step no 2);
6. Click "OK" in main dialog (step no 3);

Usually, I forget to click button "Add" (step no 2), and after typing in "YES" (step no 1) I click directly on main "OK" button (step no 3) in the dialog. Whole dialog closes instantly without adding string "YES" to the input list, and without noticing me that I forgot to click on "Add" button. My previously entered string "YES" is lost. I need to reopen this dialog and make everything correctly (frequently - type in long text.. :/ ).

I suggest: Additional checking routine should be executed upon "OK" button press:

```
ON_OK_BUTTON_PRESS_EVENT
{
 if( inputField.Text != empty )
 {
  if( existing_list.does_not_contain( user_entered_text ) )
  {
    showDialog( "Do you want to add item "%s" into the list before closing? YES / NO", user_entered_text );

    if ( user_answer == "YES" )
    {
     AddItemToCurrentList( user_entered_text );
    }
  }
 }
ProceedToClosTheDialogAsUsual();
}
```

Actual Results:
 

Expected Results:
 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 dainius.mazuika 2021-07-01 08:23:25 UTC
Created attachment 173303 [details]
"Input list" field edit dialog
Comment 2 Heiko Tietze 2021-07-02 09:14:59 UTC
But pressing enter at the item field does add it to the list, at least for me. So it's rather a minor issue when you forget to add the last item.
Comment 3 dainius.mazuika 2021-07-02 09:24:56 UTC
You are right indeed (didn't noticed that), pressing ENTER adds current item in the list if input field is in focus, so request about the ENTER key can be dismissed.

But request for additional check on dialog closure is still valid (main purpose of this wishlist request). And yes, this is a minor issue :)
Comment 4 Heiko Tietze 2021-07-08 07:34:15 UTC
In general, input on any field requiring some action before closing the dialog is not checked. It should be relevant for a few cases only, if any, and definitely not critical (we talk about adding a word to a list). Adding a warning in this particular case sounds like over-engineering (field input !empty and <> list entries on okay) and interrupting to me. Plus, it's a bit unusual to add just one word here instead the complete list.

Suggest to resolve WF but since me is the only commenter I'll keep the ticket open.
Comment 5 dainius.mazuika 2021-07-08 08:13:26 UTC
This all depends on user personality...

"we talk about adding a word to a list" - Talking not about single world, but sentence, in my usage case;

"and interrupting to me" - this is the goal, to interrupt user if he forgot to click on "Add" button. What is the reason to type in a sentence and not use it otherwise? There is no user interruption if field is empty or already in the list. There are no additional interruptions in case this check is true: "field is not empty and does not exist in the list";

"it's a bit unusual to add just one word here instead the complete list":  Alternatively I could say "It is unusual to use these kinds of things at all". Only advanced users knows about fields, bookmarks, scripting and other aids office packages can offer to us. In my usage case, I fill up fields incrementally by one item, from time to time (once per month or so). Once I release a new batch of production, I add this batch information to an odt file (specific field) in order to keep tracking parts during hardware assembly (one can easily select "batch#" row from the list when assembling final product).

"Suggest to resolve WF but since me is the only commenter I'll keep the ticket open." - this is a wish list item, what is the problem to leave it open? Maybe someone from community will get here and implement.
Comment 6 Buovjaga 2021-07-19 15:19:06 UTC
(In reply to dainius.mazuika from comment #5)
> "Suggest to resolve WF but since me is the only commenter I'll keep the
> ticket open." - this is a wish list item, what is the problem to leave it
> open? Maybe someone from community will get here and implement.

Because if every wish got implemented, the software would be a horrible Frankenstein's monster.
Comment 7 Dieter 2022-08-23 03:14:47 UTC
No further input since more than a year, so nobody suppoted that idea. I agree with Heiko and Buovjaga, that it's not useful to implement every wish. So let's close it as WF.