<commit_before>import Ember from 'ember';
import StateMapMixin from '../mixins/state-map';
import layout from '../templates/components/vertical-item';
import LinkedComponentMixin from '../mixins/linked-component-list';

const {
  Component
  } = Ember;

/**
 A vertical-item is one that intelligently removes
 its content when scrolled off the screen vertically.

 @class vertical-item
 @extends Ember.Component
 @namespace Ember
 **/
export default Component.extend(LinkedComponentMixin, StateMapMixin, {

  layout: layout,
  tagName: 'vertical-item',
  itemTagName: 'vertical-item',

  heightProperty: 'minHeight',

  attributeBindings: ['viewState'],
  classNames: ['vertical-item'],
  collection: null,

  defaultHeight: 75,
  index: null,

  radar: null,
  satellite: null,
  registerSatellite(satellite) {
    this.satellite = satellite;
  },

  _height: 0,

  didInsertElement() {
    this._super();
    this.get('radar').register(this);
  },

  willInsertElement() {
    this._super();
    let _height = this.get('_height');
    let heightProp = this.get('heightProperty');
    let defaultHeight = this.get('defaultHeight');
    if (typeof defaultHeight === 'number') {
      defaultHeight += 'px';
    }

    this.element.style.visibility = 'hidden';
    this.element.style[heightProp] = _height ? _height + 'px' : defaultHeight;
  },

  willDestroyElement() {
    this._super();
    this._ov_teardown();
    this.set('viewState', 'culled');
    this.get('radar').unregister(this);
  },

  willDestroy() {
    this._super();
    this.collection.unregister(this);
  },

  init() {
    this._super();

    let tag = this.get('itemTagName');
    this.set('tagName', tag);
    tag = tag.toLowerCase();

    let isTableChild = tag === 'tr' || tag === 'td' || tag === 'th';
    // table children don't respect min-height :'(
    this.heightProperty = isTableChild ? 'height' : 'minHeight';
    this.collection.register(this);
  }

});<commit_msg>removes attribute binding and fixes super usage<commit_after>import Ember from 'ember';
import StateMapMixin from '../mixins/state-map';
import layout from '../templates/components/vertical-item';
import LinkedComponentMixin from '../mixins/linked-component-list';

const {
  Component
  } = Ember;

/**
 A vertical-item is one that intelligently removes
 its content when scrolled off the screen vertically.

 @class vertical-item
 @extends Ember.Component
 @namespace Ember
 **/
export default Component.extend(LinkedComponentMixin, StateMapMixin, {

  layout: layout,
  tagName: 'vertical-item',
  itemTagName: 'vertical-item',

  heightProperty: 'minHeight',

//  attributeBindings: ['viewState'],
  classNames: ['vertical-item'],
  collection: null,

  defaultHeight: 75,
  index: null,

  radar: null,
  satellite: null,
  registerSatellite(satellite) {
    this.satellite = satellite;
  },

  _height: 0,

  didInsertElement() {
    this._super();
    this.get('radar').register(this);
  },

  willInsertElement() {
    this._super();
    let _height = this.get('_height');
    let heightProp = this.get('heightProperty');
    let defaultHeight = this.get('defaultHeight');
    if (typeof defaultHeight === 'number') {
      defaultHeight += 'px';
    }

    this.element.style.visibility = 'hidden';
    this.element.style[heightProp] = _height ? _height + 'px' : defaultHeight;
  },

  willDestroyElement() {
    this._super();
    this._ov_teardown();
    this.set('viewState', 'culled');
    this.get('radar').unregister(this);
  },

  willDestroy() {
    this._super();
    this.collection.unregister(this);
  },

  init() {
    this._super(...arguments);

    let tag = this.get('itemTagName');
    this.set('tagName', tag);
    tag = tag.toLowerCase();

    let isTableChild = tag === 'tr' || tag === 'td' || tag === 'th';
    // table children don't respect min-height :'(
    this.heightProperty = isTableChild ? 'height' : 'minHeight';
    this.collection.register(this);
  }

});
{'fraction_non_alphanumeric': 0.15331981753674606, 'fraction_numerical': 0.0015205271160669033, 'mean_word_length': 3.6544811320754715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4491381', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1202, 'n_words': 274}