Skip to content

feat(frontend): Add persistant filtered detail navigation in the url - #12585

Merged
SchrodingersGat merged 23 commits into
inventree:masterfrom
Jr-kenny:Jrkenny/inventree-detail-navigation
Aug 19, 2026
Merged

SchrodingersGat merged 23 commits into
inventree:masterfrom
Jr-kenny:Jrkenny/inventree-detail-navigation

Conversation

@Jr-kenny

@Jr-kenny Jr-kenny commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

The detail navigation now follows the review feedback.

The helper is a .tsx file, and the navigation actions use the shared navigateToLink handler. Previous and Next use Tabler icons with accessible labels and tooltips. A subtle x of y indicator shows the current position in the filtered result set, using the API count for the full total.

I added a Playwright regression that opens a detail page from the table and moves from the first record to the second.

I checked this with yarn tsc --noEmit, yarn build, Biome on the changed files, and a local Playwright browser flow against the demo dataset.

Closes #12397

@netlify

netlify Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit 0e92ae6
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6a8527f0ae47a20008f7054f

@Jr-kenny
Jr-kenny marked this pull request as ready for review August 8, 2026 13:12
@matmair matmair added the User Interface Related to the frontend / User Interface label Aug 11, 2026
@matmair matmair added this to the 1.6.0 milestone Aug 11, 2026
@matmair matmair self-assigned this Aug 11, 2026
@SchrodingersGat

Copy link
Copy Markdown
Member

User Interface Buttons

I would like to see the navigation buttons being icons (tabler) - not text. Also, a subtle x of y text might be helpful. See example image below

image

@SchrodingersGat

Copy link
Copy Markdown
Member

Unit Tests

This will require regression testing via playwright.

@SchrodingersGat

Copy link
Copy Markdown
Member

@Jr-kenny this is starting to come together nicely

I think that the placement is a bit wonky here - perhaps it makes more sense in the "breadcrumb" bar - and please adjust the layout to vertically center the items, larger icons, etc

image

@SchrodingersGat

Copy link
Copy Markdown
Member

An implementation request - putting all of the attributes into the URL gets pretty messy. Perhaps we can instead use a hash of the values, and then store the actual data in sessionStorage - keyed to the hash? So this way all we add is ?nav=1A2BC3

@matmair

matmair commented Aug 13, 2026

Copy link
Copy Markdown
Member

@SchrodingersGat that makes it not shareable, invalidating most of the usefulness of links

@SchrodingersGat

Copy link
Copy Markdown
Member

Ok, I was not thinking about sharing, for me I think the main value is the quick navigation within the user's own table context.

@Jr-kenny

Copy link
Copy Markdown
Contributor Author

Yeah, I see what you mean. The current implementation puts the API URL, filters, index, PK, and field directly in the URL. I’ll switch that to a short nav hash like ?nav=1A2BC3, with the navigation data stored in sessionStorage under that hash. I’ll update the link builder, reader, and Playwright coverage as part of that.

@Jr-kenny

Jr-kenny commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Ok, I was not thinking about sharing, for me I think the main value is the quick navigation within the user's own table context.

@SchrodingersGat
Just to confirm before I change it umm should I go ahead with the sessionStorage + short ?nav= hash approach for local navigation, even though those links won’t be shareable? Or do we want to keep the navigation state in the URL so links remain portable?

@matmair

matmair commented Aug 13, 2026

Copy link
Copy Markdown
Member

The bounty is scoped to be generally useful, not just for one user #12397 (comment)

@SchrodingersGat

Copy link
Copy Markdown
Member

To be clear, I am not saying that I do not want the links to be shareable - I simply had neglected to consider that in my previous review.

With regard to shareable links, there is a consideration we need to make - the API does not always return the same results for each user. For example, there are many API endpoints which filter against "assigned_to_me" (or similar) - which will obviously return different results for each user

That being said I am keen to see the links be shareable - but, perhaps there is a way to also make the URLs cleaner?

@SchrodingersGat

SchrodingersGat commented Aug 16, 2026 •

Copy link
Copy Markdown
Member

URL Shortening

