Skip to content
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

Misc test fixes #71

Closed
wants to merge 5 commits into from
Closed

Misc test fixes #71

wants to merge 5 commits into from

Conversation

jzohrab
Copy link

@jzohrab jzohrab commented Nov 9, 2022

A few misc fixes to make the testing more enjoyable (for me, anyway, and hopefully for others as well):

Fix test headers.

Currently, the tests are shown right at the top of the screen, eg:

current_tests_no_header

The first commit restores the header:

image

Speed things up

During heavy usage, the right frame slide-ins-and-outs become distracting and annoying.

Faster test actions

The last two commits let me see and set the answers and statuses more quickly. I can just "enter-enter-enter-enter" to rapidly go through all tests, without having to mouse everywhere, and I don't have to see any pop-ups to say whether I passed or failed ... I know if I passed or failed. :-)

If I'm testing myself on terms, I know offhand if I pass or fail, I don't need
to see the window with all the details.
If answer is not shown, show the answer; otherwise, Return = pass.
With this, the user can run through tests more quickly (assuming
they know the answers :-) ).
@HugoFara HugoFara added enhancement Develop an existing feature ui Any problem related to the User Interface ux User Experience could be better labels Nov 9, 2022
HugoFara added a commit that referenced this pull request Nov 11, 2022
CSS code was partially cleanned.
The test header was no visible on Chrome-based browsers.
Tests have a better general aspect.
@HugoFara
Copy link
Owner

Hi Jeff!

I'm testing branch, but unfortunately I cannot get a normal behavior. When I test a word on Firefox, the page starts loop-reloading multiple time, which is quite annoying, unless I press enter again. Could you give me more details about the intended behavior?

Until now:

  • Fix test header: I used your code from the first commit to fix this bug (see 3664fc2)
  • Speed things up: I think I could see the intended behavior here, but fast-moving frames do no seem a very good solution, I think fixed frames may be better as suggested in Suggestion: allow right lookup frames to always be visible (reduces screen chaos) #60
  • Faster test actions: doesn't work on Firefox, but no problem so far with Chrome. Here, have you tried to use up and down arrows? I believe they do what you want, now I think I should write tutorials 😅

@jzohrab
Copy link
Author

jzohrab commented Nov 11, 2022

Ah too bad it wasn't working for you, for me it's good. :-) The key events are used in the same place as the other test keys, so I really can't see how it's going into an infinite loop. :-/

Intended behaviour:

  • test is displayed. When I hit Return, the answer is shown in-line (e.g., "Ella tiene un gato" => "Ella tiene un [cat]")
  • if I hit Return when the in-line answer is shown, the question is immediately marked as "Passed", and the next question is shown.

re "faster test actions", yes I use the arrow keys, and with this branch I can do it without having the "side window" open (which the javascript used to require):

  • test is displayed. When I hit Return, the answer is shown in-line (e.g., "Ella tiene un gato" => "Ella tiene un [cat]")
  • if I hit the up or down array when the in-line answer is shown, the question is immediately marked as "Passed" or "Failed" respectively, and the next question is shown.

Cheers! jz

@HugoFara
Copy link
Owner

Okay, I went back on main branches, and the infinite loop is already present, whenever I use keyboard actions :|
So, I come back to this PR as soon as I get this issue fixed!

@jzohrab jzohrab closed this Nov 15, 2022
@jzohrab jzohrab deleted the misc_test_fixes branch November 15, 2022 00:20
HugoFara added a commit that referenced this pull request Nov 15, 2022
Faster tests unabled, without using "Space" before.
Static desktop interface is back!
Do not show "[]" when word has no tags.
Removed JS errors when calling "cClick".
@HugoFara
Copy link
Owner

Hi! I solved the bug causing Faster test actions to loop-reload on Firefox. I was caused by setTimeout('window.parent.location.reload();', waittime); on set_test_status.php. Since the context is lost using window.parent.location.reload() after a Timeout, Chrome was solving the location to the parent window, while Firefox was using the current window, so the current iframe. Doing so, the iframe was calling itself in loops.

The solution was to use setTimeout(window.location.reload.bind(window.parent.location), waittime). It's a bit long, but it avoids confusion.

I think the issue was related to the fact that you changed the timeout value. As you deleted the branch, do you want me to try your code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Develop an existing feature ui Any problem related to the User Interface ux User Experience could be better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants