Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 377968 - Git tags page needs pagination
Summary: Git tags page needs pagination
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.0 M2   Edit
Assignee: Maciej Bendkowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-27 16:23 EDT by John Arthorne CLA
Modified: 2012-09-03 08:42 EDT (History)
3 users (show)

See Also:
Szymon.Brandys: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2012-04-27 16:23:23 EDT
If you click "View All Tags" in the git repositories view, you get a page of all tags in the repository. The URL says &page=1, however the result is not paginated. In the Orion Server case I get back about 1000 tags.

Debugging this on the server, I case ListTagsJob gets created and run twice. The first time has a page size of 50, the second time has a page size of -1 (meaning get everything). Maybe we should in fact default to size 50 on the server if the client doesn't specify.
Comment 1 Szymon Brandys CLA 2012-04-29 05:35:18 EDT
As I recall there was the default size set to 50, if not specified. At least we had this for git log and maybe was not propagated to tags and branches.
Comment 2 Tomasz Zarna CLA 2012-04-29 15:59:51 EDT
(In reply to comment #1)
> As I recall there was the default size set to 50, if not specified. At least we
> had this for git log and maybe was not propagated to tags and branches.

That is correct. Git log is the only place where pagination has been effectively introduced. I guess "&page=1" John saw for listing tags is bogus.
Comment 3 Maciej Bendkowski CLA 2012-08-07 05:33:06 EDT
Fix: https://github.com/maciej-bendkowski/orion.client/commit/f9688b5c7a8e54c3ca5031efe484fdbfadf05bac

This pagination pattern touches the future repository UI idea I've mentioned in bug 369604.
Comment 4 Malgorzata Janczarska CLA 2012-08-21 11:55:30 EDT
(In reply to comment #3)
> Fix:
> https://github.com/maciej-bendkowski/orion.client/commit/f9688b5c7a8e54c3ca5031efe484fdbfadf05bac
> 
gitCommands.js is shown as if every single line was changed. Unfortunately it's also conflicting with newest master version, so it's really hard to review it.
Comment 5 Maciej Bendkowski CLA 2012-08-22 06:15:41 EDT
(In reply to comment #4)
> gitCommands.js is shown as if every single line was changed. Unfortunately
> it's also conflicting with newest master version, so it's really hard to
> review it.

Indeed. Please try this one: https://github.com/maciej-bendkowski/orion.client/commit/9b5b82e5b9321b4912fa064cd341fe27a2a2ef49
Comment 6 Malgorzata Janczarska CLA 2012-08-22 08:03:02 EDT
(In reply to comment #5)
> Indeed. Please try this one:
> https://github.com/maciej-bendkowski/orion.client/commit/
> 9b5b82e5b9321b4912fa064cd341fe27a2a2ef49

Better, thanks.
1. line 182 "that.redisplaynavigator" should be "that.redisplayNavigator"
2. I don't understand why you call redisplayNavigator always in displayRepository and only when you render Tags you call it in displayTags.
Comment 7 Malgorzata Janczarska CLA 2012-08-22 09:21:13 EDT
The ideal solution here would be:
1. When we hit "View All" for tags we are redirected to a site that has hash: /gitapi/tag/file/a/?page=1, this is the first page of the list of tags in "/file/a" repository, the list does not contain details
2. Because we already have the list of tags we can render information based on it: tag name, actions
3. Each tag has CommitLocation field, if we request for tag.CommitLocation + "?page=1&pageSize=1", we'll get the last commit tagged with this tag, we can use this information to render the rest of the details
4. For dynamically rendering details we can use the same mechanism that we used for dynamic loading the repositories
Comment 9 Szymon Brandys CLA 2012-09-03 08:42:24 EDT
Commit merged to master.