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 scroll pagination and username filter to HistoryPublishedList #16642

Merged

Conversation

ahmedhamidawan
Copy link
Member

@ahmedhamidawan ahmedhamidawan commented Sep 5, 2023

Fixes #16568

Added scroll pagination (page previously had no pagination):

Screen.Recording.2023-09-06.at.5.52.45.PM.mov

Added username (owner) filter:

Also allows you to link to the HistoryPublishedList page with username filter:
/histories/list_published?f-username=testuser

Screen.Recording.2023-09-06.at.1.14.29.PM.mov

Possible Future Directions?:

  • Should we change b-table to list similar to list of histories seen in the SelectorModal?:
    image

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

- sorting not quite working with the `b-table`, WIP...
@mvdbeek
Copy link
Member

mvdbeek commented Sep 5, 2023

Can we add explicit navigation as well that includes the last page ? I don't think it's uncommon that you'd have to go back a few years.

@ahmedhamidawan
Copy link
Member Author

Can we add explicit navigation as well that includes the last page ? I don't think it's uncommon that you'd have to go back a few years.

Good point. The user will still be able to sort by update_time ascending, which is the same as starting from the last page backwards.

The challenge with b-navigation is making it work with infinite scroll at the same time I think.
Also, would we be able to get the last page of histories using the api call (i can see how changing the sorting order of update_time in the params can achieve that, but then thats the same thing as clicking the table header to sort backwards)?

@mvdbeek
Copy link
Member

mvdbeek commented Sep 5, 2023

Mhh, ok, I guess some pagination is definitely better than no navigation. I think for other endpoints we return the total count, but I guess we don't have to do it all in one PR.

…edList`

- add username filter for `HistoryFilters` manager in backend
- add username field to front end menu in `HistoryPublishedList`
- ..refactor code by adding `sortAndFilterHistories` fn
- ..cater for backend filter error in frontend
@ahmedhamidawan ahmedhamidawan marked this pull request as ready for review September 6, 2023 23:26
@github-actions github-actions bot added this to the 23.2 milestone Sep 6, 2023
@martenson
Copy link
Member

While testing this I noticed that when I click on "Published histories by marten1" which sends me to this url: http://127.0.0.1:8081/histories/list_published?f-username=marten1 I will get a list of all published histories, ignoring the query. So something with the parameter parsing needs a tweak I think?

@ahmedhamidawan
Copy link
Member Author

ahmedhamidawan commented Sep 7, 2023

While testing this I noticed that when I click on "Published histories by marten1" which sends me to this url: http://127.0.0.1:8081/histories/list_published?f-username=marten1 I will get a list of all published histories, ignoring the query. So something with the parameter parsing needs a tweak I think?

Oh I didn't implement that yet. I'll take a look at that, thanks!

- also added the `user-eq` filter for exact match along with existing
  `user` (contains) filter
@martenson
Copy link
Member

Works well, thanks @ahmedhamidawan!

@martenson martenson merged commit 174257d into galaxyproject:dev Sep 8, 2023
40 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Published history component missing pagination, search by owner
3 participants