Skip to content

Activity filter counts#7376

Merged
carlobeltrame merged 12 commits intoecamp:develfrom
carlobeltrame:activity-filter-counts
May 8, 2025
Merged

Activity filter counts#7376
carlobeltrame merged 12 commits intoecamp:develfrom
carlobeltrame:activity-filter-counts

Conversation

@carlobeltrame
Copy link
Member

@carlobeltrame carlobeltrame commented May 6, 2025

Adds counters indicating the number of results belonging to each filter option.
The counters adapt when more filters are added.
There is some complexity due to the different filter behaviours (AND vs OR, exclusive none, single vs. multiple), but I think I got the most intuitive version down for each filter.
Works both on the dashboard and on the picasso.

Also fixes #4951, and I moved the filtering logic to common, because of the following feature request: "Druckfilter (z.B. nur Blöcke wo ich Verantwortlich bin)". This PR is incidentally a first step in this direction.

image

@carlobeltrame carlobeltrame requested a review from a team May 6, 2025 20:17
@carlobeltrame carlobeltrame force-pushed the activity-filter-counts branch from f890b7f to 5d3af14 Compare May 6, 2025 20:20
@manuelmeister manuelmeister added the deploy! Creates a feature branch deployment for this PR label May 6, 2025
@github-actions
Copy link

github-actions bot commented May 6, 2025

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

Copy link
Member

@pmattmann pmattmann left a comment

Choose a reason for hiding this comment

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

🤩
only minor details

@carlobeltrame carlobeltrame requested a review from a team May 7, 2025 18:56
Copy link
Member

@manuelmeister manuelmeister left a comment

Choose a reason for hiding this comment

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

Nice! Good idea
I'm not sure about the visual design.

Maybe this could be "decluttered" with some minor visual clues:
Bildschirmfoto 2025-05-07 um 22 14 21
But I can test this in a separate PR.

@carlobeltrame carlobeltrame force-pushed the activity-filter-counts branch from 0ef6eb3 to 1a082dc Compare May 8, 2025 06:07
@carlobeltrame
Copy link
Member Author

@manuelmeister

Maybe this could be "decluttered" with some minor visual clues

Your version looks so much better! I tried to replicate it. I didn't manage to get a satisfying border, I had to use !important because vuetify 2 does not allow to set the text color (as opposed to vuetify 3), and I duplicated the same styles in the two filter components... Not sure how you usually handle things like this, would this already go into a global css file now?

Anyways, have a look and feel free to improve the CSS or merge if ready.

@manuelmeister
Copy link
Member

@carlobeltrame can you have a look at it again? I tried to solve it using a component.

carlobeltrame and others added 12 commits May 8, 2025 23:11
This is in anticipation of being able to use the same filtering logic in
the prints in the future, e.g. to filter the printed schedule entries in
a camp programme.
We ignore the error case when the filter object contains something other
than an array in the responsible key for now. Since it throws an error,
this should quickly surface during development if anyone uses it
wrongly, or at least we will see it in sentry.
@carlobeltrame carlobeltrame force-pushed the activity-filter-counts branch from 2b825cf to a0ff737 Compare May 8, 2025 21:11
@carlobeltrame carlobeltrame enabled auto-merge May 8, 2025 21:12
@carlobeltrame carlobeltrame added this pull request to the merge queue May 8, 2025
Merged via the queue into ecamp:devel with commit ff4b189 May 8, 2025
30 checks passed
@carlobeltrame carlobeltrame deleted the activity-filter-counts branch May 8, 2025 21:20
@carlobeltrame carlobeltrame mentioned this pull request Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy! Creates a feature branch deployment for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share filter logic between Picasso and Dashboard

3 participants