Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Removing 'search' unused query selector

Aperta Adatta ai principianti
#8,822 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, jekyll
Ambito
frontend, search

Direzione di ricerca

In assets/js/current-projects.js, individua i due selettori #search menzionati nell’issue e rimuovili dagli elenchi dei selettori. Poi prova le ricerche nelle viste desktop e mobile delle pagine Projects e Projects-Check; se può essere utile, usa la modalità dispositivo di Chrome DevTools per la vista mobile. Il lavoro è completato quando le ricerche continuano a funzionare in entrambe le viste su entrambe le pagine.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Complexity: Small non-PR contribution P-Feature: Projects page ready for merge team role: back end/devOps size: 0.25pt
Prerequisite
  1. Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our Getting Started page and attend an onboarding session.
  2. Before you claim or start working on an issue, please make sure you have read our How to Contribute to Hack for LA Guide.
Overview

We need to remove query selectors for 'search' since there is no existing id for 'search' in '_includes/current-projects.html'

Action Items
  • Locate the 2 instances of 'document.querySelector('#search')' in 'assets/js/current-projects.js'

  • Make the following revisions to 'assets/js/current-projects.js'
    Before:

    const allInputEl = Array.from(document.querySelectorAll('#search-desktop, #search-mobile, #search'));
    

    After removing #search:

    const allInputEl = Array.from(document.querySelectorAll('#search-desktop, #search-mobile'));
    

    Before:

    function searchCloseEventHandler(e){
        e.preventDefault();
        const input = document.querySelector('#search-desktop') || document.querySelector('#search-mobile') || document.querySelector('#search');
        if (input) input.value="";
    }
    

    After removing document.querySelector('#search'):

    function searchCloseEventHandler(e){
        e.preventDefault();
        const input = document.querySelector('#search-desktop') || document.querySelector('#search-mobile');
        if (input) input.value="";
    }
    
  • Test and verify that the changes still work by performing a search in both mobile and desktop views on the Projects and Projects-Check pages

Resources/Instructions
Lingua principale
JavaScript
Stelle
364
Fork
871
Merge medio
4g 7h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hackforla/website

Tutte le issue di hackforla/website

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.