{"push_id":1057252015,"size":4,"distinct_size":3,"ref":"refs/heads/274-excerpt-overflow-checking","head":"928da5d798972f196f0599c44c816d4167006e13","before":"20bc945ad585d21fee0d5ef803ca7d6557c7ddf0","commits":[{"sha":"7aaf99d9f7909539e15b8bdc158251aba3e487c4","author":{"email":"7d6396062c1c37a442c1ee8b1a738cb51dc63065@gmail.com","name":"Robert Knight"},"message":"Release version 0.17.0","distinct":false,"url":"https://api.github.com/repos/hypothesis/h/commits/7aaf99d9f7909539e15b8bdc158251aba3e487c4"},{"sha":"2b3ac4d3a544a07adf3d284fb7bd3c68298dc2df","author":{"email":"7d6396062c1c37a442c1ee8b1a738cb51dc63065@gmail.com","name":"Robert Knight"},"message":"Use data-in, events-out pattern for <markdown> component\n\nThis simplifies the implementation of the <markdown> component slightly,\nmakes it possible for it to render synchronously since the input is\navailable when the component's link() function runs, and makes it\nconsistent with other recently written components.","distinct":true,"url":"https://api.github.com/repos/hypothesis/h/commits/2b3ac4d3a544a07adf3d284fb7bd3c68298dc2df"},{"sha":"ceeb43d7411c1dea0b87fc82c296335f0599879b","author":{"email":"7d6396062c1c37a442c1ee8b1a738cb51dc63065@gmail.com","name":"Robert Knight"},"message":"Re-implement excerpt overflow state recalculation\n\nPreviously the overflowing state of the excerpt was computed implicitly\nby the overflowing() method, which was called from several other\ncontroller functions.\n\nThere were several problems with this approach:\n\n 1. Since this method calls Element.scrollHeight, it triggered an\n    expensive synchronous layout flush.\n 2. In certain situations, this could trigger a loop where the\n    overflowing flag was continually flipped (see #2960)\n 3  It was unpredictable when the overflowing state would be recomputed.\n\nThis commit instead opts for a different approach which is more explicit\nabout when the state is recomputed, based on the assumption that the\n<excerpt>'s content size is a function of:\n\n 1. The inputs to the <excerpt>'s content (eg. the text of a quote, the body\n    of an annotation)\n 2. The sidebar window's size\n 3. The dimensions of any embedded media\n\nThe content size is then computed and updated as follows:\n\n 1. When the <excerpt> is initially created, an async computation of\n    the scrollHeight is scheduled. The calculation unfortunately needs\n    to be async because the content may contain Angular directives which\n    take several $digest cycles to fully process.\n\n 2. The <excerpt> listens for changes to the content's data (via a\n    'contentData' property), media 'load' events and window 'resize'\n    events and recomputes the overflow state in response to any of\n    these.\n\nFixes #2960","distinct":true,"url":"https://api.github.com/repos/hypothesis/h/commits/ceeb43d7411c1dea0b87fc82c296335f0599879b"},{"sha":"928da5d798972f196f0599c44c816d4167006e13","author":{"email":"7d6396062c1c37a442c1ee8b1a738cb51dc63065@gmail.com","name":"Robert Knight"},"message":"Defer <excerpt> overflow status check until element enters viewport\n\nChecking whether the content of an <excerpt> overflows the collapsed\nheight requires accessing the scrollHeight of an element, which\ntriggers a synchronous layout.\n\nTo avoid such checks for elements which are not visible on screen,\ndefer them until the element is scrolled into view.","distinct":true,"url":"https://api.github.com/repos/hypothesis/h/commits/928da5d798972f196f0599c44c816d4167006e13"}]}