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 pagination on the Product Inventory tab #3

Closed
DennisClark opened this issue Dec 7, 2023 · 11 comments
Closed

Add pagination on the Product Inventory tab #3

DennisClark opened this issue Dec 7, 2023 · 11 comments
Assignees
Labels
enhancement New feature or request HighPriority High Priority Top Priority (Max 3 per Release) Focus for a release
Milestone

Comments

@DennisClark
Copy link
Member

We need to add add pagination on the Product Inventory tab, since the number of Inventory Items can easily be well over 100.

Also, we need to fix the default ordering (which is currently based on pk) and provide sorting options (perhaps on the column headers).

@DennisClark DennisClark added the enhancement New feature or request label Dec 7, 2023
@DennisClark DennisClark added this to the DejaCode 5.1 milestone Dec 7, 2023
@DennisClark DennisClark added the HighPriority High Priority label Dec 12, 2023
tdruez added a commit that referenced this issue Dec 14, 2023
tdruez added a commit that referenced this issue Dec 14, 2023
tdruez added a commit that referenced this issue Dec 14, 2023
tdruez added a commit that referenced this issue Dec 14, 2023
tdruez added a commit that referenced this issue Dec 18, 2023
tdruez added a commit that referenced this issue Dec 18, 2023
tdruez added a commit that referenced this issue Dec 18, 2023
tdruez added a commit that referenced this issue Dec 18, 2023
tdruez added a commit that referenced this issue Dec 19, 2023
tdruez added a commit that referenced this issue Dec 19, 2023
tdruez added a commit that referenced this issue Dec 20, 2023
tdruez added a commit that referenced this issue Dec 20, 2023
tdruez added a commit that referenced this issue Dec 20, 2023
tdruez added a commit that referenced this issue Dec 20, 2023
@DennisClark
Copy link
Member Author

@tdruez Performance greatly improved!
I found one small issue with the pagination: on Product DejaCode 5.0, when I do a "Check for new Package versions" I get zero results (that's ok) but when I click on the "Show All Items" link, it returns results for Page 1 but without the pagination controller that usually shows up in the upper right, so I have no way to get to Page 2 unless I use the Refresh Page feature of the browser (I'm using Firefox), and that works to restore the initial Inventory presentation. That's the only problem I have found so far.

@DennisClark
Copy link
Member Author

@tdruez In Staging Starship, Product "A1", the Inventory has 9 pages, and while positioned on Page 7 and I do a "Check for new Package versions" I get a list of 14 Packages with newer versions, which seems to be correct, but I had to count them manually because it says 882 results over the top of the table, and perhaps, if possible, something like "14 of 882 results" or "14 of 100 Page 7 items" would be nicer. I can go back and forth from "Show All Items" to "Show New Version Alerts" but the pagination controller is missing.

If i go to page 6 and "Check for new Package versions" I get a different list, and I think that's probably correct for the page that I am on, but the UI is not really clear that it is only checking for the page that I'm currently viewing, and I'm ok with that as long as the UI is clear about what is happening.

@DennisClark
Copy link
Member Author

DennisClark commented Dec 20, 2023

@tdruez The Search Inventory field works quite well, and performs well, and appears to search the entire product inventory, which makes sense, but it would be very helpful to have some kind of "Show All Items" button after one does a search.

@DennisClark
Copy link
Member Author

@tdruez for the record, I was able to import an additional package into the Starship Product "A1" with no problems. I found the package easily enough by searching on the name of the ScanCode.io output file that I used, scancode-2023-11-11-15-47-55.

tdruez added a commit that referenced this issue Dec 21, 2023
tdruez added a commit that referenced this issue Dec 21, 2023
@tdruez
Copy link
Member

tdruez commented Dec 21, 2023

@DennisClark I've refined the display of the pagination element in the UI, the pagination links will appear when using the "Show All Items".
Also, the total count is now displayed as a "reset" link.

Now, about the "Check for new Package versions", I don't think the current implementation works that well in the context of the pagination. I'm not sure how useful it is to only get the updated information for the current page. I would prefer to rework this implementation as another ticket, returning the whole list of available updates, maybe in a new tab.
Let me know your thoughts.

@DennisClark
Copy link
Member Author

@tdruez thanks for the updates, I'll take a look shortly. On further thought, I agree that you should probably rework the "Check for new Package versions" implementation as another ticket, and that returning the whole list in another tab could be the best way to do it -- worth trying out anyway!

@DennisClark
Copy link
Member Author

@tdruez the total count "reset link" and the pagination controller are working very nicely.

I did a "Check for new Package versions" and that worked fine, although I had to wait at least a minute on an Inventory with 882 items. I selected one of the suggested new Package versions, and got the PurlDB entry and created a Package in DejaCode for that, and then I added it to my Product. It sorted the new Package right after the old one in the Product Inventory, as it should. Then I figured I should delete the old one, and that turned out to be rather cumbersome. I had to go to "Manage >> Packages", which does not use the improved sorting or pagination, and I could only find the Package I wanted to delete by doing an inventory search, which returned the correct results, and I was able to use the rather strange delete technique that is on the Manage Packages form to delete the old one. So we have a somewhat awkward process flow problem: initial display is good, checking for new versions is good, adding the new Package is good, but then deleting the old one is challenging and non-intutuitve, although it finally did what I needed it to do. Perhaps we could add a Delete function to the Edit Product Package form? That would make the whole thing a lot easier, and we could address the Manage Packages UI issues later (or basically figure out what to do with the Manage forms altogether).

@DennisClark DennisClark added the Top Priority (Max 3 per Release) Focus for a release label Jan 4, 2024
tdruez added a commit that referenced this issue May 30, 2024
Signed-off-by: tdruez <[email protected]>
@tdruez
Copy link
Member

tdruez commented May 30, 2024

@DennisClark The search and pagination for the inventory tab is now merged and deployed.

I'd like to close this issue but first I've added #127 regarding the "Check for new Package versions" refinements.

Could you create a new issue from your comment at #3 (comment) since it's not directly related to the pagination implementation, I would prefer to handle it as it's own ticket.

@DennisClark
Copy link
Member Author

@tdruez new issue #128 created; please feel free to close this one.

@tdruez
Copy link
Member

tdruez commented May 30, 2024

@DennisClark Thanks!

@tdruez tdruez closed this as completed May 30, 2024
@mjherzog
Copy link
Member

Looking good. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HighPriority High Priority Top Priority (Max 3 per Release) Focus for a release
Projects
None yet
Development

No branches or pull requests

3 participants