<commit_before><template>
  <article id="artistInfo" :class="mode">
    <h1 class="name">
      <span>{{ artist.name }}</span>

      <a class="shuffle" @click.prevent="shuffleAll"><i class="fa fa-random"></i></a>
    </h1>

    <div v-if="artist.info">
      <img v-if="artist.info.image" :src="artist.info.image"
        title="They see me posin, they hatin"
        class="cool-guys-posing cover">

      <div class="bio" v-if="artist.info.bio.summary">
        <div class="summary" v-show="mode !== 'full' && !showingFullBio" v-html="artist.info.bio.summary"/>
        <div class="full" v-show="mode === 'full' || showingFullBio" v-html="artist.info.bio.full"/>

        <button class="more" v-show="mode !== 'full' && !showingFullBio"
          @click.prevent="showingFullBio = !showingFullBio">
          Full Bio
        </button>
      </div>
      <p class="none" v-else>This artist has no Last.fm biography – yet.</p>

      <footer>Data &copy; <a target="_blank" :href="artist.info.url">Last.fm</a></footer>
    </div>

    <p class="none" v-else>Nothing can be found. This artist is a mystery.</p>
  </article>
</template>

<script>
import { playback } from '../../../services';

export default {
  props: ['artist', 'mode'],

  data() {
    return {
      showingFullBio: false,
    };
  },

  watch: {
    artist() {
      this.showingFullBio = false;
    },
  },

  methods: {
    /**
     * Shuffle all songs performed by the current song's artist.
     */
    shuffleAll() {
      playback.playAllByArtist(this.artist);
    },
  },
};
</script>

<style lang="sass">
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";

#artistInfo {
  @include artist-album-info();
}
</style><commit_msg>Use computed for bio panel<commit_after><template>
  <article id="artistInfo" :class="mode">
    <h1 class="name">
      <span>{{ artist.name }}</span>

      <a class="shuffle" @click.prevent="shuffleAll"><i class="fa fa-random"></i></a>
    </h1>

    <div v-if="artist.info">
      <img v-if="artist.info.image" :src="artist.info.image"
        title="They see me posin, they hatin"
        class="cool-guys-posing cover">

      <div class="bio" v-if="artist.info.bio.summary">
        <div class="summary" v-show="showSummary" v-html="artist.info.bio.summary"/>
        <div class="full" v-show="showFull" v-html="artist.info.bio.full"/>

        <button class="more" v-show="showSummary" @click.prevent="showingFullBio = true">
          Full Bio
        </button>
      </div>
      <p class="none" v-else>This artist has no Last.fm biography – yet.</p>

      <footer>Data &copy; <a target="_blank" :href="artist.info.url">Last.fm</a></footer>
    </div>

    <p class="none" v-else>Nothing can be found. This artist is a mystery.</p>
  </article>
</template>

<script>
import { playback } from '../../../services';

export default {
  props: ['artist', 'mode'],

  data() {
    return {
      showingFullBio: false,
    };
  },

  watch: {
    artist() {
      this.showingFullBio = false;
    },
  },

  computed: {
    showSummary() {
      return this.mode !== 'full' && !this.showingFullBio;
    },

    showFull() {
      return this.mode === 'full' || this.showingFullBio;
    }
  },

  methods: {
    /**
     * Shuffle all songs performed by the current song's artist.
     */
    shuffleAll() {
      playback.playAllByArtist(this.artist);
    },
  },
};
</script>

<style lang="sass">
@import "../../../../sass/partials/_vars.scss";
@import "../../../../sass/partials/_mixins.scss";

#artistInfo {
  @include artist-album-info();
}
</style>
{'fraction_non_alphanumeric': 0.20171792740371294, 'fraction_numerical': 0.0011083402604599613, 'mean_word_length': 2.661257606490872, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '6816100', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1244, 'n_words': 256}