Fix the module on InvoiceShelf 2.3.0 and later - #13
Merged
Merged
Conversation
InvoiceShelf 2.3.0 moved to Pinia 3, which dropped the
defineStore({ id, ... }) form the store used, and stopped exposing
window.axios, so the settings page rendered blank. The store now passes
its id as the first argument and uses the host's HTTP client.
Saving the customer portal settings with an empty page title failed with
a server error, since company settings cannot be empty; a blank title is
now left out.
Releases are built against InvoiceShelf's 2.x branch with its toolchain
instead of the default branch, which is now 3.x. The README says the
module is for 2.x only and adds the cache step after installing.
InvoiceShelf 2.3.0 moved to Tailwind 4, which reads the primary colour variables as colours. The themes set them to bare r, g, b triplets, so a selected theme left the portal without its primary colour. They are now full rgb() colours, as the host's own themes are.
InvoiceShelf 2.3.0 moved to Tailwind 4, which keeps its rules in cascade layers, and CSS outside any layer beats every layered rule. The module's unlayered utilities (.hidden, .flex, ...) overrode the app's responsive ones, hiding the sidebar, the header controls and the settings menu. The built stylesheet now goes into the app's utilities layer, declared in the app's order, so the app's own rule wins wherever both define a class.
Formatting only: imports for classes named in docblocks, sorted imports and trailing commas. The code has not matched Pint's Laravel preset, which the style check runs, since the module was imported.
The check workflow was InvoiceShelf's own: it ran pint from a vendor directory the module never installs, then php artisan test and a make dist of InvoiceShelf.zip, which a module has none of, so it failed on every push. It now installs Pint 1.29.0 through setup-php and checks the code style; release.yaml builds the module's zip.
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.
Since InvoiceShelf 2.3.0 the module is broken in several ways, all fixed here:
defineStore({ id, ... })form the store used. It now usesdefineStore(id, options), and the host's HTTP client instead of the removedwindow.axios.utilitieslayer.rgb()colours now.Also: releases are built against InvoiceShelf's
2.xbranch (PHP 8.4, Node 24, pnpm) instead of the default branch, which is now 3.x; the README says the module is for 2.x only and adds the cache step after installing.Checked on the published 2.4.5 and 2.3.3 images: the app's layout is intact, the settings page loads, saving a theme works, and the customer portal picks it up. Release as v1.1.4 after merge.