-
Notifications
You must be signed in to change notification settings - Fork 25
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
Resolves #1286: record severity ratings #1305
Conversation
So what is the testing protocol for this? When you say "record severity ratings" does that mean in the |
When I say 'record severity ratings', that refers to interactions that never even make it into the label table. Testing protocol:
NOTE: sometimes it looks like I'm borrowing the query that you gave me earlier to do this:
Try different combinations for rating severity - you can change step 2 by clicking on severity ratings (rather than hitting a key) and change Step 3 by using the Escape key or by clicking the 'OK' button. |
I think @shivenbhatt had found a link describing that sometimes Javascript events arrive out-of-order. Could this be related? @shivenbhatt, can you share your findings on this here please? |
I realized that I accidentally put these in the wrong order earlier when we used the enter key to close the context menu, but I will look into this more to see if this happens in other places. I fixed this in the most recent commit (7419019). |
Here's what I found about JS events getting out of order: Sometimes when events are made, such as a key press or a click, javascript makes the events in the correct order, with the correct timestamps, but the events are executed in the incorrect order. The error where events get lost/out of place is documented here: https://stackoverflow.com/questions/11225694/why-are-onkeyup-events-not-firing-in-javascript-game if the events are getting switched in the log, maybe we could have some sort of log cleaner that occasionally goes through the log and sorts events by their timestamp. |
And by "make it into the label table", do you mean "make it into the problem_severity" table? Since that is where the severities are recorded in the database. And if it is the case that the actual severity was not being recorded (not just in the interaction log), then the testing instructions should include checking the problem_severity table as well. |
@misaugstad Severity ratings are missing from |
…Webpage into 1286-log-severity-ratings
Nice! This is working great for closing the context menu via the keyboard (either by hitting enter, esc, or another label type keyboard shortcut), but it doesn't fix it when closing the menu by clicking outside the context menu with the mouse! Any ideas on how to fix that as well? |
Looking into this now - it looks like there's something that is causing keyboard events to be slightly delayed? When I click out of the context menu shortly after hitting the 1 key, I get this: (numbers on the right are time stamps):
|
Smoother labeling behavior -- responds better when user clicks out of the context menu
@misaugstad Should be ready to go now! |
Works great, nice work! |
Resolves #1286:
Earlier, severity ratings were not being recorded when the user hit the enter key too quickly after giving a rating. This was caused by an additional close event handler in
ContextMenu.js
that sometimes fired before the event handler inKeyboard.js
. Severity ratings weren't logged because there is a conditional that checks if the ContextMenu is visible, and it would be marked as 'not visible' from the ContextMenu handler.The event handler in
ContextMenu.js
has been removed - we now use the existing one inKeyboard.js
.