<commit_before><script>
  import { __ } from '~/locale';
  /**
   * Port of detail_behavior expand button.
   *
   * @example
   * <expand-button>
   *   <template slot="expanded">
   *      Text goes here.
   *    </template>
   * </expand-button>
   */
  export default {
    name: 'expandButton',
    data() {
      return {
        isCollapsed: true,
      };
    },
    computed: {
      ariaLabel() {
        return __('Click to expand text');
      },
    },
    methods: {
      onClick() {
        this.isCollapsed = !this.isCollapsed;
      },
    },
  };
</script>
<template>
  <span>
    <button
      type="button"
      v-show="isCollapsed"
      class="text-expander btn-blank"
      aria-label="Click to Expand Text"
      @click="onClick">
      ...
    </button>
    <span v-show="!isCollapsed">
      <slot name="expanded"></slot>
    </span>
  </span>
</template><commit_msg>Use computed prop in expand button<commit_after><script>
  import { __ } from '~/locale';
  /**
   * Port of detail_behavior expand button.
   *
   * @example
   * <expand-button>
   *   <template slot="expanded">
   *      Text goes here.
   *    </template>
   * </expand-button>
   */
  export default {
    name: 'expandButton',
    data() {
      return {
        isCollapsed: true,
      };
    },
    computed: {
      ariaLabel() {
        return __('Click to expand text');
      },
    },
    methods: {
      onClick() {
        this.isCollapsed = !this.isCollapsed;
      },
    },
  };
</script>
<template>
  <span>
    <button
      type="button"
      v-show="isCollapsed"
      class="text-expander btn-blank"
      :aria-label="ariaLabel"
      @click="onClick">
      ...
    </button>
    <span v-show="!isCollapsed">
      <slot name="expanded"></slot>
    </span>
  </span>
</template>
{'fraction_non_alphanumeric': 0.16379789006107717, 'fraction_numerical': 0.0, 'mean_word_length': 1.9300813008130082, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '5043064', 'n_tokens_mistral': 599, 'n_tokens_neox': 598, 'n_words': 117}