Skip to content

Add Insights page to participatory space admin panel#17

Draft
antopalidi wants to merge 15 commits intomainfrom
feature/insights-participatory-space
Draft

Add Insights page to participatory space admin panel#17
antopalidi wants to merge 15 commits intomainfrom
feature/insights-participatory-space

Conversation

@antopalidi
Copy link
Member

@antopalidi antopalidi commented Feb 24, 2026

🎩 What? Why?

  • Add an Insights sub-menu to each participatory space
  • Show a heatmap pivot table crossing user profile fields (gender, age, country, location, postal code) with participation metrics (participants, proposals created/supported, comments, budget votes)
  • Admins can switch metrics and swap axes via dropdowns to explore who participates and how
  • Both fields and metrics are configurable via config_accessor (insight_fields, insight_metrics)

📌 Related Issues

Fixes #14

Testing

  1. Open any Participatory Process or Assembly in admin → click Insights in the sidebar
  2. Switch metric / rows / columns via dropdowns — table updates accordingly
  3. Verify heatmap coloring, legend, "Non specified" gray cells, and empty state

📷 Screenshots

Screenshot 2026-02-26 at 16 04 29 Screenshot 2026-02-26 at 16 04 51

@antopalidi antopalidi marked this pull request as draft February 24, 2026 13:16
@antopalidi antopalidi self-assigned this Feb 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/insights-participatory-space

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Implement Phase 2 of the Insights feature:
- PivotTable value object for cross-tabulation data
- 5 metric query classes (participants, proposals created/supported, comments, budget votes)
- PivotTableBuilder service to orchestrate metric → user data → pivot table
- InsightMetrics facade reading from config_accessor registry
- Full unit test coverage (33 new specs)
@antopalidi antopalidi force-pushed the feature/insights-participatory-space branch from fb4330a to d82404c Compare February 26, 2026 15:45
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.

Create stats in a new menu for participatory spaces

1 participant