MozillaFoundation / foundation.mozilla.org

Mozilla Foundation website
https://foundation.mozilla.org
Mozilla Public License 2.0
384 stars 153 forks source link

PNI - Clean up search filter code #8015

Open Pomax opened 2 years ago

Pomax commented 2 years ago

Follow-up to https://github.com/mozilla/foundation.mozilla.org/issues/7988

With the refactor complete, we should consolidate/optimize the search filter code as much as possible.

Dev tasks:

(to be groomed after the team has the opp to discuss and agree on approach)

┆Issue is synchronized with this Jira Task

tbrlpld commented 1 year ago

This is 100% necessary. I find it extremely hard to understand the search code.

tbrlpld commented 1 year ago

Also follow up to #9553

tbrlpld commented 1 year ago

I would like to propose to make the search a individual template fragment that can be included multiple times on a page (e.g. for mobile and desktop). We can pass an id into the fragment.

Similarly, all JS should be generic and only need the id used for the fragment to instantiate a new search bar.

mtdenton commented 9 months ago

This should belong to a PNI refactor epic.