Skip to content

fix(issues): omit default and empty parameters on filter form submit - #726

Open
dezzy-music wants to merge 1 commit into
MergeFi:mainfrom
dezzy-music:fix/issues-filter-form-omit-defaults-701
Open

dezzy-music wants to merge 1 commit into
MergeFi:mainfrom
dezzy-music:fix/issues-filter-form-omit-defaults-701

Conversation

@dezzy-music

Copy link
Copy Markdown

Fixes #701

Summary

When submitting the GET filter form on /issues, default-valued select fields (\�ll\ / \default) and empty number inputs were unconditionally serialized into the query string, creating dirty and duplicate URLs like ?difficulty=all&asset=all&minReward=&maxReward=&sort=default\ for the default view.

Changes

  1. Created client component \IssuesFilterForm\ that disables default select options and empty inputs right before submission so the browser's native GET submission only encodes active filters, matching \�uildIssuesHref.
  2. Restores input state on the next tick (or immediately if default is prevented) to ensure form controls remain fully interactive if navigation is interrupted or restored via browser history/bfcache.
  3. Preserves full progressive enhancement: when JavaScript is disabled, the form submits standard GET parameters without disruption.
  4. Added unit test suite in \IssuesFilterForm.test.tsx\ verifying proper omission of default/empty fields and persistence of active filters.

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@dezzy-music is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The filter form submits default values, producing URLs like ?difficulty=all&asset=all&minReward=&maxReward=&sort=default

1 participant