Bug 166386 - Provide confirmation warning dialog for MRUs "Clear Recent Documents" and "Clear Unavailable Files"
Summary: Provide confirmation warning dialog for MRUs "Clear Recent Documents" and "C...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Recent-Document-List 118894
  Show dependency treegraph
 
Reported: 2025-04-28 23:51 UTC by nobu
Modified: 2025-05-17 03:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2025-04-28 23:51:32 UTC
Description:
Set a confirmation dialog for "Clear List" and "Clear Recent Documents" in the Start Center.

Steps to Reproduce:
1. Open Start Center.
2. Select "Clear Recent Documents" from the "Actions" icon in the upper right corner.

Actual Results:
3. No confirmation dialog appears, and all but the pinned thumbnail is deleted.

Expected Results:
3. A confirmation dialog will appear asking if you are sure you want to delete it.


Reproducible: Always


User Profile Reset: No

Additional Info:

I think that it is a kind UI that there is a confirmation dialog for the command of all deletion without "Undo" among multiple choices.

---
Reproducible with
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a6e59a058306f0523f3686a9b084d010bd80e632
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded
Comment 1 BogdanB 2025-04-29 04:48:35 UTC
UX Team -- please take a look at this enhancement. Thanks!
Comment 2 Heiko Tietze 2025-04-29 08:39:51 UTC
With "Clear List" you mean "Clear Unavailable Files" I guess. Both actions are indeed destructive and irreversible. Not against a confirmation if it has an option to not be shown a second time.
Comment 3 nobu 2025-04-29 11:13:10 UTC
(In reply to Heiko Tietze from comment #2)
> With "Clear List" you mean "Clear Unavailable Files" I guess.

The explanation was insufficient.
"Clear List" is Menu - File > Recent Documents > Clear List.

This is considered to be the same function as "Clear Recent Documents" in the upper right icon, but there is a minor problem.
https://bugs.documentfoundation.org/show_bug.cgi?id=166349

There are even more minor issues related to that.
https://bugs.documentfoundation.org/show_bug.cgi?id=166347
Comment 4 V Stuart Foote 2025-04-29 11:20:43 UTC
OK sure, but why would this only be for the Start Center instance? Enhancement of a confirmation warning dialog would need to be against the full MRU, recentfilesmenucontroller() and its UNO.

If offered would expect both the control in the MRU File -> Recent Documents as well as the button action in Start Center to give the warning--with user's option to ignore for subsequent clears (and also configure from profile Options, or in Expert config).
Comment 5 Heiko Tietze 2025-05-16 06:41:53 UTC
We discussed the topic in the design meeting.

The function itself is easy to understand and the result should not come with a surprise. However, it is a destructive action that cannot be undone. If the warning is implemented, it needs to be a querydialog that allows users to not show it again. 

Easy hack:

The command run via main menu is executed in RecentFilesMenuController::itemSelected() (CMD_CLEAR_LIST), when done from the start center it is RecentDocsView::clearUnavailableFiles(), see sfx2/source/control/recentdocsview.cxx. An example for the querydialog is SwView::ExecViewOptions()... case FN_VIEW_FIELDNAME in sw/source/uibase/uiview/view0.cxx (see also https://gerrit.libreoffice.org/c/core/+/185213).