-
Notifications
You must be signed in to change notification settings - Fork 60
OC-1387 Always show tooltips feedback if tips are present. #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
56e3ed7 to
0e719bd
Compare
| ) | ||
|
|
||
| mcq_template = """ | ||
| <problem-builder mode="{{mode}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unrelated, but made CircleCi tests to fail (strangely it passed on my system) --- {{ is actually an escape sequence that means { in str.format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think these were originally copied from a django template. Not sure why they worked before this change.
Incidentally, the mode parameter is deprecated, and we will eventually remove support for it.
|
Tested and it works well, but I had some questions and think we need a bit more test coverage. |
| <pb-choice value="understand">I don't understand</pb-choice> | ||
|
|
||
| <pb-tip values='["yes"]'>Great!</pb-tip> | ||
| <pb-tip values='["maybenot"]'>Ah, damn.</pb-tip> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two were removed on purpose. To test questionaire I needed to have options with tooltips and without them. So I removed tooltips from selected choices. Other tests seem to be not affected.
|
@jbzdak Just had two minor notes. Also apparently this needs a rebase now :/ Please address those last two little things and rebase. I'll test the rebased version one last time and give you +1. |
3e001da to
83cbc5b
Compare
|
|
||
| def _feedback_customized_checks(self, answer, mcq, mrq, rating, messages): | ||
| # Long answer: Previous answer and feedback visible | ||
| self.scroll_to(answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated tests failed locally, as there were trying to click on invisible elements, this fixed the issue for me, we can either leave it for the merit of making tests more robust, or just remove.
Really I feel that selenium should be doing this scrolling, but apparently it isn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbzdak Selenium should be doing this scrolling - is it possible that the elements in question were just hidden (in the process of becoming visible), and this scroll_to has a side effect of fixing it since it acts as a short delay?
These scroll_to calls seem very hacky, and I'd rather find a more direct way of addressing the problem.
Please try this way of fixing it instead (which is a nice cleanup, if it works): 351705c
|
@jbzdak The problem with the currently-failing tests is ultimately caused by the fact that you are calling All you need to do to fix the issue is replace: self.reload_student_view()
mentoring = self.load_scenario(scenario)with mentoring = self.reload_student_view() |
|
|
||
| var messageView = MessageView(element, mentoring); | ||
|
|
||
| if (result.message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic used to display message was changed, so take a second glance here (it works as before). I just wanted you to know that there are new changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - looks good.
|
Looking good! I just want a cleaner fix for those tests - I provided a suggestion that may do the trick. Then this will be good to go. |
|
@bradenmacdonald I have integrated your fix, and everything works fine now. |
|
👍 |
|
Thanks! Merging I'll squash the commits |
85a9fc4 to
09af7fb
Compare
OC-1387 Always show tooltips feedback if tips are present.
Testing instructions:
Problem Builder
MRQ
Create following MRQ block, and verify that behavior is unchanged:
1.That when you create submit you get question feedback: "Thank you for answering!"
2. And after clicking check-mark you get tooltip.
MCQ
Create following MCQ block, and verify that behavior is changed.
Step Builder
It is not affected AFAIK, as doesn't display tooltips at all, and can optionally display question level feedback messages (on the review block).