<commit_before>BlazeComponent.extendComponent({
  onCreated() {
    this.term = new ReactiveVar('');
  },

  cards() {
    const currentBoard = Boards.findOne(Session.get('currentBoard'));
    return currentBoard.searchCards(this.term.get());
  },

  lists() {
    const currentBoard = Boards.findOne(Session.get('currentBoard'));
    return currentBoard.searchLists(this.term.get());
  },

  clickOnMiniCard(evt) {
    evt.preventDefault();
    Session.set('popupCard', this.currentData()._id);
    this.cardDetailsPopup(evt);
  },

  cardDetailsPopup(event) {
    if (!Popup.isOpen()) {
      Popup.open("cardDetails")(event);
    }
  },

  events() {
    return [
      {
        'click .js-minicard': this.clickOnMiniCard,
        'submit .js-search-term-form'(evt) {
          evt.preventDefault();
          this.term.set(evt.target.searchTerm.value);
        },
      },
    ];
  },
}).register('searchSidebar');<commit_msg>Sidebar search only opens the card as popup on mobile view<commit_after>BlazeComponent.extendComponent({
  onCreated() {
    this.term = new ReactiveVar('');
  },

  cards() {
    const currentBoard = Boards.findOne(Session.get('currentBoard'));
    return currentBoard.searchCards(this.term.get());
  },

  lists() {
    const currentBoard = Boards.findOne(Session.get('currentBoard'));
    return currentBoard.searchLists(this.term.get());
  },

  clickOnMiniCard(evt) {
    if (Utils.isMiniScreen()) {
      evt.preventDefault();
      Session.set('popupCard', this.currentData()._id);
      this.cardDetailsPopup(evt);
    }
  },

  cardDetailsPopup(event) {
    if (!Popup.isOpen()) {
      Popup.open("cardDetails")(event);
    }
  },

  events() {
    return [
      {
        'click .js-minicard': this.clickOnMiniCard,
        'submit .js-search-term-form'(evt) {
          evt.preventDefault();
          this.term.set(evt.target.searchTerm.value);
        },
      },
    ];
  },
}).register('searchSidebar');
{'fraction_non_alphanumeric': 0.16555612506406972, 'fraction_numerical': 0.0, 'mean_word_length': 2.983673469387755, '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': '4219576', 'n_tokens_mistral': 632, 'n_tokens_neox': 642, 'n_words': 83}