Skip to content

Fix the module on InvoiceShelf 2.3.0 and later - #15

Merged
gdarko merged 4 commits into
mainfrom
fix/pinia-3
Sep 24, 2026
Merged

gdarko merged 4 commits into
mainfrom
fix/pinia-3

Conversation

@gdarko

@gdarko gdarko commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Since InvoiceShelf 2.3.0 the module is broken in three ways, all fixed here:

  • Blank settings page (Cannot destructure property 'state'): 2.3.0 moved to Pinia 3, which dropped the defineStore({ id, ... }) form the store used. It now uses defineStore(id, options).
  • Requests failing: 2.3.0 stopped exposing window.axios, which the store went through. It now uses the host's HTTP client.
  • The app's layout broke (no sidebar, header controls or settings menu): 2.3.0 moved to Tailwind 4, whose rules live in cascade layers, and the module's unlayered utilities (.hidden, .flex) overrode them. The built stylesheet now sits in the app's utilities layer.

Also: releases are built against InvoiceShelf's 2.x branch (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 the optimize: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.

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.
@gdarko
gdarko merged commit e1053d5 into main Sep 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant