Bug 164452 - Extension manager for new UI Options -> Appearance theme shows themes installed after removal
Summary: Extension manager for new UI Options -> Appearance theme shows themes install...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Sahil Gautam (allotropia)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UI-Theming LibreOffice-Themes
  Show dependency treegraph
 
Reported: 2024-12-24 16:26 UTC by V Stuart Foote
Modified: 2025-03-12 17:01 UTC (History)
3 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 V Stuart Foote 2024-12-24 16:26:31 UTC
The new Tools -> Options -> Appearance panel offers LO themes via the Extension manager. Currently "Light Application Colors" and "Lime Theme". 

Neither is installed by default at installation and defaults is to "Automatic" with 'COLOR_SCHEME_LIBREOFFICE_AUTOMATIC' recorded to registrymodification.xcu in profile.

When either extension is installed from the Appearance panel via 'Extension: Color Themes' filter, the .OXT is added to user profile in the user\uno_packages\cache\uno_packages directory.

The Appearance panel extension manager offers a 'Remove' button, but that only pulls the 

The color theme can be removed from UI with the 'Remove' button. But it leaves the extension still in the users uno_packages cache. It just records a "remove" stanza to the profile .xcu.

<item oor:path="/org.openoffice.Office.UI/ColorScheme/ColorSchemes"><node oor:name="Lime Theme" oor:op="remove"/></item>

Revisit to the 'Extension: Color Themes' manager panel shows the extension as installed! But there is no ability in UI to restore the color theme.

It is a little confusing to have removed the extension, but on next visit to the manager it shows as installed.

User currently must edit the registrymodifications.xcu to delete the color theme's 'remove' stanza which then restores the theme to the UI.  

While if actual removal of the .OXT is desired/needed, user must manually delete the appropriate extension from the uno_packages directory of their profile.

Would expect smoother UX to manage the color themes, more in line with other .OXT extensions where the manager panel handles the uninstall.  Is there some reason for the color themes to persist per user that we're trying/need to protect them?
Comment 1 Sahil Gautam (allotropia) 2024-12-24 22:59:41 UTC
(In reply to V Stuart Foote from comment #0)
> Would expect smoother UX to manage the color themes, more in line with other
> .OXT extensions where the manager panel handles the uninstall.  Is there
> some reason for the color themes to persist per user that we're trying/need
> to protect them?

There is no reason besides "the infrastructure for doing so not being available". The plan is to integrate the extension manager with the appearance dialog so that we directly deal with the extensions rather than the registry entry added by the extension. Integration with the Extension Manager would also mean that we can access the extension's thumbnail image and other information ==> a graphical window with nice theme previews. But that would take quite some time, atleast not in the next two months.
Comment 2 Heiko Tietze 2025-01-06 12:11:37 UTC
Loading the extension writes the content into the registry - and forgets about the extension file. This needs to be fixed.
Comment 3 V Stuart Foote 2025-02-13 02:36:43 UTC
Remains an issue in nightly of master against 25.8.0

Noticed also that deleting the entry for an Appearance theme in
user\uno_packages\cache\uno_packages  and removing any trace of that color theme from registrysettings.xcu that I *can not then reinstall* the Appearance theme.

Clicking on the restored 'Install' button in the Extensions: Color Themes panel does not in fact reinstall the theme--even though it is gone from the cache.

So currently forced to completely clear the user profile to get the UI back to defaults and to make the theme available for installation again.

=-testing-=

2025-02-11 TB77 nightly
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fb8bf5f209e1bd7fd7d8ad555ec66dbf31649ee8
CPU threads: 8; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 4 V Stuart Foote 2025-02-13 02:55:30 UTC
(In reply to V Stuart Foote from comment #3)

Poked at it some more and find that if I deleted the cache/uno_packages directory AND the uno_packages.pmap file, as well as delete from registrysettings.xcu the Install button action for each Appearance theme is again enabled and the theme reinstalls fully, without having to clear the profile.

> =-testing-=
> 
> 2025-02-11 TB77 nightly
> Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: fb8bf5f209e1bd7fd7d8ad555ec66dbf31649ee8
> CPU threads: 8; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan;
> VCL: win
> Locale: en-US (en_US); UI: en-US
> Calc: CL threaded