Skip to content

feat: add bounty amount range filter UI on bounties page#269

Open
mvanhorn wants to merge 1 commit into
algora-io:mainfrom
mvanhorn:fix/157-add-bounty-amount-range-filter-ui-on-bounties
Open

feat: add bounty amount range filter UI on bounties page#269
mvanhorn wants to merge 1 commit into
algora-io:mainfrom
mvanhorn:fix/157-add-bounty-amount-range-filter-ui-on-bounties

Conversation

@mvanhorn
Copy link
Copy Markdown

Summary

Adds a min/max bounty-amount filter to the public bounties LiveView, including the form controls, URL-param parsing, and the query-opts wiring through Algora.Bounties so the result set narrows server-side. The tech-filter param handling was unified with the new amount-range handling so the URL stays bookmarkable for any combination.

Why this matters

#157 asked for an amount filter so bounty hunters can scope to their interest band. The existing UI already supported tech filters but not amount, and the workaround was to scroll the full list.

Scope note

The diff is larger than the smallest possible "just add two inputs" because I collapsed two handle_params clauses into one parameterized implementation to make the new min/max params drop in cleanly. Happy to split into a smaller follow-up PR if you'd prefer a tighter surface area for the initial review.

Changes

  • lib/algora_web/live/bounties_live.ex - new filter UI, unified param handling, query-opts plumbing.
  • lib/algora/bounties/bounties.ex - accept :amount_min / :amount_max in the query and emit the SQL clause.
  • test/algora/bounties_test.exs - tests covering amount-range filtering with each end of the range and the combined case.

Testing

New bounty-query tests pass locally. Existing tests still pass.

Fixes #157

algora-io#157 asked for a min/max bounty-amount filter on the public bounties
list. Adds the form inputs, threads the amount range through the
query opts and into the bounties query, and unifies the existing
tech-filter param handling with the new amount-range params so the
URL stays bookmarkable.

The change to handle_params is broader than strictly necessary -
collapsing the two existing clauses into one parameterized
implementation made the new min/max params drop in cleanly. Happy
to split into separate PRs if you'd prefer a tighter diff.

Fixes algora-io#157
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Feature request: Add bounty range filter in bounties section

2 participants