Roadmap bug #3163 - Fix for bug "Conditional question causing plans … - #3164
Merged
briri merged 2 commits intoApr 28, 2022
Merged
Conversation
…o disappear." Cause is commit bb5941e "Added toggleable guidance/comments section" the following changes were made to file app/javascript/src/utils/sectionUpdate.js: the question containers classes were changed as follows .row -> .question-body & .col-md-8 -> .question-section: - <div class="row"> - <div class="col-md-8"> + <div class="question-body"> + <div class="question-section"> This broke the function getQuestionDiv() in app/javascript/src/utils/sectionUpdate.js. Fix for issue #3163. Changes: - in app/javascript/src/utils/sectionUpdate.js the function was updated as follows: -export const getQuestionDiv = (id) => $(`#answer-form-${id}`).closest('.row'); +export const getQuestionDiv = (id) => $(`#answer-form-${id}`).closest('.question-body');
johnpinto1
force-pushed
the
big_3163_conditional_questions_causing_plans_display_none
branch
from
April 27, 2022 15:14
ae527f1 to
e7a6d4a
Compare
briri
approved these changes
Apr 28, 2022
briri
left a comment
Contributor
There was a problem hiding this comment.
thanks for digging into this one @johnpinto1
…g_plans_display_none
briri
deleted the
big_3163_conditional_questions_causing_plans_display_none
branch
April 28, 2022 14:43
Contributor
Author
|
@briri You put me on the right track, by asking to look at the javascript. I was thinking it would have been worse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…to disappear."
Cause is commit bb5941e
"Added toggleable guidance/comments section" the following changes were made
to file app/javascript/src/utils/sectionUpdate.js:
the question containers classes were changed as follows .row -> .question-body & .col-md-8 -> .question-section:
This broke the function getQuestionDiv() in app/javascript/src/utils/sectionUpdate.js.
Fix for issue #3163.
Changes:
as follows:
I used an example we had for issue to debug and fix.
Before:
The whole Plan panel container was hidden because it was the closest div with class .row.
After
The plan container is visible with the removed question with id 6177 (as required with style="display:none").
Section removed would have displayed
