Fix the module on InvoiceShelf 2.3.0 and later - #15
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 and the store's
requests failed. The store now passes its id as the first argument and
uses the host's HTTP client.
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 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 three ways, all fixed here:
Cannot destructure property 'state'): 2.3.0 moved to Pinia 3, which dropped thedefineStore({ id, ... })form the store used. It now usesdefineStore(id, options).window.axios, which the store went through. It now uses the host's HTTP client..hidden,.flex) overrode them. The built stylesheet now sits in the app'sutilitieslayer.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, adds a compatibility table, and adds theoptimize:clear/ container-restart step, since Docker caches routes at startup.Checked on the published 2.4.5 and 2.3.3 images: the app's layout is intact with the module installed, the settings page loads, adding a provider reaches Stripe's key check, and the customer payment page loads the invoice and reaches Stripe. A real payment needs Stripe test keys. Release as v1.1.1 after merge.