In terms of URL shortening, let's use this example: http://localhost:5173/web/manufacturing/build-order/7/details?_nav_api=%2Fapi%2Fbuild%2F&_nav_index=17&_nav_pk=7&_nav_field=pk&_nav_query=part_detail%3Dtrue%26outstanding%3Dtrue

Variable Names

The variable names can be shortened, as an example

Long Name Short Name
_nav_api _na
_nav_query _nq
_nav_index _ni

Nav Field

Most of the time, the nav field will be pk - you can omit that unless it is not pk

Nav API

The _nav_api values are mostly going to point to hard-coded fixed text values - we could have a lookup table for these to shorten the URL even further? e.g. _nav_api=XYZ

@SchrodingersGat

Copy link
Copy Markdown
Member

There is some visual "instability" when clicking through the navigation items - see video below. It would be better if the buttons did not alter the height of the navigation bar.

export-1786840143205.mp4

@SchrodingersGat

Copy link
Copy Markdown
Member

Also, please put the text first, before the buttons, so that the position of the buttons does not move as the length of the text changes:

image

@SchrodingersGat

Copy link
Copy Markdown
Member

@Jr-kenny also, can you please add a documentation section into docs/concepts/ui.md detailing the new feature

@matmair matmair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with merging this and awarding the bounty
@SchrodingersGat agreed?

@matmair matmair added the enhancement This is an suggested enhancement or new feature label Aug 19, 2026
@matmair matmair changed the title Add filtered detail navigation feat(frontend): Add filtered detail navigation Aug 19, 2026
@matmair matmair changed the title feat(frontend): Add filtered detail navigation feat(frontend): Add persistant filtered detail navigation in the url Aug 19, 2026
@SchrodingersGat

Copy link
Copy Markdown
Member

@matmair yes, good to go on this. Thanks for the contribution @Jr-kenny

@SchrodingersGat
SchrodingersGat merged commit 16ca6c2 into inventree:master Aug 19, 2026
37 checks passed
@matmair

matmair commented Aug 19, 2026

Copy link
Copy Markdown
Member

@Jr-kenny

Copy link
Copy Markdown
Contributor Author

@matmair thanks again for merging #12585 and pointing me to the bounty.

I tried to claim it on BountyHub, but the claim page says: “This bounty is exclusive, you need to be assigned to work on it in order to claim it.”

The issue itself currently has no assignee, and BountyHub doesn’t seem to recognize me as assigned. Since you mentioned earlier that whoever’s solution was merged would be assigned, does'nt the bounty need to be assigned to Jr-kenny first before I can import and claim PR #12585?

Screenshot 2026-08-19 at 10 42 34 AM

@Jr-kenny

Copy link
Copy Markdown
Contributor Author

One more question on the bounty payment side — I’m new to BountyHub, so I didn’t realize beforehand that the payout setup requires SWIFT/BIC details.

My current USD account only supports ACH and gives me an account number + routing number, but no SWIFT/BIC.

Is there any alternative way you normally handle bounty payments in cases like this, or does it strictly have to go through BountyHub’s SWIFT-supported payout setup?

@matmair

matmair commented Aug 19, 2026

Copy link
Copy Markdown
Member

I will write their support. All bounties go through bountyhub; they have stripe in the backend so there might be other options

@matmair

matmair commented Aug 19, 2026

Copy link
Copy Markdown
Member

@Jr-kenny try again

@Jr-kenny

Copy link
Copy Markdown
Contributor Author

Just did I’ve sent the assignment request again. Thanks!

@matmair

matmair commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

You should now be able to claim the bounty with this pr link

@matmair

matmair commented Aug 20, 2026

Copy link
Copy Markdown
Member

@Jr-kenny have you send your claim? I see that it is now assigned but I can not submit a claim for you, that seems to be only possible from your end

@Jr-kenny

Jr-kenny commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Not yet , the assignment issue is fixed now, thanks.
i just even claimed
I’m still having trouble with the payout setup on BountyHub. It requires an account number + SWIFT/BIC, while my current USD account only supports ACH/routing details.

I’ve already contacted BountyHub support to ask whether there’s another supported payout option, but no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This is an suggested enhancement or new feature is_bounty User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Add Next and Previous Icon to switch easily between 2 objects

3 participants