{"action":"closed","number":16,"pull_request":{"url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/16","id":41695747,"html_url":"https://github.com/miguelgrinberg/Flask-Moment/pull/16","diff_url":"https://github.com/miguelgrinberg/Flask-Moment/pull/16.diff","patch_url":"https://github.com/miguelgrinberg/Flask-Moment/pull/16.patch","issue_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues/16","number":16,"state":"closed","locked":false,"title":"Hide timestamps until rendering is complete.","user":{"login":"ColeKettler","id":3892845,"avatar_url":"https://avatars.githubusercontent.com/u/3892845?v=3","gravatar_id":"","url":"https://api.github.com/users/ColeKettler","html_url":"https://github.com/ColeKettler","followers_url":"https://api.github.com/users/ColeKettler/followers","following_url":"https://api.github.com/users/ColeKettler/following{/other_user}","gists_url":"https://api.github.com/users/ColeKettler/gists{/gist_id}","starred_url":"https://api.github.com/users/ColeKettler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColeKettler/subscriptions","organizations_url":"https://api.github.com/users/ColeKettler/orgs","repos_url":"https://api.github.com/users/ColeKettler/repos","events_url":"https://api.github.com/users/ColeKettler/events{/privacy}","received_events_url":"https://api.github.com/users/ColeKettler/received_events","type":"User","site_admin":false},"body":"This is intended to mitigate the flicker issue in #1.\r\n\r\nThere's no way to completely remove flickering / reflow while the timestamps render, since Moment doesn't know how long the timestamp is going to be until it performs the formatting. There are two alternatives, both of which set a style on the templated timestamp and remove it after rendering is complete.\r\n\r\nSetting `visibility: hidden` will result in a transparent element that is usually larger than the formatted timestamp (because ISO 8601 formatting is huge). Some reflow will occur due to the text content's length changing, so this is pretty much the same as before, minus the original timestamp being visible.\r\n\r\n![visibility_hidden_before](https://cloud.githubusercontent.com/assets/3892845/9091022/d1d8b012-3b6b-11e5-90a2-8ee1298eeb05.png)\r\n---\r\n![visibility_hidden_after](https://cloud.githubusercontent.com/assets/3892845/9090372/e4052170-3b67-11e5-8e13-d3cd6217696a.png)\r\n\r\nSetting `display: none` will remove the element until it's ready, and then significant reflow will occur.\r\n\r\n![display_none_before](https://cloud.githubusercontent.com/assets/3892845/9090434/3d0c35ec-3b68-11e5-8b76-f840646d9e14.png)\r\n---\r\n![display_none_after](https://cloud.githubusercontent.com/assets/3892845/9090437/40481f32-3b68-11e5-88e7-107dac6d7d39.png)\r\n\r\nGiven that this occurs really quickly, I find the `display: none` approach to be less jarring, since it doesn't leave gaps in the text. `visibility: hidden` is an easy adjustment to make, too. So is leaving it as it is. Personal preference.","created_at":"2015-08-05T16:02:26Z","updated_at":"2015-08-05T23:33:06Z","closed_at":"2015-08-05T23:33:06Z","merged_at":"2015-08-05T23:33:06Z","merge_commit_sha":"9452b3999dd5cdb57213ac0dd9a05ce6f34d0899","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/16/commits","review_comments_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/16/comments","review_comment_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/comments{/number}","comments_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues/16/comments","statuses_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/statuses/a5d312f789949e352845dd1f767e98a8e428b3eb","head":{"label":"ColeKettler:fix-flicker","ref":"fix-flicker","sha":"a5d312f789949e352845dd1f767e98a8e428b3eb","user":{"login":"ColeKettler","id":3892845,"avatar_url":"https://avatars.githubusercontent.com/u/3892845?v=3","gravatar_id":"","url":"https://api.github.com/users/ColeKettler","html_url":"https://github.com/ColeKettler","followers_url":"https://api.github.com/users/ColeKettler/followers","following_url":"https://api.github.com/users/ColeKettler/following{/other_user}","gists_url":"https://api.github.com/users/ColeKettler/gists{/gist_id}","starred_url":"https://api.github.com/users/ColeKettler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColeKettler/subscriptions","organizations_url":"https://api.github.com/users/ColeKettler/orgs","repos_url":"https://api.github.com/users/ColeKettler/repos","events_url":"https://api.github.com/users/ColeKettler/events{/privacy}","received_events_url":"https://api.github.com/users/ColeKettler/received_events","type":"User","site_admin":false},"repo":{"id":40250010,"name":"Flask-Moment","full_name":"ColeKettler/Flask-Moment","owner":{"login":"ColeKettler","id":3892845,"avatar_url":"https://avatars.githubusercontent.com/u/3892845?v=3","gravatar_id":"","url":"https://api.github.com/users/ColeKettler","html_url":"https://github.com/ColeKettler","followers_url":"https://api.github.com/users/ColeKettler/followers","following_url":"https://api.github.com/users/ColeKettler/following{/other_user}","gists_url":"https://api.github.com/users/ColeKettler/gists{/gist_id}","starred_url":"https://api.github.com/users/ColeKettler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColeKettler/subscriptions","organizations_url":"https://api.github.com/users/ColeKettler/orgs","repos_url":"https://api.github.com/users/ColeKettler/repos","events_url":"https://api.github.com/users/ColeKettler/events{/privacy}","received_events_url":"https://api.github.com/users/ColeKettler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ColeKettler/Flask-Moment","description":"Formatting of dates and times in Flask templates using moment.js.","fork":true,"url":"https://api.github.com/repos/ColeKettler/Flask-Moment","forks_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/forks","keys_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/teams","hooks_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/hooks","issue_events_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/issues/events{/number}","events_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/events","assignees_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/assignees{/user}","branches_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/branches{/branch}","tags_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/tags","blobs_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/git/refs{/sha}","trees_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/statuses/{sha}","languages_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/languages","stargazers_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/stargazers","contributors_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/contributors","subscribers_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/subscribers","subscription_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/subscription","commits_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/commits{/sha}","git_commits_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/git/commits{/sha}","comments_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/comments{/number}","issue_comment_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/issues/comments{/number}","contents_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/contents/{+path}","compare_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/merges","archive_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/downloads","issues_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/issues{/number}","pulls_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/pulls{/number}","milestones_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/milestones{/number}","notifications_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/labels{/name}","releases_url":"https://api.github.com/repos/ColeKettler/Flask-Moment/releases{/id}","created_at":"2015-08-05T14:31:10Z","updated_at":"2015-08-05T14:31:11Z","pushed_at":"2015-08-05T15:20:16Z","git_url":"git://github.com/ColeKettler/Flask-Moment.git","ssh_url":"git@github.com:ColeKettler/Flask-Moment.git","clone_url":"https://github.com/ColeKettler/Flask-Moment.git","svn_url":"https://github.com/ColeKettler/Flask-Moment","homepage":"","size":91,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"miguelgrinberg:master","ref":"master","sha":"c649cf86a7c4e70d65f14c358a99e6fffbd3e0da","user":{"login":"miguelgrinberg","id":2715854,"avatar_url":"https://avatars.githubusercontent.com/u/2715854?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelgrinberg","html_url":"https://github.com/miguelgrinberg","followers_url":"https://api.github.com/users/miguelgrinberg/followers","following_url":"https://api.github.com/users/miguelgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/miguelgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelgrinberg/subscriptions","organizations_url":"https://api.github.com/users/miguelgrinberg/orgs","repos_url":"https://api.github.com/users/miguelgrinberg/repos","events_url":"https://api.github.com/users/miguelgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/miguelgrinberg/received_events","type":"User","site_admin":false},"repo":{"id":13822359,"name":"Flask-Moment","full_name":"miguelgrinberg/Flask-Moment","owner":{"login":"miguelgrinberg","id":2715854,"avatar_url":"https://avatars.githubusercontent.com/u/2715854?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelgrinberg","html_url":"https://github.com/miguelgrinberg","followers_url":"https://api.github.com/users/miguelgrinberg/followers","following_url":"https://api.github.com/users/miguelgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/miguelgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelgrinberg/subscriptions","organizations_url":"https://api.github.com/users/miguelgrinberg/orgs","repos_url":"https://api.github.com/users/miguelgrinberg/repos","events_url":"https://api.github.com/users/miguelgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/miguelgrinberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miguelgrinberg/Flask-Moment","description":"Formatting of dates and times in Flask templates using moment.js.","fork":false,"url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment","forks_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/forks","keys_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/teams","hooks_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/hooks","issue_events_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues/events{/number}","events_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/events","assignees_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/assignees{/user}","branches_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/branches{/branch}","tags_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/tags","blobs_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/git/refs{/sha}","trees_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/statuses/{sha}","languages_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/languages","stargazers_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/stargazers","contributors_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/contributors","subscribers_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/subscribers","subscription_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/subscription","commits_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/commits{/sha}","git_commits_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/git/commits{/sha}","comments_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/comments{/number}","issue_comment_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues/comments{/number}","contents_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/contents/{+path}","compare_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/merges","archive_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/downloads","issues_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues{/number}","pulls_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls{/number}","milestones_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/milestones{/number}","notifications_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/labels{/name}","releases_url":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/releases{/id}","created_at":"2013-10-24T04:17:57Z","updated_at":"2015-08-04T05:51:35Z","pushed_at":"2015-08-05T23:33:06Z","git_url":"git://github.com/miguelgrinberg/Flask-Moment.git","ssh_url":"git@github.com:miguelgrinberg/Flask-Moment.git","clone_url":"https://github.com/miguelgrinberg/Flask-Moment.git","svn_url":"https://github.com/miguelgrinberg/Flask-Moment","homepage":"","size":259,"stargazers_count":53,"watchers_count":53,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/16"},"html":{"href":"https://github.com/miguelgrinberg/Flask-Moment/pull/16"},"issue":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues/16"},"comments":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/miguelgrinberg/Flask-Moment/statuses/a5d312f789949e352845dd1f767e98a8e428b3eb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"miguelgrinberg","id":2715854,"avatar_url":"https://avatars.githubusercontent.com/u/2715854?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelgrinberg","html_url":"https://github.com/miguelgrinberg","followers_url":"https://api.github.com/users/miguelgrinberg/followers","following_url":"https://api.github.com/users/miguelgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/miguelgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelgrinberg/subscriptions","organizations_url":"https://api.github.com/users/miguelgrinberg/orgs","repos_url":"https://api.github.com/users/miguelgrinberg/repos","events_url":"https://api.github.com/users/miguelgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/miguelgrinberg/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":3,"deletions":2,"changed_files":1}}