rule = $(e.currentTarget).data 'rule'
@header.filterLines e, 'filterByRule', rule
@state.set 'activeHeaderItem', ".js-filter-rule[data-rule='#{rule}']"
+ setTimeout (=> @scrollToRule rule), 0
filterByBlockerIssues: (e) ->
@state.set 'activeHeaderItem', '.js-filter-INFO-issues'
+ scrollToRule: (rule) ->
+ ruleEl = @$('.js-filter-rule').filter("[data-rule=\"#{rule}\"]")
+ container = ruleEl.closest '.component-viewer-header-expanded-bar-section-list'
+ topOffset = ruleEl.offset().top - container.offset().top
+ if topOffset > container.height()
+ container.scrollTop topOffset
+
+
serializeData: ->
_.extend super,
period: @state.get('period')?.toJSON()