-
-
Notifications
You must be signed in to change notification settings - Fork 971
feat(PUI): Make header tabs links to simpilfy new tab behaviour #8779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@sur5r 👀 |
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8779 +/- ##
==========================================
- Coverage 85.55% 85.53% -0.02%
==========================================
Files 1177 1177
Lines 52041 52082 +41
Branches 2120 2120
==========================================
+ Hits 44523 44549 +26
- Misses 6984 6987 +3
- Partials 534 546 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@matmair this is a nice addition. It would make sense to add it for the "Panel" nav tab links too? |
Propaply; should this be included in this patch? |
@matmair yes I think so, should be only very minimal diff |
@SchrodingersGat added |
@matmair I have noticed something here - the target link is different depending on how the click event is interpreted: Starting PointFrom this starting point, I will click the "Manufacturing" tab: Left Mouse ButtonNavigates to "Manufacturing" page in same tab Left Mouse Button + Control KeyOpens "Manufacturing" page in new tab Middle Mouse ButtonOpens "Manufacturing" page (via demo site) in new tab: Note that the URL in the address bar is different in this case! The same behaviour hapens with the side panels too... |
@SchrodingersGat I am not familiar with middle button. Which control key is this? |
No control key, just click on the link by pressing the scroll wheel on the mouse. Typically this just opens a link in a new tab (similar to ctrl+click). However, it bypasses the browser onClick event system somehow so we can't catch it like a normal click. Somehow, this type of click uses a different baseUrl when generating the link target |
Not really sure what to do about the middle click, I can not find where it is getting it's link in that case and why it is diefferent |
… into fix-header-links
Middle click doesn't work at all for me. It's not surprising given the main menu items are no links (a href) but buttons. I guess this is just a clash of worlds. This is no longer web browsing, so we can't expect it to behave as such. |
that is the thing - there should be/is an a element rendered - so it should work the same as "normal" html |
@matmair it looks like most of the effects of this PR have been reverted, not sure if that is intentional? But the |
I have re-introduced the rendering as elements; seems to work but I do not have a middle click for debug |
The links are there, but one doesn't end up on the correct view/subpage. It neither works with middle click nor with "copy link" and pasting the link into a new tab. Example: Open a part and use the link from e.g. "Part pricing" to open an new tab. It opens the Part, but on "Part Details". It seems to URLs are generated incorrectly, i.e. they point to |
Seems to work on my machine - are we talking about the same thing? Screen.Recording.2025-04-19.at.15.54.31.mov |
…fix-header-links
This PR enables opening header tab items per right-click to new tabs.