Repository navigation
feat(web): bring the window to form.md's design, add export buttons and printouts (0.10.0) - #9
Merged
Merged
Conversation
The splash showed the name in text where the family's splash shows the app icon over the same line and bar; the icon is FormLedger's own brand icon at 256 px.
The pre-paint script now defaults to auto, as form.md does, and keeps a stored light or dark choice.
A quiet Export CSV button fetches the export route with the session cookie and saves the file through a temporary download link; refusals show as a toast.
The seven document lists get Export CSV before New, carrying the status filter.
Both payment lists get Export CSV with the status filter.
Customers, suppliers, items, tax rates, warehouses and the chart of accounts get Export CSV in the head.
Every screen opens with the sidebar group as an accent eyebrow, the title at the family title size and a one-line description from the new view-about map, in a head of fixed height --page-head.
Trial balance, general ledger, both ageing screens and stock balance get Export CSV carrying their date, account and basis controls.
Profit and loss and the balance sheet get Export CSV in the head with their dates.
The account form gets a Cash or bank account checkbox bound to isCash, shown only for asset accounts that are not groups, with a muted Cash badge in the list; a missing field reads as false.
Accounts gain is_cash, allowed only on non-group asset accounts, set on create and update and returned as isCash; the starter chart marks 1110 and 1120.
Balances now return a cash block with the preference, the rule applied, the total and the accounts counted; a small cash-rule route reads and writes the auto, flagged or named preference.
The snapshot accounts table gains is_cash as its last column; adding a column does not bump the schema version.
Every export now has a declared column list with a kind per column, so an empty list keeps its real header, a field missing from the first row is not dropped, and the formula guard applies to text columns only. Output for non-empty lists is byte-identical to before.
The plain PDF fallback for invoices and quotes draws with fpdf, the same version form.md ships; it is MIT licensed, pure Go and pulls in no other module.
A Renderer interface with the fpdf fallback as its only entry, so a FormTxt renderer can stand in front later; core Helvetica in cp1252 with anything outside it written as U+ codes.
The route finds the document by number or id and reads it through its own JSON route, so the permission is the same as reading it; the file name is the document number.
formledger cli print KIND NUMBER [--out FILE] fetches the same route with the app token.
New cash-accounts page covers the flag, the three preference values, what auto resolves to, and the cash-rule route.
Records where the cash.accounts preference is stored and how auto treats an upgraded company.
The list takes cursor and returns nextCursor like the other document lists, ordered by date, created time and id so ties are stable; a call with no cursor answers as before with the same default and limit rules.
Ports sun, moon, monitor, chevron, more, logout and the back and forward arrows from form.md.
The sidebar is headed by the app tile, name, live dot and version, and its foot holds a user chip whose menu carries Account, the three theme choices and Sign out; the top bar gains back and forward and a group then screen crumb.
fpdf's SplitText reads the translated bytes as runes and indexes past its width table; rows, the party name and notes now wrap with a small byte-wise splitter and draw one cell per line.
A draft printed with a blank number box looked like a missing value.
What can be printed, the route and command, the Letter or A4 rule, the cp1252 and U+ code rule, and that FormTxt is not built yet.
The export doc lists the declared column kinds, the stock balance columns, delivery note paging, currencies with other than two decimals and which role sees what.
The shared button styles stack an icon over its label in a page head, so the export button sets its own inline row layout from the spacing tokens.
Why core Helvetica with U+ codes, the byte-wise wrap, the lookup through the JSON route and the fixed PDF dates.
Adds form.md's sheet shadow, sheet highlight, sheet radius, text-xl, space-10 and bold weight in both themes, and matches its 264px sidebar width.
Every gate is the family card on the dotted ground: app icon and name, a large title, a one-line welcome, labelled fields with hints, a password reveal and one full-width button; the old top bar name and sign-out rules are gone.
The design rules now name the form.md source of the page head, its fixed height and the dense table rows FormLedger keeps on purpose.
The log names the form.md source of the head, how its height is made and what the document form chrome should count now.
The sidebar foot gets form.md's separating rule, the Home action links sit centred at the family button height, and the status line styles that moved to the sidebar head are removed.
The action row wraps and trails instead of scrolling sideways, so Post is always reachable. The form height now subtracts the page head variable.
The goods receipt, delivery note and payment forms take the window height, the table gives way and the actions stay in view.
At eight characters the Cash badge was cut to an ellipsis beside its padding.
Records what was ported from form.md, the theme and daypart pre-paint, the history depth and the measurements.
Records why the export button fetches then saves a blob, where it sits, and how the cash flag is shown and sent.
The document number, status badge and kind select now sit on the title row of the taller head, in the sans face, with read-only values aligned to their labels.
…ment route GET /api/print/statement/CUSTOMER.pdf passes from and to through to /api/receivables/statement and draws opening, one row per event with a running balance, and closing.
The print verb accepts the statement kind and passes the dates as the route's query.
The statement address, its query passed through, the CLI verb, the file name and that it carries no ageing.
…lues Text, date and select fields take form.md's surface fill, faint border, accent focus border with a wash ring, placeholder and invalid tones, and the native select gets form.md's drawn arrow; checkboxes take the accent, height stays --control.
The design rules say where the field values come from and why fields stay at the control height.
The pinned action bar on the payment form matched the grey surface in light; it now uses the sheet.
Records why the action row wraps and how the stock and payment forms are bounded.
Home summed asset accounts by name in the window; it now shows the total the balances route computes from the flag or the name rule, as the company's preference says.
The wider field padding cut the due date's placeholder short in its one-column field.
The title took its text's width, so the badge slid when the number arrived, and read-only values dropped their padding and moved 12 px; the title box is fixed and the padding stays.
The PDF library is the version form.md ships, under MIT; the shell, sign-in card, page head, field styles, PDF page setup and splash layout came from form.md this release.
Moves every version site to 0.10.0 and adds the changelog section.
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.
feat(web): bring the window to form.md's design, add export buttons and printouts (0.10.0)
Summary
./formledger cli print, ongithub.com/go-pdf/fpdfv0.9.0, the version form.md ships (MIT, credited inNOTICE.md). It is the only new dependency.Commits
52 commits, release commit last. No hashes, since they change when signed. By type: feat 25, fix 12, docs 13, build 1, chore 1. By the scope in each subject: window 11 · printout 5 · docform 4 · shell 3 · two each for setup, print, payments, hashout, export and cli · and one each for web, tokens, theme, snapshot, reports, page, notice, ledger, internal, icons, home, deps, delivery, controls, coa, account and release.
Version
v0.10.0 (release commit is last). Moved:
internal/app/version.go,Makefileline 1,web/package.json, both fields inweb/package-lock.json,src-tauri/tauri.conf.json,src-tauri/Cargo.tomland its entry insrc-tauri/Cargo.lock, the "Current build version" line in four logs, and a new section inCHANGELOG.md.Checks
Run by the orchestrator at the head:
go build ./...,go vet ./...,gofmt -l cmd internalprinting nothing, the web type check. Each of the 50 commits before the notice and release commits was checked out in a copy and built: 50 of 50. Scans over the new commits: one author and committer, offset -0500, no attribution words, no merge commit, no test file, no em dash or emoji in changed markdown, no raw z-index.Run by the orchestrator on the final code, in a private built copy served by the binary, processor slowed 4x, 400 ms latency at about 400 kbit/s, cache off, sign-in through the new card, hard reload on the new invoice form: twenty lines typed with Enter straight after each item code (twenty of twenty held), Post; the server answered
SI-2026-000001, posted, 675.00; then trial balance, general ledger and profit and loss from the sidebar. Layout-shift entries: 0 without input and 0 with input at every step. The first run on the integrated code recorded 0.00251 without input on post (the document title box took its text's width, and read-only header values dropped their padding and moved 12 px); both were fixed and the whole run repeated. The orchestrator also rendered form.md's splash and FormLedger's side by side, and looked at form.md's own setup card and home and at FormLedger's sign-in, Home, sales invoices, document form, trial balance and chart of accounts in the light theme and the document form in dark, at 1400 by 900.Run by agents only: the shell, sign-in and Home at 0 without input in both themes and the right theme at first paint; the page head at one height on every screen; four exports downloaded from the window with rows equal to the screen, and a refused export shown as a notice; PDFs of five invoices (one of two pages, a draft, a cancelled one, one with accents), a quote, a purchase invoice and a statement, rasterised and looked at, byte-identical on rerun, totals equal to the API; the cash figure under each of the three preferences, the flag refused on a liability and on a group, two older databases upgraded; 622 delivery notes exported; 20 of 22 exports byte-identical to the previous build; every screen in the light theme, and forms at 1100 by 800 and 1400 by 700.
Not run: the desktop shell (it has never been compiled, so the splash was checked as a page); the CI workflow for these commits; the exports, snapshot and printouts by the orchestrator itself, beyond looking at one printed page; an export refused for a role (every role may read); PDFs through FormTxt (not built); a snapshot opened by a spreadsheet app. Known: letters outside Western European alphabets print in a PDF as codes such as
[U+0141]; the window cannot yet change the cash preference or print; the shell shows the app's name where the company's belongs.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.