-
-
Notifications
You must be signed in to change notification settings - Fork 772
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
Add level indicators and path to stock location and part category dropdowns #8366
base: master
Are you sure you want to change the base?
Add level indicators and path to stock location and part category dropdowns #8366
Conversation
❌ Deploy Preview for inventree-web-pui-preview failed.
|
@chris-thorn the implementation looks good here. Can you please implement the same thing for "part category" too? |
I hope I've correctly updated this PR with the requested changes! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8366 +/- ##
==========================================
- Coverage 84.47% 84.44% -0.04%
==========================================
Files 1170 1168 -2
Lines 53456 53215 -241
Branches 1999 1999
==========================================
- Hits 45159 44937 -222
+ Misses 7769 7767 -2
+ Partials 528 511 -17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
It looks like some of the tests are failing now due to the adjusted naming scheme. You will need to adjust the following unit tests (in Forms - Stock Item ValidationPages - Index - Scan (StockLocation)In both cases you can see that the expected text has changed, causing the test(s) to fail... |
But do we really want to have the full path name as name on each level? I mean if the tests expect something different,we change that behavior? |
@wolflu05 AFAIK this is only intended to change the rendering in form drop downs - as is the current behaviour in CUI |
Im not sure what I would prefere, I guess none of both. In the end my goal is to implement a tree picker like I did in CUI for all tree models, and then show all parent levels, when a search query matches only a child. But ok then change this for now. |
@wolflu05 I agree that neither is ideal, and that a tree picker would be perfect for this. Just to clarify my reasoning for this PR: Right now in PUI, if stock location or part category names don't include information about the hierarchy when you search for a location or category, you potentially see multiple identical names but with no indication of which is the correct one. It's only when you hover over it that you can see the hierarchy.
Searching for Until the tree picker is ready for implementation, it's my feeling that the dropdown should behave like the one in CUI. @SchrodingersGat Ah, sorry about that - I will update the PR today. |
This fixes #8350 and makes the stock location dropdown in the new interface closely match the dropdown in the classic interface.
Adds hyphens to indicate hierarchy level, and shows stock location path instead of simply stock location name.