<commit_before>import { action } from '@ember/object';
import CardManipulator from "./card-manipulator";

export default class CardCreator extends CardManipulator {
  constructor(...args) {
    super(...args);

    let defaultCardId = `new-card-${Math.floor(Math.random() * 1E7)}`;

    this.updateCardId(defaultCardId);
    this.cardId = defaultCardId;
  }

  @action
  updateCardId(id) {
    let newCard = this.data.createCard(`local-hub::${id}`, this.args.adoptedFrom);
    if (this.card) {
      for (let field of this.card.fields.filter(i => !i.isAdopted)) {
        newCard.addField(field);
      }
    }
    this.card = newCard;
  }
}<commit_msg>Reminder to remove `hide-in-percy` selectors when appropriate<commit_after>import { action } from '@ember/object';
import CardManipulator from "./card-manipulator";

export default class CardCreator extends CardManipulator {
  constructor(...args) {
    super(...args);

    /*
      Remove `hide-in-percy` css selectors from places
      where we display card IDs once we remove this
    */
    let defaultCardId = `new-card-${Math.floor(Math.random() * 1E7)}`;

    this.updateCardId(defaultCardId);
    this.cardId = defaultCardId;
  }

  @action
  updateCardId(id) {
    let newCard = this.data.createCard(`local-hub::${id}`, this.args.adoptedFrom);
    if (this.card) {
      for (let field of this.card.fields.filter(i => !i.isAdopted)) {
        newCard.addField(field);
      }
    }
    this.card = newCard;
  }
}
{'fraction_non_alphanumeric': 0.14508474576271185, 'fraction_numerical': 0.002711864406779661, 'mean_word_length': 3.1931818181818183, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2552040', 'n_tokens_mistral': 504, 'n_tokens_neox': 493, 'n_words': 101}