Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

chris-thorn
Copy link

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.

Copy link

netlify bot commented Oct 25, 2024

Deploy Preview for inventree-web-pui-preview failed.

Name Link
🔨 Latest commit 30949d9
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/67292ea7534c5d0008bfc5d2

@matmair matmair added enhancement This is an suggested enhancement or new feature Platform UI Related to the React based User Interface labels Oct 25, 2024
@matmair matmair added this to the 0.17.0 milestone Oct 25, 2024
@SchrodingersGat
Copy link
Member

@chris-thorn the implementation looks good here. Can you please implement the same thing for "part category" too?

@chris-thorn
Copy link
Author

I hope I've correctly updated this PR with the requested changes!

@chris-thorn chris-thorn changed the title Add level indicators and path to stock location dropdown Add level indicators and path to stock location and part category dropdowns Oct 27, 2024
Copy link

codecov bot commented Oct 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.44%. Comparing base (b4310bf) to head (30949d9).

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     
Flag Coverage Δ
pui 68.19% <100.00%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SchrodingersGat
Copy link
Member

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 ./src/frontend/tests):

Forms - Stock Item Validation

image

Pages - Index - Scan (StockLocation)

image

In both cases you can see that the expected text has changed, causing the test(s) to fail...

@wolflu05
Copy link
Contributor

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?

@SchrodingersGat
Copy link
Member

@wolflu05 AFAIK this is only intended to change the rendering in form drop downs - as is the current behaviour in CUI

@wolflu05
Copy link
Contributor

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.

@chris-thorn
Copy link
Author

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 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.

Bay 1
├── Shelf 1
│   └── Bin 1
└── Shelf 2
    └── Bin 1

Searching for Bin 1 will produce two results but will not display information about their parent locations, so you don't know whether you're picking the bin on Shelf 1 or Shelf 2.

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.

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 Platform UI Related to the React based User Interface
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Full hierarchy in 'Default Location' dropdown not presented to user
4 participants