Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update querystring format so param ordering doesn't matter #210

Closed
Tracked by #63
avaleske opened this issue Jul 16, 2021 · 2 comments
Closed
Tracked by #63

Update querystring format so param ordering doesn't matter #210

avaleske opened this issue Jul 16, 2021 · 2 comments
Labels
epic: filtering Tickets related to Filtering size: 5 A few days of work
Milestone

Comments

@avaleske
Copy link

avaleske commented Jul 16, 2021

Blocked by question to Sean.

Right now, the filtering querystring is brittle. The backend breaks if we pass urls like /listings?filter[$comparison]=>&filter[depositMin]=500&filter[$comparison]=<>&filter[name]=Coliseum&filter[$comparison]=<&filter[depositMin]=900 because fields with the same name get grouped into an array, so the resulting filter object is

{$comparison: ['>', '<>', '<'], depositMin: ['500', '900'], name: 'Coliseum'}

which will not be iterated over the same way the comparisons were specified.

Additionally, if the $comparison param is not specified first, addFilter() breaks entirely.

Sean mentions here that they're open to changing the query string format, and adds some ideas on how we might do that.

Ideally, it's to something that let's us pair a field with a comparison type directly, instead trying to do so by keeping params in a certain order.

@avaleske avaleske mentioned this issue Jul 16, 2021
35 tasks
@github-actions github-actions bot added this to Needs triage in Backlog-Sprint Jul 16, 2021
@github-actions github-actions bot added this to Triage in Milestones Jul 16, 2021
@avaleske avaleske added epic: filtering Tickets related to Filtering size: 5 A few days of work labels Jul 16, 2021
@avaleske avaleske moved this from Needs triage to Backlog: sized in Backlog-Sprint Jul 16, 2021
@willrlin willrlin added the blocked by question Work is blocked by an open question label Jul 28, 2021
@willrlin willrlin moved this from Triage to M11 in Milestones Jul 28, 2021
@github-actions github-actions bot added the M11 label Jul 28, 2021
@willrlin willrlin added this to the M11 milestone Jul 28, 2021
@avaleske avaleske removed the blocked by question Work is blocked by an open question label Aug 3, 2021
@willrlin
Copy link

@seanmalbert said there was some work being done to clean up filtering; I think it's possible that fixes this issue as well.

@willrlin willrlin added the blocked by question Work is blocked by an open question label Sep 1, 2021
@willrlin willrlin removed the blocked by question Work is blocked by an open question label Sep 14, 2021
@willrlin
Copy link

I think this is fixed now by the upstream merge. @avaleske, reopen if not.

Backlog-Sprint automation moved this from Backlog: sized to Closed Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic: filtering Tickets related to Filtering size: 5 A few days of work
Projects
Development

No branches or pull requests

2 participants