You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DrewML This is rad! Make a PR like this and put [WIP] in the title for now.
A couple comments:
👍 on unbinding the events. I haven't seen any errors but there might be a gotcha lurking out there.
👎 for bothering with debounce. I don't think we'll notice any performance issue with this. There's no animations or anything going on.
👍 on only painting on change. Save the file name to a var, then where you test for length test that it's not equal to the existing var. That said, this isn't a deal breaker IMO.
👍 on removing it when it's not sticky. A CSS method is .js-sticky-offset-scroll:not(.is-stuck) .diff-toolbar-filename {display:none;}
Something else, it's possible that the last file will never actually make it into the sticky bar if the file sizes are too small. You can hit the bottom before scrolling past the second to last file (see below). You might want to have the logic be "if you can't see the file show the next one, but if you're at the very bottom show the last file name". I'm not sure about this, and there are other scenarios where you can see the entirety of two files, and in that situation I don't know what's best exactly.
In this screenshot I've scrolled to the bottom of the page and see two "complete" files:
Activity
paulmolluzzo commentedon Mar 23, 2016
👍
DrewML commentedon Mar 24, 2016
Started working on this here. Working, but needs some cleanup before I submit a PR.
Todo:
paulmolluzzo commentedon Mar 24, 2016
@DrewML This is rad! Make a PR like this and put
[WIP]in the title for now.A couple comments:
.js-sticky-offset-scroll:not(.is-stuck) .diff-toolbar-filename {display:none;}Something else, it's possible that the last file will never actually make it into the sticky bar if the file sizes are too small. You can hit the bottom before scrolling past the second to last file (see below). You might want to have the logic be "if you can't see the file show the next one, but if you're at the very bottom show the last file name". I'm not sure about this, and there are other scenarios where you can see the entirety of two files, and in that situation I don't know what's best exactly.
In this screenshot I've scrolled to the bottom of the page and see two "complete" files:

DrewML commentedon Mar 24, 2016
@paulmolluzzo Appreciate the feedback - [WIP] PR opened. Will continue the discussion over there :)
hkdobrev commentedon Mar 30, 2016
Implemented in #99. Thanks @DrewML!