Bug 463853 - Click on clock applet to temporarily show seconds
Summary: Click on clock applet to temporarily show seconds
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock widget (other bugs)
Version First Reported In: 5.24.7
Platform: Other Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-04 23:02 UTC by Gregor Mi
Modified: 2023-01-25 22:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.0
Sentry Crash Report:


Attachments
suggestions-state-1-default (194.91 KB, image/png)
2023-01-04 23:04 UTC, Gregor Mi
Details
suggestions-state-2-click-opens-popup-and-shows-seconds (36.89 KB, image/png)
2023-01-04 23:04 UTC, Gregor Mi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Mi 2023-01-04 23:02:50 UTC
Currently, one has only two choices when one wants to see quickly the seconds of the current time:

a) Configure the clock to always show the seconds of the current time... and be distracted from the constant changes.
b) Configure the clock to not show the seconds of the current time.

On another shell, I made good experience with the following behaviour:

Do not show the (distracting) seconds by default, but show them in somewhere the calendar pop-up which opens when the clock applet is being clicked. An alternative could be to add the seconds to the applet as long as the calendar pop-up is open (this way, hours and minutes do not have to be repeated in the calendar pop-up)
Comment 1 Gregor Mi 2023-01-04 23:04:23 UTC
Created attachment 155041 [details]
suggestions-state-1-default
Comment 2 Gregor Mi 2023-01-04 23:04:45 UTC
Created attachment 155042 [details]
suggestions-state-2-click-opens-popup-and-shows-seconds
Comment 3 Nate Graham 2023-01-09 20:36:21 UTC
Will be implemented by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2232.
Comment 4 Gregor Mi 2023-01-09 23:35:00 UTC
(In reply to Nate Graham from comment #3)
> Will be implemented by
> https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2232.

Great, thx :)

I am excited how this will feel in practice :). My current concerns are:
1) the delay until the tooltip becomes visible might be troubling when time is of the essence
2) the tooltip disappears after a few seconds so using the feature to oversee a timespan greater than a few seconds won't work so well.
Comment 5 Nate Graham 2023-01-09 23:54:40 UTC
The tooltip actually doesn't time out now.
Comment 6 Gregor Mi 2023-01-10 00:02:55 UTC
Ah, great to hear :). With LTS version I am so not up-to-date 🙈
Comment 7 Fushan Wen 2023-01-25 03:53:24 UTC
Git commit a521f5ada3dadbe938c662a607aa28737530bd8e by Fushan Wen, on behalf of Alessio Bonfiglio.
Committed on 25/01/2023 at 03:53.
Pushed by fusionfuture into branch 'master'.

Make clocks tooltip consistent and add seconds

Having the seconds visible in your clock widget can be distracting, so most people decide to keep them hidden. Sometimes though it happens that you may need to know them: the idea  behind this mr is to make them always available in the tooltip of the clock widgets. And also make these tooltips consistent with each others as a bonus.

Unfortunately I'm no expert with qml, and I got stuck trying to accessing the tooltip inside the widget qml sources. I need to know when the tooltip is shown in order to change the sampling time and the alignment type of the time datasource. In the case of the digital clock, I can get that through `Plasmoid.toolTipItem.visible` because a custom tooltip is used, but in the analog clock this isn't the case and so `Plasmoid.toolTipItem` doesn't reference anything. I'd need to access the `visible` property of the `ToolTipDialog` currently in use, and probably a good solution would be to connect that to a new signal in `appletinterface`, but I haven't even understood how that is, for example, connected to the `ToolTip` class for example, so any help/suggestion would be welcomed.
Otherwise I could make a custom tooltip in the analog clock too and use the same trick as for the digital one, but it sounds more like a hack than a solution.

PS: As soon as I fix the problem above I'll take care of the fuzzy and binary clocks too.
FIXED-IN: 6

M  +2    -1    applets/analog-clock/contents/ui/analogclock.qml
M  +3    -3    applets/digital-clock/package/contents/config/main.xml
M  +4    -2    applets/digital-clock/package/contents/ui/CalendarView.qml
M  +6    -6    applets/digital-clock/package/contents/ui/DigitalClock.qml
M  +5    -3    applets/digital-clock/package/contents/ui/Tooltip.qml
M  +23   -4    applets/digital-clock/package/contents/ui/configAppearance.qml
M  +12   -4    applets/digital-clock/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/a521f5ada3dadbe938c662a607aa28737530bd8e
Comment 8 Fushan Wen 2023-01-25 03:57:07 UTC
Git commit 25b3e3d6c2a69e7266634999f183f023826f722d by Fushan Wen.
Committed on 25/01/2023 at 03:55.
Pushed by fusionfuture into branch 'master'.

applets/digital-clock: use enum for `showSeconds` config entry

M  +7    -2    applets/digital-clock/package/contents/config/main.xml
M  +3    -5    applets/digital-clock/package/contents/ui/CalendarView.qml
M  +3    -4    applets/digital-clock/package/contents/ui/DigitalClock.qml
M  +2    -2    applets/digital-clock/package/contents/ui/Tooltip.qml
M  +9    -22   applets/digital-clock/package/contents/ui/configAppearance.qml
M  +2    -5    applets/digital-clock/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/25b3e3d6c2a69e7266634999f183f023826f722d
Comment 9 Fushan Wen 2023-01-25 04:02:46 UTC
Git commit 93aec80b5c2691d21e4b1ef03ab8507688cc019c by Fushan Wen.
Committed on 25/01/2023 at 04:01.
Pushed by fusionfuture into branch 'master'.

applets/digital-clock: fix wrong default value in kcfg xml

M  +3    -3    applets/digital-clock/package/contents/config/main.xml

https://invent.kde.org/plasma/plasma-workspace/commit/93aec80b5c2691d21e4b1ef03ab8507688cc019c
Comment 10 Fushan Wen 2023-01-25 04:05:46 UTC
Git commit 3877f1d21501e743767d0fab14479ca908220d3f by Fushan Wen.
Committed on 25/01/2023 at 03:58.
Pushed by fusionfuture into branch 'master'.

applets/digital-clock: add update script for `showSeconds` config entry

See also https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2232

A  +21   -0    desktoppackage/contents/updates/digitalclock_migrate_showseconds_setting.js

https://invent.kde.org/plasma/plasma-desktop/commit/3877f1d21501e743767d0fab14479ca908220d3f