Skip to content

fix: lyon survey post submit duplicate message#981

Merged
moustachu merged 19 commits into
developfrom
fix/lyon_survey_post_submit_duplicate_message_v2
May 13, 2026
Merged

fix: lyon survey post submit duplicate message#981
moustachu merged 19 commits into
developfrom
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?.

Override 'app/cells/decidim/data_consent/category.erb' and upgrade h3 -> span to fix an accessility test.

Upgrade a test who failed

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
@BarbaraOliveira13 BarbaraOliveira13 marked this pull request as ready for review May 5, 2026 13:20
Copy link
Copy Markdown
Contributor

@Stef-Rousset Stef-Rousset left a comment

Choose a reason for hiding this comment

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

Hello @BarbaraOliveira13 , thanks for your PR, it works well !!

I have some suggestions on the modified files:

  • for the modification of CI, we should talk with @moustachu , to make a choice between using the github action or install the latest stable of chrome.
  • for the override of the category cell, I think it would be relevant to explain in the description the reason of the override and the line(s) updated
  • for the participatory_process_show_spec.rb test, I think it would be interesting to refactor the checks for inert and aria-expanded values with the have_css helper.‎

Removed chrome_version input and related installation steps.
Copy link
Copy Markdown
Contributor

@Stef-Rousset Stef-Rousset left a comment

Choose a reason for hiding this comment

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

LGTM !

@moustachu moustachu merged commit a29526d into develop May 13, 2026
10 checks passed
@moustachu moustachu deleted the fix/lyon_survey_post_submit_duplicate_message_v2 branch May 13, 2026 22:15
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.

3 participants