{"action":"created","comment":{"url":"https://api.github.com/repos/eBay/ebayui-core/pulls/comments/214455421","pull_request_review_id":151524959,"id":214455421,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDQ1NTQyMQ==","diff_hunk":"@@ -91,46 +92,42 @@ function refresh() {\n     for (let i = 0; i < this.state.items.length; i++) {\n         if (this.state.items[i].current) {\n             current = i;\n-        } else {\n-            // remove all hidden attribues to get accurate widths\n-            this.pageEls[i].removeAttribute('hidden');\n         }\n+        this.pageEls[i].removeAttribute('hidden');\n     }\n+\n     const totalPages = this.pageEls.length;\n-    const pageNumWidth = this.pageEls[current].offsetWidth + constants.margin;\n-    const containerWidth = this.containerEl.offsetWidth - pageNumWidth * 2;\n-    const numPagesAllowed = Math.floor((containerWidth) / (pageNumWidth));\n-    const adjustedNumPages = Math.min(constants.maxPagesAllowed - 1,\n-        Math.max(numPagesAllowed, constants.minPagesRequired));\n+    const pageNumWidth = this.pageEls[0].children[0].offsetWidth + constants.margin;\n+    const numPagesAllowed = (((this.pageContainerEl.offsetWidth) / pageNumWidth));\n+    const adjustedNumPages = Math.floor(Math.min(constants.maxPagesAllowed,\n+        Math.max(numPagesAllowed, constants.minPagesRequired)));\n \n     let start = 0;\n     let end = adjustedNumPages;\n-    const rangeLeft = Math.floor(adjustedNumPages * 0.5);\n+    let rangeLeft = Math.floor(adjustedNumPages * 0.5);\n     const rangeRight = Math.floor(adjustedNumPages * 0.5);\n \n+    if (rangeLeft + rangeRight + 1 > adjustedNumPages) {\n+        rangeLeft -= 1;","path":"src/components/ebay-pagination/index.js","position":37,"original_position":37,"commit_id":"151adddfda1bba11c5baab23f92c5048936c9686","original_commit_id":"151adddfda1bba11c5baab23f92c5048936c9686","user":{"login":"martin-ebay","id":37809937,"node_id":"MDQ6VXNlcjM3ODA5OTM3","avatar_url":"https://avatars1.githubusercontent.com/u/37809937?v=4","gravatar_id":"","url":"https://api.github.com/users/martin-ebay","html_url":"https://github.com/martin-ebay","followers_url":"https://api.github.com/users/martin-ebay/followers","following_url":"https://api.github.com/users/martin-ebay/following{/other_user}","gists_url":"https://api.github.com/users/martin-ebay/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ebay/subscriptions","organizations_url":"https://api.github.com/users/martin-ebay/orgs","repos_url":"https://api.github.com/users/martin-ebay/repos","events_url":"https://api.github.com/users/martin-ebay/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ebay/received_events","type":"User","site_admin":false},"body":"I will write a new test for this case after lunch.  just need to add a new width\r\n","created_at":"2018-08-31T19:34:10Z","updated_at":"2018-08-31T19:34:10Z","html_url":"https://github.com/eBay/ebayui-core/pull/375#discussion_r214455421","pull_request_url":"https://api.github.com/repos/eBay/ebayui-core/pulls/375","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eBay/ebayui-core/pulls/comments/214455421"},"html":{"href":"https://github.com/eBay/ebayui-core/pull/375#discussion_r214455421"},"pull_request":{"href":"https://api.github.com/repos/eBay/ebayui-core/pulls/375"}},"in_reply_to_id":214450061},"pull_request":{"url":"https://api.github.com/repos/eBay/ebayui-core/pulls/375","id":210859936,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwODU5OTM2","html_url":"https://github.com/eBay/ebayui-core/pull/375","diff_url":"https://github.com/eBay/ebayui-core/pull/375.diff","patch_url":"https://github.com/eBay/ebayui-core/pull/375.patch","issue_url":"https://api.github.com/repos/eBay/ebayui-core/issues/375","number":375,"state":"open","locked":false,"title":"1.0.0 pagination wrap fix","user":{"login":"martin-ebay","id":37809937,"node_id":"MDQ6VXNlcjM3ODA5OTM3","avatar_url":"https://avatars1.githubusercontent.com/u/37809937?v=4","gravatar_id":"","url":"https://api.github.com/users/martin-ebay","html_url":"https://github.com/martin-ebay","followers_url":"https://api.github.com/users/martin-ebay/followers","following_url":"https://api.github.com/users/martin-ebay/following{/other_user}","gists_url":"https://api.github.com/users/martin-ebay/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ebay/subscriptions","organizations_url":"https://api.github.com/users/martin-ebay/orgs","repos_url":"https://api.github.com/users/martin-ebay/repos","events_url":"https://api.github.com/users/martin-ebay/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ebay/received_events","type":"User","site_admin":false},"body":"<!-- Delete any sections below that are not relevant. -->\r\n\r\n## Description\r\nwhen using pagination--fluid and selecting a page number near the totalPage number the displayed number of pages would be missing a few items.\r\n\r\nThis update fixes the problem yet is dependent upon https://github.com/eBay/skin/pull/350 getting merged in and released to ebay/skin\r\n\r\n## Context\r\nto fix a bug introduced by my last update that I missed.\r\n\r\n## References\r\nfix for https://github.com/eBay/ebayui-core/issues/374\r\n","created_at":"2018-08-24T22:07:58Z","updated_at":"2018-08-31T19:34:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f77a6a5bef7d28caa6c29dd92c485bc8be197ac","assignee":null,"assignees":[],"requested_reviewers":[{"login":"DylanPiercey","id":4985201,"node_id":"MDQ6VXNlcjQ5ODUyMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4985201?v=4","gravatar_id":"","url":"https://api.github.com/users/DylanPiercey","html_url":"https://github.com/DylanPiercey","followers_url":"https://api.github.com/users/DylanPiercey/followers","following_url":"https://api.github.com/users/DylanPiercey/following{/other_user}","gists_url":"https://api.github.com/users/DylanPiercey/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanPiercey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanPiercey/subscriptions","organizations_url":"https://api.github.com/users/DylanPiercey/orgs","repos_url":"https://api.github.com/users/DylanPiercey/repos","events_url":"https://api.github.com/users/DylanPiercey/events{/privacy}","received_events_url":"https://api.github.com/users/DylanPiercey/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eBay/ebayui-core/pulls/375/commits","review_comments_url":"https://api.github.com/repos/eBay/ebayui-core/pulls/375/comments","review_comment_url":"https://api.github.com/repos/eBay/ebayui-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eBay/ebayui-core/issues/375/comments","statuses_url":"https://api.github.com/repos/eBay/ebayui-core/statuses/151adddfda1bba11c5baab23f92c5048936c9686","head":{"label":"martin-ebay:1.0.0-pagination-wrap-fix","ref":"1.0.0-pagination-wrap-fix","sha":"151adddfda1bba11c5baab23f92c5048936c9686","user":{"login":"martin-ebay","id":37809937,"node_id":"MDQ6VXNlcjM3ODA5OTM3","avatar_url":"https://avatars1.githubusercontent.com/u/37809937?v=4","gravatar_id":"","url":"https://api.github.com/users/martin-ebay","html_url":"https://github.com/martin-ebay","followers_url":"https://api.github.com/users/martin-ebay/followers","following_url":"https://api.github.com/users/martin-ebay/following{/other_user}","gists_url":"https://api.github.com/users/martin-ebay/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ebay/subscriptions","organizations_url":"https://api.github.com/users/martin-ebay/orgs","repos_url":"https://api.github.com/users/martin-ebay/repos","events_url":"https://api.github.com/users/martin-ebay/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ebay/received_events","type":"User","site_admin":false},"repo":{"id":143925885,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM5MjU4ODU=","name":"ebayui-core","full_name":"martin-ebay/ebayui-core","owner":{"login":"martin-ebay","id":37809937,"node_id":"MDQ6VXNlcjM3ODA5OTM3","avatar_url":"https://avatars1.githubusercontent.com/u/37809937?v=4","gravatar_id":"","url":"https://api.github.com/users/martin-ebay","html_url":"https://github.com/martin-ebay","followers_url":"https://api.github.com/users/martin-ebay/followers","following_url":"https://api.github.com/users/martin-ebay/following{/other_user}","gists_url":"https://api.github.com/users/martin-ebay/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ebay/subscriptions","organizations_url":"https://api.github.com/users/martin-ebay/orgs","repos_url":"https://api.github.com/users/martin-ebay/repos","events_url":"https://api.github.com/users/martin-ebay/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ebay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martin-ebay/ebayui-core","description":"Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.","fork":true,"url":"https://api.github.com/repos/martin-ebay/ebayui-core","forks_url":"https://api.github.com/repos/martin-ebay/ebayui-core/forks","keys_url":"https://api.github.com/repos/martin-ebay/ebayui-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martin-ebay/ebayui-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martin-ebay/ebayui-core/teams","hooks_url":"https://api.github.com/repos/martin-ebay/ebayui-core/hooks","issue_events_url":"https://api.github.com/repos/martin-ebay/ebayui-core/issues/events{/number}","events_url":"https://api.github.com/repos/martin-ebay/ebayui-core/events","assignees_url":"https://api.github.com/repos/martin-ebay/ebayui-core/assignees{/user}","branches_url":"https://api.github.com/repos/martin-ebay/ebayui-core/branches{/branch}","tags_url":"https://api.github.com/repos/martin-ebay/ebayui-core/tags","blobs_url":"https://api.github.com/repos/martin-ebay/ebayui-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martin-ebay/ebayui-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martin-ebay/ebayui-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/martin-ebay/ebayui-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martin-ebay/ebayui-core/statuses/{sha}","languages_url":"https://api.github.com/repos/martin-ebay/ebayui-core/languages","stargazers_url":"https://api.github.com/repos/martin-ebay/ebayui-core/stargazers","contributors_url":"https://api.github.com/repos/martin-ebay/ebayui-core/contributors","subscribers_url":"https://api.github.com/repos/martin-ebay/ebayui-core/subscribers","subscription_url":"https://api.github.com/repos/martin-ebay/ebayui-core/subscription","commits_url":"https://api.github.com/repos/martin-ebay/ebayui-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/martin-ebay/ebayui-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/martin-ebay/ebayui-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/martin-ebay/ebayui-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/martin-ebay/ebayui-core/contents/{+path}","compare_url":"https://api.github.com/repos/martin-ebay/ebayui-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martin-ebay/ebayui-core/merges","archive_url":"https://api.github.com/repos/martin-ebay/ebayui-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martin-ebay/ebayui-core/downloads","issues_url":"https://api.github.com/repos/martin-ebay/ebayui-core/issues{/number}","pulls_url":"https://api.github.com/repos/martin-ebay/ebayui-core/pulls{/number}","milestones_url":"https://api.github.com/repos/martin-ebay/ebayui-core/milestones{/number}","notifications_url":"https://api.github.com/repos/martin-ebay/ebayui-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martin-ebay/ebayui-core/labels{/name}","releases_url":"https://api.github.com/repos/martin-ebay/ebayui-core/releases{/id}","deployments_url":"https://api.github.com/repos/martin-ebay/ebayui-core/deployments","created_at":"2018-08-07T20:54:35Z","updated_at":"2018-08-17T22:13:10Z","pushed_at":"2018-08-31T16:24:40Z","git_url":"git://github.com/martin-ebay/ebayui-core.git","ssh_url":"git@github.com:martin-ebay/ebayui-core.git","clone_url":"https://github.com/martin-ebay/ebayui-core.git","svn_url":"https://github.com/martin-ebay/ebayui-core","homepage":null,"size":1043,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eBay:1.0.0","ref":"1.0.0","sha":"bad7553dcaca645a6e774582d15a264d62388d67","user":{"login":"eBay","id":3639281,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MzkyODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3639281?v=4","gravatar_id":"","url":"https://api.github.com/users/eBay","html_url":"https://github.com/eBay","followers_url":"https://api.github.com/users/eBay/followers","following_url":"https://api.github.com/users/eBay/following{/other_user}","gists_url":"https://api.github.com/users/eBay/gists{/gist_id}","starred_url":"https://api.github.com/users/eBay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eBay/subscriptions","organizations_url":"https://api.github.com/users/eBay/orgs","repos_url":"https://api.github.com/users/eBay/repos","events_url":"https://api.github.com/users/eBay/events{/privacy}","received_events_url":"https://api.github.com/users/eBay/received_events","type":"Organization","site_admin":false},"repo":{"id":123346792,"node_id":"MDEwOlJlcG9zaXRvcnkxMjMzNDY3OTI=","name":"ebayui-core","full_name":"eBay/ebayui-core","owner":{"login":"eBay","id":3639281,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MzkyODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3639281?v=4","gravatar_id":"","url":"https://api.github.com/users/eBay","html_url":"https://github.com/eBay","followers_url":"https://api.github.com/users/eBay/followers","following_url":"https://api.github.com/users/eBay/following{/other_user}","gists_url":"https://api.github.com/users/eBay/gists{/gist_id}","starred_url":"https://api.github.com/users/eBay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eBay/subscriptions","organizations_url":"https://api.github.com/users/eBay/orgs","repos_url":"https://api.github.com/users/eBay/repos","events_url":"https://api.github.com/users/eBay/events{/privacy}","received_events_url":"https://api.github.com/users/eBay/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eBay/ebayui-core","description":"Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.","fork":false,"url":"https://api.github.com/repos/eBay/ebayui-core","forks_url":"https://api.github.com/repos/eBay/ebayui-core/forks","keys_url":"https://api.github.com/repos/eBay/ebayui-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eBay/ebayui-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eBay/ebayui-core/teams","hooks_url":"https://api.github.com/repos/eBay/ebayui-core/hooks","issue_events_url":"https://api.github.com/repos/eBay/ebayui-core/issues/events{/number}","events_url":"https://api.github.com/repos/eBay/ebayui-core/events","assignees_url":"https://api.github.com/repos/eBay/ebayui-core/assignees{/user}","branches_url":"https://api.github.com/repos/eBay/ebayui-core/branches{/branch}","tags_url":"https://api.github.com/repos/eBay/ebayui-core/tags","blobs_url":"https://api.github.com/repos/eBay/ebayui-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eBay/ebayui-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eBay/ebayui-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/eBay/ebayui-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eBay/ebayui-core/statuses/{sha}","languages_url":"https://api.github.com/repos/eBay/ebayui-core/languages","stargazers_url":"https://api.github.com/repos/eBay/ebayui-core/stargazers","contributors_url":"https://api.github.com/repos/eBay/ebayui-core/contributors","subscribers_url":"https://api.github.com/repos/eBay/ebayui-core/subscribers","subscription_url":"https://api.github.com/repos/eBay/ebayui-core/subscription","commits_url":"https://api.github.com/repos/eBay/ebayui-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/eBay/ebayui-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/eBay/ebayui-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/eBay/ebayui-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/eBay/ebayui-core/contents/{+path}","compare_url":"https://api.github.com/repos/eBay/ebayui-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eBay/ebayui-core/merges","archive_url":"https://api.github.com/repos/eBay/ebayui-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eBay/ebayui-core/downloads","issues_url":"https://api.github.com/repos/eBay/ebayui-core/issues{/number}","pulls_url":"https://api.github.com/repos/eBay/ebayui-core/pulls{/number}","milestones_url":"https://api.github.com/repos/eBay/ebayui-core/milestones{/number}","notifications_url":"https://api.github.com/repos/eBay/ebayui-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eBay/ebayui-core/labels{/name}","releases_url":"https://api.github.com/repos/eBay/ebayui-core/releases{/id}","deployments_url":"https://api.github.com/repos/eBay/ebayui-core/deployments","created_at":"2018-02-28T21:51:53Z","updated_at":"2018-08-29T17:43:06Z","pushed_at":"2018-08-31T16:24:41Z","git_url":"git://github.com/eBay/ebayui-core.git","ssh_url":"git@github.com:eBay/ebayui-core.git","clone_url":"https://github.com/eBay/ebayui-core.git","svn_url":"https://github.com/eBay/ebayui-core","homepage":null,"size":1044,"stargazers_count":45,"watchers_count":45,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":21,"open_issues":23,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eBay/ebayui-core/pulls/375"},"html":{"href":"https://github.com/eBay/ebayui-core/pull/375"},"issue":{"href":"https://api.github.com/repos/eBay/ebayui-core/issues/375"},"comments":{"href":"https://api.github.com/repos/eBay/ebayui-core/issues/375/comments"},"review_comments":{"href":"https://api.github.com/repos/eBay/ebayui-core/pulls/375/comments"},"review_comment":{"href":"https://api.github.com/repos/eBay/ebayui-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eBay/ebayui-core/pulls/375/commits"},"statuses":{"href":"https://api.github.com/repos/eBay/ebayui-core/statuses/151adddfda1bba11c5baab23f92c5048936c9686"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"martin-ebay"}}