Skip to content

feat: product images, and drop the page headers - #6

Merged
PhilippTheServer merged 1 commit into
mainfrom
pl/no-page-headers
Aug 19, 2026
Merged

PhilippTheServer merged 1 commit into
mainfrom
pl/no-page-headers

Conversation

@PhilippTheServer

Copy link
Copy Markdown
Contributor

Closes #5. Pairs with OpenTaberna/fastapi#36, now merged.

Page headers gone

Every screen opened with a title and a sentence of description, repeating what the sidenav
already says and pushing the content down. All removed — the ot-page-header component is
deleted rather than left unused.

Page actions moved onto the filter bar, on the same row as the filters, so they cost no
vertical space of their own. Content now starts at the top of the viewport.

Verified across every route:

/dashboard h1=0  filterBar=0
/products  h1=0  filterBar=1
/inventory h1=0  filterBar=1
/orders    h1=0  filterBar=1
/returns   h1=0  filterBar=0
/users     h1=0  filterBar=1

Product images

A picker with a live preview in the form, and a thumbnail column in the table.

The image is uploaded after the item is saved, because it can only be attached to an
item that already exists. If that second call fails, the message says the product saved but
the image did not — rather than implying the whole operation failed, which would send
someone hunting for a product that is actually there.

Object-URL previews are revoked when replaced or cleared, so opening the form repeatedly
does not leak.

A bug from the previous PR

The products filter bar was never actually there. It was written in #4, but the edit
that inserted it silently did not match, and my verification checked sorting on products
and filtering on orders — so nothing caught that products had no filter bar at all. It
shipped missing. Restored here, and searching plus the status facet both work:

products: 4 -> 1 filtered to Draft

Worth naming because the lesson is about the check, not the code: verifying a feature on
one screen said nothing about the screen where it was missing.

Verification

Driven against the live stack:

h1 elements on products: 0
thumbnails in table: 1
thumbnail src: http://localhost:8000/v1/items/120fa693-.../image
page errors: none
failed calls: none

Images were uploaded through the form, not the API, so the whole path is covered —
file picker, multipart request, token attachment, list refresh, thumbnail render.

Test Files  6 passed (6)      Tests  30 passed (30)
All matched files use Prettier code style!
Initial total 343.53 kB

Removes the title-and-description block from every screen. It repeated
what the sidenav already says and pushed the actual content down. Page
actions moved onto the filter bar, so they cost no vertical space of
their own, and the content now starts at the top of the viewport.

Adds the product image: a picker with a live preview in the form, and a
thumbnail column in the table. The image is uploaded after the item is
saved, because it can only be attached to an item that exists. If that
second call fails the message says the product saved but the image did
not, rather than implying the whole thing failed.

Also restores the products filter bar. It was written in the previous
change but the edit that inserted it silently did not match, and the
verification pass checked sorting on products and filtering on orders -
so nothing caught that products had no filter bar at all. Searching and
the status facet work there now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@PhilippTheServer
PhilippTheServer merged commit 5226a61 into main Aug 19, 2026
1 check passed
@PhilippTheServer
PhilippTheServer deleted the pl/no-page-headers branch August 19, 2026 19:27
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.

Drop the page headers; show a product image

1 participant