Skip to content

Extract survey results logic into separate SurveyResultsController#6367

Merged
ragesoss merged 1 commit into
WikiEducationFoundation:masterfrom
Abishekcs:refactor/survey-results-to-new-controller
Jun 20, 2025
Merged

Extract survey results logic into separate SurveyResultsController#6367
ragesoss merged 1 commit into
WikiEducationFoundation:masterfrom
Abishekcs:refactor/survey-results-to-new-controller

Conversation

@Abishekcs
Copy link
Copy Markdown
Contributor

@Abishekcs Abishekcs commented Jun 17, 2025

What this PR does

This PR introduces a refactor that moves the results action from SurveysController into a new SurveyResultsController. The goal is to isolate logic related to survey results, reducing complexity in the main controller and setting the stage for further enhancements (performance improvements #6329).

Screenshots

Before:

Before.mp4

After:

2025-06-18.17-00-00.mp4

@Abishekcs Abishekcs force-pushed the refactor/survey-results-to-new-controller branch from 014eb0e to dde7603 Compare June 18, 2025 09:06
@Abishekcs Abishekcs changed the title [WIP]: Extract survey results logic into separate SurveyResultsController Extract survey results logic into separate SurveyResultsController Jun 18, 2025
@Abishekcs Abishekcs marked this pull request as ready for review June 18, 2025 11:41
Comment thread app/views/layouts/survey_results.html.haml Outdated
Comment thread app/controllers/surveys_controller.rb
Comment thread app/controllers/survey_results_controller.rb Outdated
@Abishekcs
Copy link
Copy Markdown
Contributor Author

@ragesoss I’ve made the required changes. Could you please review this PR whenever you have a time? Thank you!

Comment thread app/views/survey_results/_question_group.html.haml Outdated
Comment thread app/views/survey_results/_results_admin_header.html.haml Outdated
@Abishekcs Abishekcs force-pushed the refactor/survey-results-to-new-controller branch from c9a5b82 to d1f0c1b Compare June 19, 2025 18:01
@Abishekcs
Copy link
Copy Markdown
Contributor Author

Hi @ragesoss, I've made the required changes and tried to keep them as minimal as possible. Please let me know if any further adjustments are needed. Thanks again for your helpful review!

@Abishekcs Abishekcs requested a review from ragesoss June 19, 2025 18:09
@Abishekcs
Copy link
Copy Markdown
Contributor Author

I don't think the failing test are related to the changes made in this PR. Test seems to pass locally

Screenshot from 2025-06-20 00-01-48

@ragesoss
Copy link
Copy Markdown
Member

Looks great!

@ragesoss ragesoss merged commit 7659c3b into WikiEducationFoundation:master Jun 20, 2025
1 check failed
@Abishekcs Abishekcs deleted the refactor/survey-results-to-new-controller branch June 20, 2025 16:56
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.

2 participants