Skip to content

fix: lyon survey post submit duplicate message#981

Draft
BarbaraOliveira13 wants to merge 15 commits intodevelopfrom
fix/lyon_survey_post_submit_duplicate_message_v2
Draft

fix: lyon survey post submit duplicate message#981
BarbaraOliveira13 wants to merge 15 commits intodevelopfrom
fix/lyon_survey_post_submit_duplicate_message_v2

Conversation

@BarbaraOliveira13
Copy link
Copy Markdown
Collaborator

@BarbaraOliveira13 BarbaraOliveira13 commented Apr 28, 2026

🎩 Description

Capture d’écran 2026-04-28 à 10 39 45

BUG
After a first survey submission, an 'already answered" message was displayed simultaneously with the success flash message. It is confusing.


⚠️ This is the expected behavior by Decidim, so I updated the corresponding tests from .to have_content to .to have_no_content line 79


FIX
Override decidim survey show view to fix the UX bug, with adding a condition to hide "already answered" block when success flash message in present: [line 34] && flash[:notice].blank?.

Testing

  1. Log in as a user
  2. Go to a survey component
  3. Fill and submit the questionnaire
  4. ✅ Only the success flash message should appear
  5. Navigate back to the survey
  6. ✅ Only the "already answered" block should appear (no flash)

📌 Related Issues

[Link your PR to an issue

Tasks

  • Add specs
  • In case of new dependencies or version bump, update related documentation

🛠️ If your PR introduces or updates an Override

  • Add the label "override:pending" in your PR
  • Add the corresponding label based on the review deadline category (when this override must be checked):
    • WHEN BACKPORT 0.29 ·
    • BEFORE MIGRATION 0.31 ·
    • WAITING FOR PR UPSTREAM ·
    • OTHER
  • Add the link to the related Decidim issue or PR (if exist).

📷 Screenshots

Capture d’écran 2026-04-27 à 12 13 11

Extra information

@BarbaraOliveira13 BarbaraOliveira13 added Override:pending Override en attente de review / nettoyage Waiting for PR UPSTREAM Date / situation prévue pour re-valider la pertinence de l'override ou besoin de supprimer labels Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Override:pending Override en attente de review / nettoyage Waiting for PR UPSTREAM Date / situation prévue pour re-valider la pertinence de l'override ou besoin de supprimer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant