Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

site: small interaction bugs — sticky filter bar covers 28% of a desktop viewport; arrow keys push history; hash navigation wipes typing; no cap on `q`

已關閉
#157 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
68/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript
領域
frontend

研究方向

Start with site/public/app.js for chip keyboard handling, popstate behavior, and the existing is-collapsed machinery; check site/public/styles.css for sticky controls and anchor offsets. Read site/lib/search.mjs for query parsing and inspect how input updates the URL. Done when the bar is under 100 px on desktop, arrowing across chips adds at most one history entry, hash navigation preserves typing, and q is bounded.

由索引模型根據 Issue 內容生成。

描述

bug priority: low

Why it matters

Each one breaks a small expectation: a quarter of the screen should not be a permanent control panel, Back should undo a choice rather than every key press, typing should never be erased, and the URL should not grow without bound.

Evidence (at 69387df, local build)

  • .controls { position: sticky; top: 0 } (site/public/styles.css:297-299). At 1440x900 while scrolled into the catalog the bar is 252 px tall (283 px with an active-filter row), and --sticky-h drives scroll-margin-top (styles.css:1109), so anchor jumps ("Show all", chip links) land 300 px down.
  • site/public/app.js:231-242 keydown handler calls apply({ push: true }) per arrow press: 5 ArrowRight presses -> history.length +5.
  • app.js:693-697 popstate handler runs readUrl(); syncControls(); apply() on every popstate, which also fires on hash-only navigation (topnav #stacks, #catalog): type "ken" then click #stacks within the 120 ms debounce -> the search input is emptied.
  • site/lib/search.mjs:117 if (p.has("q")) state.q = p.get("q") has no cap; a 4000-character query produced a 4 KB URL and a 4 KB active-filter chip.

Suggested approach

Collapse the controls to one row (search, active chips, a "Filters" disclosure) once scrolled past, using the existing is-collapsed machinery (app.js:773-780) driven by an IntersectionObserver, or make only the search row sticky. Arrows -> apply() (replace) and push only on click/Enter/Space. In popstate, return early when location.search equals the query string last written by writeUrl. Clamp q to about 200 characters in readState and on input.

Done when

The stuck bar is under 100 px on desktop; arrowing across all chips adds at most one history entry; hash navigation never changes the search box; q is bounded.

主要語言
JavaScript
星號
58
分支
15
平均合併
16 小時 53 分鐘
30 天內合併 PR
14

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/Free-Game-Dev-Assets 的其他 Issue

查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。