-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add level indicators and path to stock location and part category dropdowns #8366
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@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.46% -0.02%
==========================================
Files 1170 1172 +2
Lines 53456 53297 -159
Branches 1999 2015 +16
==========================================
- Hits 45159 45017 -142
Misses 7769 7769
+ 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. |
I've changed pages/pui_scan.spec.ts but I couldn't work out what needed changing in pui_forms.spec.ts. |
@chris-thorn are you using the interactive window in playwright to determine what specific locators you should be looking for? |
Ah, no - I wasn't aware of that. This is my first time using Dev Containers, Playwright, CI pipelines,and even making feature branches for PRs... I want to contribute but I'm struggling a bit with the learning curve! Following the docs, I seem to have Playwright installed in the devcontainer. However, when I try and run the tests I get:
The Chrome executable appears to exist in the expected location:
Running the command to just install Chrome returns the following:
Any idea what I am missing? |
Ah, this might be a real hole in our process. I don't use the devcontainer for frontend testing, and so have not run into this issue. @matmair @wolflu05 do you have any experience running playwright inside our devcontainer? This might be another good reason to move to a debian based docker image... @chris-thorn are you running on windows? My dev setup is under WSL (ubuntu) and might be easier to get setup there? |
Right - that makes sense. Yeah, I'm running the devcontainer in Windows. I will have a play with WSL, or just try running directly on an Ubuntu server. |
For the purpose of this PR, change line await page.getByRole('option', { name: /Electronics Lab/ }).click(); to await page.getByText('Electronics production facility').click(); |
I have not used playwright within devcontainers |
@chris-thorn are you able to make the small fix as outlined above? |
Sorry, was away over the weekend. I've now push the change to this branch. |
@chris-thorn nice work, thanks for the contribution :) I hope that you can continue to implement good features like this! |
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.