Bug 447332 - Open Recent file list in the file menu is too large which covers the entire screen with no way to go back.
Summary: Open Recent file list in the file menu is too large which covers the entire s...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alvin Wong
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-21 11:26 UTC by Raghavendra kamath
Modified: 2021-12-29 11:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot showing the huge recent document list (373.24 KB, image/png)
2021-12-21 11:27 UTC, Raghavendra kamath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2021-12-21 11:26:49 UTC
SUMMARY
We show file names along with full filepaths in the recent file menu. when the filename and filepath are long the flyout menu becomes too large. Earlier this was not evident but now that the default number of recent document has been increased to 100, the list is split into two columns spanning whole screen even on my qhd screen.

The commit that made maximum recent file number 100 is https://invent.kde.org/graphics/krita/-/commit/633bf0456c3d8c7297ff56eaeb19e6d180446586

I propose we keep the default number to 20 and also introduce some mechanism like scrollable list to tackle higher numbers. Since the previews are embedded in the recent file list I also far that this will add to start-up time, this may be wrong assumption on my part.

I am also attaching a screenshot of how it looks in my system

this is the nightly with hash - (git 5e7b12a)
Comment 1 Raghavendra kamath 2021-12-21 11:27:46 UTC
Created attachment 144750 [details]
screenshot showing the huge recent document list
Comment 2 Alvin Wong 2021-12-21 16:06:39 UTC
Okay, so here is my opinion:

- We can limit the items visible from the menu (10 should be good, just like in the past) without limiting the actual maximum stored recent file.
- Making the menu scrollable is likely out of the question for being too complicated to implement (if possible at all).
-  To reduce horizontal space consumption, we can probably remove the full path display from the menu and show it with a tooltip instead.
- The recent files menu already shortens the names by putting ellipsis in the middle, but the current limit before shortening is screen width * 0.75. We may consider reducing it further.
- In the future, we can add a "More Recent Files..." action to show a pop-up with the full recent files listing and a text box for searching from the list. (Inspiration from VSCode but I'm sure there are other software with similar features.)
Comment 3 Raghavendra kamath 2021-12-21 17:00:48 UTC
I like these suggestions. +1
Comment 5 Alvin Wong 2021-12-29 11:04:09 UTC
Git commit ac1d8bd110dab88ed60e67d2c4aec9dea728d89f by Alvin Wong.
Committed on 29/12/2021 at 10:55.
Pushed by alvinwong into branch 'master'.

Change recent files menu to show at most 10 items

... regardless of the maxRecentFileItems setting. This matches the
previous behaviour before MR !1182.

The reason is that, QMenu does not handle too many items in a nice way,
and the tall thumbnail plus potentially long paths doesn't help. The
current default maxRecentFileItems being 100 is too much for the menu to
handle.

M  +14   -0    libs/widgetutils/config/krecentfilesaction.cpp
M  +4    -0    libs/widgetutils/config/krecentfilesaction_p.h

https://invent.kde.org/graphics/krita/commit/ac1d8bd110dab88ed60e67d2c4aec9dea728d89f
Comment 6 Alvin Wong 2021-12-29 11:04:17 UTC
Git commit 4c3d3ccb1c9b46ae7f2afc648d45c222dc16af68 by Alvin Wong.
Committed on 29/12/2021 at 10:55.
Pushed by alvinwong into branch 'master'.

Make recent files list show filename only once

Remove the filename from the full path to only show the directory path,
because the filename is already shown at the front, it was just
duplicated information that takes up extra screen space.

M  +5    -4    libs/widgetutils/config/krecentfilesaction.cpp

https://invent.kde.org/graphics/krita/commit/4c3d3ccb1c9b46ae7f2afc648d45c222dc16af68