Bug 443449 - KCM does not apply `dateDisplayFormat` key for digital clock applet specified in layout.js
Summary: KCM does not apply `dateDisplayFormat` key for digital clock applet specified...
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_lookandfeel (other bugs)
Version First Reported In: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-07 19:48 UTC by doncbugs
Modified: 2022-05-19 04:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description doncbugs 2021-10-07 19:48:38 UTC
SUMMARY
An option for a location was added under appearance in Digital Clock. When exported with the Global Themes Explorer, this setting is not remembered. Applying a desktop layout that had it sets it to the default value instead.

STEPS TO REPRODUCE
1. Set the clock to show "Always beside time"
2. Export it as a layout
3. Apply the layout

OBSERVED RESULT
The clock will be shown with the default value of "adaptive location"

EXPECTED RESULT
The setting for "Always beside time" should be preserved

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-10-07 21:01:00 UTC
I you add this value manually to the exported config file, does it take effect as expected?

In other words, is this an issue with the applet itself, or with Global Theme Explorer's exporting functionality?
Comment 2 doncbugs 2021-10-08 01:55:24 UTC
(In reply to Nate Graham from comment #1)
> I you add this value manually to the exported config file, does it take
> effect as expected?
> 
> In other words, is this an issue with the applet itself, or with Global
> Theme Explorer's exporting functionality?

When I set that applet and export it, in the layout.js I see "dateDisplayFormat" has "BesideTime" and, well, when set to the default has no value in the layout.js. Theme Explorer seems to have it.
Comment 3 doncbugs 2021-10-08 01:57:40 UTC
Also, for whatever reason, this bug disappeared from my list of open bugs so I could not find it when I went to that page. Is this an intentional function of needsinfo?
Comment 4 Nate Graham 2021-10-09 03:59:54 UTC
> When I set that applet and export it, in the layout.js I see "dateDisplayFormat" has
> "BesideTime" and, well, when set to the default has no value in the layout.js.
Isn't that the expected behavior? The config file only gets an entry when the setting is in a non-default state.
Comment 5 doncbugs 2021-10-09 04:28:52 UTC
(In reply to Nate Graham from comment #4)

> Isn't that the expected behavior? The config file only gets an entry when
> the setting is in a non-default state.

Uh, I think so.

In any case, when applying the desktop layout in global themes, the clock does not display in the "beside" format. I have also noticed that icons-only-taskmanager does not receive the proper layout. It seems only a single broken link is added when you try to apply a layout. I believe the entire list of applications is mistakenly added as one.

Something very weird is also happening where sections seem to be duplicated in the file. Possibly from exporting multiple times. /Configuration/General and /Configuration/Configuration/General are an example. Unsure if either exporter or plasmoid or both are broken.
Comment 6 Nate Graham 2021-10-11 15:33:07 UTC
Let's focus on one thing at a time. :)

If the layout.js file gets `dateDisplayFormat=BesideTime` in it when you export the layout while the clock is in "beside time" mode, are you saying the problem is that this isn't being respected when the exported global theme is applied?
Comment 7 doncbugs 2021-10-12 04:57:33 UTC
(In reply to Nate Graham from comment #6)
> Let's focus on one thing at a time. :)
> 
> If the layout.js file gets `dateDisplayFormat=BesideTime` in it when you
> export the layout while the clock is in "beside time" mode, are you saying
> the problem is that this isn't being respected when the exported global
> theme is applied?

Yes, more specifically: "dateDisplayFormat": "BesideTime"
Comment 8 Nate Graham 2021-10-12 15:05:20 UTC
Thanks.
Comment 9 Nate Graham 2022-04-19 15:45:24 UTC
A big change was made for Plasma 5.25 to actually apply layout stuff properly. Can you check again with current git master, or with Plasma 5.25 once it's released?
Comment 10 Bug Janitor Service 2022-05-04 04:35:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2022-05-19 04:35:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!