Bug 154186 - Change "OK" to "Apply" in the "Edit Index Entry" dialog
Summary: Change "OK" to "Apply" in the "Edit Index Entry" dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: sdc.blanco
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2023-03-14 13:55 UTC by sdc.blanco
Modified: 2023-06-26 00:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
problematic document (18.37 KB, application/vnd.oasis.opendocument.text)
2023-03-14 15:28 UTC, sdc.blanco
Details
another document where OK does not work (13.34 KB, application/vnd.oasis.opendocument.text)
2023-03-15 08:07 UTC, sdc.blanco
Details
Screenshot of Edit Index Entry dialog (10.58 KB, image/png)
2023-03-15 16:39 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2023-03-14 13:55:42 UTC
Insert index entry, then right-click on entry and choose "Index Entry" to edit.

Actual: lower right corner of dialog has an "OK" button.

It does not seem to do anything, and may not be needed (because there is a "Close" button).

If it has no function, then maybe it should not be shown.
Comment 1 Xisco Faulí 2023-03-14 14:33:31 UTC Comment hidden (no-value)
Comment 2 sdc.blanco 2023-03-14 15:28:30 UTC Comment hidden (no-value)
Comment 3 sdc.blanco 2023-03-15 08:07:26 UTC Comment hidden (no-value)
Comment 4 sdc.blanco 2023-03-15 16:38:15 UTC
@Xisco, insert at least two index entries, then Edit one of them and try the OK button. (this critical information was not in the OP)

@UXEval:  For Edit Index Entry dialog (screenshot in next comment)

Propose:

A. "Ok" -> "Apply" 

Reasons:

1.  "Ok" is often used in LO to close a dialog box, but does not in this case, unless there is a single index entry.
2.  "Apply" is often used in LO to apply changes, without closing the dialog, which is what happens (except for the single entry case).
3. OP and comments 2 and 3 demonstrate that I totally misunderstood how to use  the dialog, but probably would not have had trouble if "Ok" was labeled "Apply"

B.  Change position of buttons to:

[Help]   [Delete] [Apply] [Close]


Reasons:

1.  "Close" position would correspond to the usual place for closing a dialog.
2.  (afaict) The only time that "OK/"Apply" is ever needed is when one wants to close a dialog that has just gotten a change but has not switched to another entry, so the sequence is felicitous.

C.  Add a tooltip to "Close" , something like:

       "Closes dialog without saving non-applied changes"


More ambitious proposal (in terms of work involved):

1. Replace "OK"/"Apply" with "Reset"  (which would reset the current entry), and
2. Make "Close" also save a current (modified) entry.
Comment 5 sdc.blanco 2023-03-15 16:39:01 UTC
Created attachment 185982 [details]
Screenshot of Edit Index Entry dialog
Comment 6 Heiko Tietze 2023-03-16 08:23:39 UTC
(In reply to sdc.blanco from comment #4)
> A. "Ok" -> "Apply" 

Makes sense (and should be a guideline).
Comment 7 Roman Kuznetsov 2023-03-20 20:16:47 UTC
Set to NEW by Comment 6 (and change it to enhancement)
Comment 8 sdc.blanco 2023-04-30 23:49:52 UTC
https://gerrit.libreoffice.org/c/core/+/151195
Comment 9 Heiko Tietze 2023-05-03 14:21:53 UTC
(In reply to sdc.blanco from comment #8)
> https://gerrit.libreoffice.org/c/core/+/151195

The sequence of confirmative (Ok, Apply) and destructive (Close, Cancel) buttons differs between Windows and (most/all?) Linux variants vs. macOS. We have a function that shuffles the buttons into the right order, IIRC. Do I, Caolan?
Comment 10 Caolán McNamara 2023-05-03 15:02:22 UTC
we have sort_native_button_order (which is typically run automatically with a dialog is shown) and (stable) sort them according to their names
Comment 11 Heiko Tietze 2023-05-04 08:03:42 UTC
(In reply to Caolán McNamara from comment #10)
> we have sort_native_button_order (which is typically run automatically with
> a dialog is shown) and (stable) sort them according to their names

vcl/source/window/layout.cxx: getButtonPriority(std::u16string_view rType)
sorts the buttons save, yes, ok, discard, no, cancel

(In reply to sdc.blanco from comment #4)
> B.  Change position of buttons to:
> [Help]   [Delete] [Apply] [Close]

It seems that changing Ok to Apply wont sort this button anymore, but Close becomes the right-most item anyway, if necessary. It other words 

keep
  [Help]   [Close] [Delete] [Apply]
Comment 12 Commit Notification 2023-05-22 20:52:20 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/098e9426ad0b66b3da873a519c10047cb3955b0f

tdf#154186 change "OK" to "Apply" and rearrange button position

It will be available in 7.6.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 sdc.blanco 2023-05-24 12:39:58 UTC
"Ok" is changed now to "Apply" -- but no changes to the ordering of the buttons.
Closing as FIXED, and opening bug 155471 for further enhancements.