openlab-at-city-tech / webworkqa

WeBWorK integration for WordPress and BuddyPress
GNU General Public License v2.0
4 stars 2 forks source link

Ask for Help doesn't scroll down to question fields #170

Open bree-z opened 5 years ago

bree-z commented 5 years ago

Hi Boone,

When I ask a question from the WW site, I'm redirected correctly to the OL-WW site, but the page doesn't scroll down to the Ask a Question box/question fields -- I have to scroll down manually. This appears to also be an issue on openlabdev.org. I'm sure it was working correctly when I was testing last week. Is it possible something changed between now and then?

Here's an example:

WW Question: http://mathww.citytech.cuny.edu/webwork2/WW-Dev/CoordinatePlaneTrig/1/?user=student1&effectiveUser=student1&key=nTSGHAFaR4lEiEemKELUT1lmJgfHBthw

OLdev URL: http://openlabdev.org/webwork-playground/?post_data_key=webwork_post_data_932290565571a18a2ced6d844e8a9ff4#:problemId=local/CoordinatePlaneTrig/six-trig-point-q1.pg

Thanks!

WW-OLinterface

boonebgorges commented 5 years ago

I'm not aware of any changes that have taken place that would cause this. I'm finding it to be intermittent in my own testing, which suggests that there's a race condition - the scroll can't take place until after the initial AJAX call is complete, but it may be occasionally triggered that happens.

Can you please refresh my memory on the intended behavior? When, exactly, are we supposed to scroll to these fields? Whenever the user is logged in and visits a single problem page? Or only when the click is coming directly from WeBWorK?

bree-z commented 5 years ago

Thanks, Boone. The only scrolling behavior that's currently not working as intended is:

What is working correctly:

Does that make sense? Let me know if you need anything else. Thanks!

Also, cc'ing @jennaspevack

boonebgorges commented 5 years ago

Thanks, Bree. I can't see that the application was ever designed to do exactly what you've described here. There's some logic suggesting that it should scroll to the form whenever the page is loaded and the user is logged in - not just when coming from WW. I can probably make it work the way you've described, but it looks like it's a non-trivial feature, so I probably can't easily slip it in in the next few weeks.

I know you've said that this worked in the past. My guess is that it did scroll down for all logged in users, and I'm unsure what might have changed, outside of network latency.

bree-z commented 5 years ago

Thanks, Boone.

I want to double check with @jennaspevack but I think we want it to scroll to the 'Ask a Question' form only when coming from WeBWorK.

Otherwise, when logged in and asking a question from the OL-WW site, the flow (which is currently working correctly) is:

I think we don't want to go to the 'Ask a Question' form here, because users might be wanting to read the question and respond (though the respond form is visible in this view). E.g.

Screen Shot 2019-06-26 at 12 46 49 PM

Does this make sense?

Thanks!

boonebgorges commented 5 years ago

Thanks, Bree. This all makes sense to me. Let's wait to hear from Jenna before we make a plan.

bree-z commented 5 years ago

Sounds good, thanks!