<commit_before>import Ember from 'ember';
import Base from '../mixins/base';

export default Ember.Mixin.create(Base, {
  module: 'modal',
  classNames: [ 'ui', 'modal' ],
  closable: false,
  transition: 'horizontal flip',

  setup: function() {
    this.set('hiding', false);
  }.on('init'),

  showOnInsert: function() {
    this.execute('show');
  }.on('didInsertElement'),

  hideOnDestroy: function() {
    if (!this.get('hiding')) {
      this.execute('hide');
    }
  }.on('willDestroyElement'),

  onHide: function() {<commit_msg>Moved these back to didInsert and willInsert so the call order is correct The problem was it was calling execute('show') before the initialization which was messing put the scope on settings.<commit_after>import Ember from 'ember';
import Base from '../mixins/base';

export default Ember.Mixin.create(Base, {
  module: 'modal',
  classNames: [ 'ui', 'modal' ],
  closable: false,
  transition: 'horizontal flip',

  setup: function() {
    this.set('hiding', false);
  }.on('init'),

  didInsertElement: function() {
    this._super();
    this.execute('show');
  },

  willDestroyElement: function() {
    this._super();
    if (!this.get('hiding')) {
      this.execute('hide');
    }
  },

  onHide: function() {
{'fraction_non_alphanumeric': 0.16653386454183267, 'fraction_numerical': 0.0, 'mean_word_length': 3.868217054263566, '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': '4768111', 'n_tokens_mistral': 400, 'n_tokens_neox': 387, 'n_words': 106}