Skip to content

Fix the module on InvoiceShelf 2.3.0 and later - #13

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

gdarko merged 5 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 several ways, all fixed here:

  • Blank settings page: 2.3.0 moved to Pinia 3, which dropped the defineStore({ id, ... }) form the store used. It now uses defineStore(id, options), and the host's HTTP client instead of the removed window.axios.
  • 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 overrode them. The built stylesheet now sits in the app's utilities layer.
  • Themes did nothing: Tailwind 4 reads the colour variables as colours, not r, g, b triplets. They are full rgb() colours now.
  • Saving the customer portal settings with an empty page title failed with a 500, since company settings cannot be empty; a blank title is now left out.

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 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.

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.
@gdarko
gdarko merged commit 05c8d16 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