HackIllinois / HackIllinois/admin-site
Sync filters on Users page with query parameters
@akankshapanda is already working on this.
Since Dec 4, 2020.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 1
- Avg merge
- 22m
- Merged PRs (30d)
- 3
Description
Desired functionality: If you go to /users and add a filter for Graduation Year: 2023, then the URL should update to /users?graduationYear=2023. Similarly, if you navigate directly to the URL /users?graduationYear=2023, then the corresponding filter should automatically be applied. This is to allow easy sharing of specific views of the data.
Note that multiple filters can be applied for the same key, which should translate to multiple query parametes, i.e. /users?school=illinois&school=urbana. This doesn't need to be supported for now, but just mentioning it so that the format is flexible enough to support this in the future (basically we don't want to use an object that looks like { school: "illinois" } at any point in the conversion from filters to query parameters, instead maybe { school: ["illinois"] } or [{ school: "illinois" }] or something similar).
In addition to simple key=value filtering, we also support additional options including Multiple, Exact, and Invert, but these also don't need to be supported for now.
Feel free to add any packages to help with this such as https://www.npmjs.com/package/query-string
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.