ontrack icon indicating copy to clipboard operation
ontrack copied to clipboard

Add a button/link to easily display more builds (pagination of builds)

Open SansGuidon opened this issue 3 years ago • 1 comments

By default we need to edit Maximum number of builds to display value of current filter in order to change the count of items to display and see more items. It would be convenient and closer to other UIs (see pagination) to just get a brainless way to display more builds on the current page. For instance it could be done through a button/link enabling to display the 10 next items, or the next [current count, aka value for maximum number builds to display] items.

SansGuidon avatar Jan 26 '21 13:01 SansGuidon

@MorganGeek , this is a very good idea.

If by chance you want to try a contribution, the code which pilots the view is at https://github.com/nemerosa/ontrack/blob/v4/develop/ontrack-web/src/app/view/view.branch.js and the code for the UI is at https://github.com/nemerosa/ontrack/blob/v4/develop/ontrack-web/src/app/view/fragment.branchBuildView.tpl.html

I guess the general idea would be to have a link at the end of the view when the filter data has a count property. When clicking this link, you add the 10 or other to the current count in the current filter data and call loadBuildView().

This approach is simple but a bit primitive because it reloads the whole list of builds whereas ideally, you'd want to reload only the next ones. For this, you'd need to adapt the GraphQL schema and backend code, but that's another story.

dcoraboeuf avatar Jan 27 '21 14:01 dcoraboeuf