Skip to content

OC-1441 PR with a proper solution - #114

Closed
jbzdak wants to merge 16 commits into
jbzdak/oc-1441/detach-step-dom-elementsfrom
jbzdak/oc-1441/detach-step-dom-elements-back
Closed

OC-1441 PR with a proper solution#114
jbzdak wants to merge 16 commits into
jbzdak/oc-1441/detach-step-dom-elementsfrom
jbzdak/oc-1441/detach-step-dom-elements-back

Conversation

@jbzdak

@jbzdak jbzdak commented Mar 30, 2016

Copy link
Copy Markdown
Contributor

Testing instructions on #112.

*/
function showStep(step_wrapper) {
step_wrapper.$element.insertAfter(step_wrapper.$anchor);
step_wrapper.$element.show();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Show is still necessary as elements are hidden when initially loaded.

@jbzdak

jbzdak commented Mar 30, 2016

Copy link
Copy Markdown
Contributor Author

@itsjeyd This is the second solution to the issue, it's better (no hacks), but might introduce unwanted regressions. Posted as a separate PR, as I still have some doubts which solution is better overall (see the jira ticket).

I will squash the commits before merge :)

@jbzdak
jbzdak force-pushed the jbzdak/oc-1441/detach-step-dom-elements-back branch from a38e9ae to bebbe04 Compare March 31, 2016 09:11
Jacek Bzdak added 3 commits March 31, 2016 11:11
Removed video resizing function, it's not a public JS api and
the resizer object is missing as of today. It looks like
video should resize itself automatically as we actually
add it to the dom before each step
self.assertEqual(len(step_builder.find_elements_by_css_selector('.sb-step')), 1)
self.rating_question(None, step_builder, controls, "5 - Extremely good", CORRECT)
self.assertEqual(len(step_builder.find_elements_by_css_selector('.sb-step')), 1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jbzdak Two comments here:

  • Could you DRY this out a little by factoring the code that checks how many steps are present into a separate method?
  • I think it would be good to add one more check for the review step (at that point, no steps are present).

@jbzdak
jbzdak force-pushed the jbzdak/oc-1441/detach-step-dom-elements-back branch from dece75b to 6ac7da3 Compare March 31, 2016 10:47
Comment thread problem_builder/public/js/step.js Outdated
updateVideo(child);
break;
case 'sb-plot':
if (type=='sb-plot'){

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jbzdak Please use === and insert spaces around it.

@jbzdak

jbzdak commented Apr 4, 2016

Copy link
Copy Markdown
Contributor Author

Closing this one, will follow up with a proper solution shortly.

@jbzdak jbzdak closed this Apr 4, 2016
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