<commit_before>import Ember from 'ember';

export default Ember.Component.extend({
    expanded: false,

    tags: function() {
        // remove duplicates and preserve popularity order
        let tags = this.get('game.genres') || [];
        (this.get('game.tags') || []).forEach((tag) => {
            if (tags.indexOf(tag) < 0) {
                tags.push(tag);
            }
        });
        return tags;
    }.property('genres', 'tags'),

    starClass: function() {
        return this.get('game.starred') ? 'fa-star starred' : 'fa-star-o';
    }.property('game.starred'),

    hideClass: function() {
        return this.get('game.hidden') ? 'fa-eye' : 'fa-minus-circle';
    }.property('game.hidden'),

    stateClass: function() {
        return this.get('expanded') ? 'long' : 'short';
    }.property('expanded'),

    expandClass: function() {
        return this.get('expanded') ? 'fa-angle-up' : 'fa-angle-down';
    }.property('expanded'),

    actions: {
        toggleExpand: function() {
            this.set('expanded', !this.get('expanded'));
        },

        addTag: function(tag) {
            this.sendAction('filterTag', tag);
        },

        toggleStar: function() {
            this.sendAction('toggleStar', this.get('game'));
        },

        toggleHide: function() {<commit_msg>scroll back to top of card on close expanded version<commit_after>import Ember from 'ember';

export default Ember.Component.extend({
    expanded: false,

    tags: function() {
        // remove duplicates and preserve popularity order
        let tags = this.get('game.genres') || [];
        (this.get('game.tags') || []).forEach((tag) => {
            if (tags.indexOf(tag) < 0) {
                tags.push(tag);
            }
        });
        return tags;
    }.property('genres', 'tags'),

    starClass: function() {
        return this.get('game.starred') ? 'fa-star starred' : 'fa-star-o';
    }.property('game.starred'),

    hideClass: function() {
        return this.get('game.hidden') ? 'fa-eye' : 'fa-minus-circle';
    }.property('game.hidden'),

    stateClass: function() {
        return this.get('expanded') ? 'long' : 'short';
    }.property('expanded'),

    expandClass: function() {
        return this.get('expanded') ? 'fa-angle-up' : 'fa-angle-down';
    }.property('expanded'),

    actions: {
        toggleExpand: function(appid) {
            this.set('expanded', !this.get('expanded'));
            if (!this.get('expanded')) {
                document.getElementById(`game${appid}`).scrollIntoView();
            }
        },

        addTag: function(tag) {
            this.sendAction('filterTag', tag);
        },

        toggleStar: function() {
            this.sendAction('toggleStar', this.get('game'));
        },

        toggleHide: function() {
{'fraction_non_alphanumeric': 0.17632420902950588, 'fraction_numerical': 0.0007109847138286527, 'mean_word_length': 2.2344827586206897, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6583079', 'n_tokens_mistral': 855, 'n_tokens_neox': 814, 'n_words': 160}