This repository has been archived by the owner. It is now read-only.

Sticky projects #246

merged 1 commit into from Mar 9, 2018


None yet
2 participants

simurai commented Mar 9, 2018

@simurai simurai added this to the 1.26 milestone Mar 9, 2018

@simurai simurai merged commit aea87c2 into master Mar 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@simurai simurai deleted the sm-sticky-projects branch Mar 9, 2018


This comment has been minimized.


UziTech commented Mar 19, 2018

This introduces an unintended side affect.

When the auto reveal setting is checked in tree-view and the file is under the sticky header it is not revealed



This comment has been minimized.


UziTech commented Mar 19, 2018

it looks like the problem is that the tree-view's scrollToEntry function uses scrollIntoViewIfNeeded which doesn't make sure the element isn't hidden by the sticky header

  scrollToEntry: (entry, center=true) ->
    element = if entry?.classList.contains('directory') then entry.header else entry

@UziTech UziTech referenced this pull request Mar 19, 2018


sticky tree-view header hides selected file #249

1 of 1 task complete

This comment has been minimized.


simurai commented Mar 27, 2018

Ohh.. I see, scrollIntoViewIfNeeded doesn't know anything about the sticky elements and thinks the revealed item is still visible.

There would be a CSS fix, found here:

.tree-view {
  // Fix sticky header from covering auto-revealed items
  .list-item.selected {
    padding-top: @ui-tab-height; // 30px
    margin-top: -@ui-tab-height; // -30px


I guess the negative margin tricks scrollIntoViewIfNeeded into thinking it's already out of view and the padding just pushes the content down. Not sure if that has other side effects? 🙈

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.