Modernize LibreOffice theme and Calc support - #20
Open
OmarAhmed-A wants to merge 1 commit into
Open
Conversation
Replace direct profile edits with a supported OXT package so current LibreOffice releases can register and activate the complete theme. Add all 91 current color keys, Calc coverage, bundled palette registration, activation helpers, validation, and updated install docs.
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Dracula LibreOffice theme distribution by moving from direct profile edits (registrymodifications.xcu) to a supported OXT configuration extension, expanding the theme to cover current Calc/UI color keys, and adding build/install/validation tooling to reliably package and activate the scheme.
Changes:
- Introduces an OXT-based extension layout (config XCU + palette path registration + extension metadata) and an automated build pipeline to generate
dist/Dracula-LibreOffice.oxt. - Adds installers and activation helpers (
install.sh,tools/activate.py) plus static/unit validation scripts undertests/. - Updates documentation to reflect the new install/activation flow and LibreOffice version requirements.
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/activate.py | UNO-based helper to set Dracula as active scheme and force dark appearance, with schema compatibility handling. |
| tests/validate_extension.py | Static checks for packaged files, required color values/visibility, contrast, and palette name normalization. |
| tests/test_activate.py | Unit tests for activation schema compatibility helpers. |
| tests/query_theme.py | Runtime UNO verification script for an isolated LibreOffice instance (manual/CI helper). |
| test.sh | Wrapper to build the OXT and run validation + unit tests. |
| README.md | Updated project overview, install instructions, and development workflow. |
| install.sh | New installer that builds the OXT, installs via unopkg, and optionally activates via UNO. |
| INSTALL.md | Rewritten install/verify/troubleshooting/removal docs aligned with OXT approach. |
| extension/Paths.xcu | Registers the bundled palettes/ directory via %origin% fuse into Palette InternalPaths. |
| extension/META-INF/manifest.xml | Adds initial OXT manifest entries for configuration data files. |
| extension/description.xml | Extension metadata including identifier, version, and LO minimal version dependency. |
| extension/description.txt | Short extension description text referenced by description.xml. |
| dracula.xcu | Updated theme configuration in modern XCU structure with full current key set. |
| dracula.soc | Fixes trailing-space “Yellow ” palette entry name. |
| build.sh | New script to stage and zip the OXT package into dist/. |
| add-dracula-application-colors.sh | Compatibility wrapper that now delegates to the new installer. |
| .gitignore | Ignores build output and Python bytecode caches. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+166
to
+175
| palette = ElementTree.fromstring(palette_xml) | ||
| palette_names = [element.attrib.get("{http://openoffice.org/2000/drawing}name") for element in palette] | ||
| if "Yellow " in palette_names or "Yellow" not in palette_names: | ||
| raise AssertionError("the palette contains the old trailing-space Yellow name") | ||
|
|
||
| print( | ||
| f"Validated {package}: {len(actual)} explicit theme colors, " | ||
| f"{len(palette_names)} palette colors, WCAG contrast checks passed." | ||
| ) | ||
| return 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
registrymodifications.xcuedits with a supported OXT packageWhy
The legacy installer spliced a one-line fragment into the user profile. On current LibreOffice releases, that can leave Dracula absent, inactive, or only partially applied because newer Calc and interface keys are missing.
The OXT uses LibreOffice's supported configuration-extension mechanism and targets LibreOffice 25.8 or newer, where the current
Colorschema is available.Verification
./test.shScreenshots
Before: on affected current releases, Dracula can be missing from Appearance or apply only to the sheet canvas, as reported in #8 and #17.
After:
Closes #8
Closes #12
Closes #17
Refs #19