Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Removing 'search' unused query selector

Đang mở Phù hợp với người mới
#8,822 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, jekyll
Lĩnh vực
frontend, search

Hướng nghiên cứu

Trong assets/js/current-projects.js, hãy tìm hai bộ chọn #search được nêu trong issue và xóa chúng khỏi các danh sách bộ chọn. Sau đó, kiểm tra tìm kiếm ở chế độ xem desktop và mobile trên các trang Projects và Projects-Check; nếu hữu ích, hãy dùng chế độ thiết bị của Chrome DevTools cho chế độ xem mobile. Công việc được xem là hoàn tất khi tìm kiếm vẫn hoạt động ở cả hai chế độ xem trên cả hai trang.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
JavaScript
Star
364
Fork
871
Merge trung bình
4 ngày 7 giờ
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của hackforla/website

Tất cả issue của hackforla/website

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.