Bug 476023 - Explain the sequential numbering filename template better (%Nd)
Summary: Explain the sequential numbering filename template better (%Nd)
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: git-master
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2023-10-23 22:24 UTC by Noah Davis
Modified: 2023-12-01 16:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Davis 2023-10-23 22:24:46 UTC
SUMMARY
The explanation in the UI is confusing. It took me a very long time to realize that I was supposed to put `%d` or `%[number here]d` rather than `%Nd`.
Comment 1 Noah Davis 2023-10-23 22:28:00 UTC
In the first place, it's a bit hard to show how that behavior works in the UI, so maybe it would be better to make it so the number of `d` characters in a row is the number of digits to use. Would need a kconf_update settings migration script.
Comment 2 Noah Davis 2023-11-30 15:21:38 UTC
https://invent.kde.org/graphics/spectacle/-/merge_requests/300

This MR fixes the issue by changing the sequence placeholder to `<#>` with additional `#`  characters adding more padding (e.g., `<###>` becomes `001`) and explaining that.
Comment 3 Noah Davis 2023-12-01 16:48:27 UTC
Git commit ebee5b1d413eeba6a79f65160bc6cc1e543fdad1 by Noah Davis.
Committed on 01/12/2023 at 17:47.
Pushed by ndavis into branch 'master'.

Change filename placeholder format

Use `<placeholder>` instead of `%placeholder`. This makes it easier to
use
more descriptive or complex placeholders.

Also use more descriptive placeholders since we can and migrate old
placeholders.

With this new format we could add things like `<ISODate>` or
`<ShortDate>` as shorthands for common date/time formats.

I use `<key>` instead of `%key%` because sequences with obvious opening
and closing characters are easier to parse for humans and machines. I
chose '<' and '>' instead of other pairs of characters because I don't
need to escape '<' or '>' in regex. I do need to escape them in Rich
Text/HTML/XML, so it's sometimes less convenient than '{' and '}', but
not too bad.

M  +9    -10   doc/index.docbook
M  +7    -0    kconf_update/CMakeLists.txt
A  +70   -0    kconf_update/spectacle-24.02.0-change_placeholder_format.cpp     [License: LGPL(v2.0+)]
M  +4    -0    kconf_update/spectacle.upd
M  +30   -32   src/ExportManager.cpp
M  +13   -1    src/ExportManager.h
M  +3    -0    src/Gui/SettingsDialog/ImageSaveOptions.ui
M  +2    -2    src/Gui/SettingsDialog/ImageSaveOptionsPage.cpp
M  +3    -0    src/Gui/SettingsDialog/VideoSaveOptions.ui
M  +2    -2    src/Gui/SettingsDialog/VideoSaveOptionsPage.cpp
M  +2    -2    src/Gui/SettingsDialog/spectacle.kcfg
M  +21   -22   tests/FilenameTest.cpp

https://invent.kde.org/graphics/spectacle/-/commit/ebee5b1d413eeba6a79f65160bc6cc1e543fdad1