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

Set up framework for UI filters, add Performer filter #122

Merged
merged 12 commits into from
Dec 7, 2022

Conversation

mvandenburgh
Copy link
Member

No description provided.

Comment on lines +65 to +67
overview["performers"] = SiteEvaluation.objects.values_list(
"configuration__performer__slug", flat=True
).distinct()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - this adds another field, "performers", to the response of this endpoint. It's a list of every performer in the system, regardless of the filters and/or pagination applied to the site evaluations themselves. I'm torn on if this is correct, or if it should be its own endpoint, but we need some way for the frontend to know every possible performer.

plugins: [],
plugins: [require("daisyui")],
daisyui: {
themes: ['lofi'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't put too much thought into this theme, but it seemed to match the existing theme of the app the best.

Comment on lines +26 to +29
// Add any filters set in the UI
Object.entries(filters).forEach(([key, value]) => {
filter.push(["==", ["get", key], value]);
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core of the filtering framework i attempted to set up. it dynamically generates maplibre filters based on the filters object in the store. Currently, this only allows filtering by equality, which will need to be refactored when we get to filtering by ranges, etc.

@mvandenburgh mvandenburgh marked this pull request as ready for review December 6, 2022 17:34
@mvandenburgh mvandenburgh requested a review from mcovalt December 6, 2022 17:34
Copy link
Contributor

@mcovalt mcovalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks!

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.

2 participants