Skip to content

Conversation

slamer59
Copy link
Collaborator

@slamer59 slamer59 commented Oct 2, 2025

No description provided.

… on mobile

On mobile view, when comparing two communities, the comparison table was
showing an empty state if either community had no data. This prevented
users from seeing available data for the other community.

Now the mobile view behaves like desktop:
- Shows tables independently for each community
- Only shows global empty state when both communities have no data
- Shows individual empty state per community when applicable
- Hides comparison pills (total amount/number) when only one has data
…harts

Remove the ordinate (Y-axis) from marchés publics and subventions charts:
- ComparisonChart: hide Y-axis while keeping domain and formatting
- DesktopEvolutionChart: hide Y-axis ticks and labels

This provides a cleaner chart visualization while maintaining the proper
data scaling and tooltip functionality.
- Add displayMode parameter to useChartData hook to distinguish between 'amounts' and 'counts'
- Use formatNumberInteger for counts (displays "2" instead of "0")
- Use formatMonetaryValue for amounts (displays "1,5 M€")
- Fix type conversion in mergeWithRealData to ensure year matching works correctly
- Update EvolutionChart and MobileEvolutionChart to pass displayMode

Fixes the issue where small count values (e.g., 2 contracts) were being divided
by 1000 or 1000000 for monetary formatting, resulting in 0 being displayed.
Copy link
Contributor

github-actions bot commented Oct 2, 2025

✅ Review app deployed

Check how your changes look like!

ℹ️ Name 🔗 Infos & links
🌱 Latest deployed commit 131e847
👁️ Preview https://13_eclaireur_public-PR-458.cleverapps.io

Copy link
Collaborator

@benjamin-aubron benjamin-aubron left a comment

Choose a reason for hiding this comment

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

Année 2023 à mettre en année de référence car les scores de transparence ne sont pas consolidés au delà.
Pas certains de comprendre les modifs des fichiers .py mais je te fais confiance là dessus
En tout, la carte est bien plus lisible. Good job.
Ça me semble plus pertinent de mettre le score agrégé en selection par défaut plutôt que le score MP (et ça fait écho à ce qui est fait côté fiche collectivité). Qu'en penses-tu ?

try {
const searchParams = request.nextUrl.searchParams;
const codes = searchParams.getAll('codes');
const year = searchParams.get('year') || '2024';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const year = searchParams.get('year') || '2024';
const year = searchParams.get('year') || '2023';

Les derniers scores de transparence ont été calculés sur 2023 et pas 2024. C'est pour ça qu'on a que des E sur les régions et départements (ce qui n'est pas le cas en 2023 même si ça reste pas élevé...)

try {
const body = await request.json();
const { codes } = body;
const { codes, year = 2024 } = body;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const { codes, year = 2024 } = body;
const { codes, year = 2023 } = body;

try {
const searchParams = request.nextUrl.searchParams;
const codes = searchParams.getAll('codes');
const year = searchParams.get('year') || '2024';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const year = searchParams.get('year') || '2024';
const year = searchParams.get('year') || '2023';

try {
const searchParams = request.nextUrl.searchParams;
const codes = searchParams.getAll('codes');
const year = searchParams.get('year') || '2024';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const year = searchParams.get('year') || '2024';
const year = searchParams.get('year') || '2023';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants