Skip to content

FIxed mobile view when searching on project page - #8781

Open
ldaws003 wants to merge 2 commits into
hackforla:gh-pagesfrom
ldaws003:mobile-view-8466
Open

ldaws003 wants to merge 2 commits into
hackforla:gh-pagesfrom
ldaws003:mobile-view-8466

Conversation

@ldaws003

@ldaws003 ldaws003 commented Sep 14, 2026

Copy link
Copy Markdown
Member

Fixes #8466

What changes did you make?

  • replaced query selector for inputEl, glassEl, closeEl with document.querySelectorAll
  • renamed inputEl to allInputEl, glassEl to allGlassEl, closeEl to allCloseEl
  • attached eventlisteners for focus and keydown events to the elements in the allInputEl array with the searchOnFocusEventHandler and the searchEnterKeyHandler callbacks respectively
  • attached eventlisteners for click events to the elements in the allGlassEl array with the searchEventHandler callback
  • attached eventlisteners for click events to the elements in the allCloseEl array with the searchCloseEventHandlercallback
  • set the searchTerm variable in searchEventHandler to e.currentTarget.value

Why did you make the changes (we will use this info to test)?

  • The original way of setting inputEl, glassEl, and closeEl had it so that it only set the events for the search form on desktop and not on mobile, making it so that the mobile search text would do the default form behavior of reloading the page
  • The searchTerm variable only retrieved the value from the desktop search bar, so setting the searchTerm to e.currentTarget.value makes it so that it would retrieve the search term from the element that originated the event which would be either mobile or desktop search bars

CodeQL Alerts

After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.

Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown

Screenshot 2024-10-28 154514

Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.

  • I have checked this PR for CodeQL alerts and none were found.
  • I found CodeQL alert(s), and (select one):
    • I have resolved the CodeQL alert(s) as noted
    • I believe the CodeQL alert(s) is a false positive (Merge Team will evaluate)
    • I have followed the Instructions below, but I am still stuck (Merge Team will evaluate)
Instructions for resolving CodeQL alerts

If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.

In general, CodeQL alerts should be resolved prior to PR reviews and merging

Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)

  • No visual changes to the website

@github-actions

Copy link
Copy Markdown

Want to review this pull request? Take a look at this documentation for a step by step guide!


From your project repository, check out a new branch and test the changes.

git checkout -b ldaws003-mobile-view-8466 gh-pages
git pull https://github.com/ldaws003/website.git mobile-view-8466

@github-actions github-actions Bot added role: front end Tasks for front end developers Complexity: Large Feature: Refactor CSS Page is working fine - CSS needs changes to become consistent with other pages P-Feature: Projects page https://www.hackforla.org/projects/ Feature: Refactor HTML size: 2pt Can be done in 7-12 hours HLC: M Homepage Launch Countdown Must Have labels Sep 14, 2026
@castillios
castillios self-requested a review September 15, 2026 04:11
@castillios

Copy link
Copy Markdown
Member

Availability: Tues 9/15 2pm-6pm, Thurs 9/17 & Fri 9/18 1pm-6pm
ETA: By Fri 9/18 EOD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Large Feature: Refactor CSS Page is working fine - CSS needs changes to become consistent with other pages Feature: Refactor HTML HLC: M Homepage Launch Countdown Must Have P-Feature: Projects page https://www.hackforla.org/projects/ role: front end Tasks for front end developers size: 2pt Can be done in 7-12 hours

Projects

Status: PR Needs review

Development

Successfully merging this pull request may close these issues.

Mobile View: Page Reset and Filter Bar Closing After Search

2 participants