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

Unspoken linked buttons included in OBL as spoken #53

Open
juliatuttle opened this issue Mar 27, 2022 · 1 comment
Open

Unspoken linked buttons included in OBL as spoken #53

juliatuttle opened this issue Mar 27, 2022 · 1 comment

Comments

@juliatuttle
Copy link

I have a home board with links to several sub-boards (e.g. "things") that do not vocalize their labels, but in the OBL that Coughdrop produces, clicks on those buttons are marked as "spoken": true.

I believe the problem is that:

  1. activateButton doesn't initialize obj.spoken to false when it creates obj (here).
  2. app_state.activate_button only sets obj.spoken in one place (here), to true; it is never set to false.
  3. At some point, this log event gets uploaded, with "spoken" set to true if the button was spoken or unset entirely if it was unspoken.
  4. Exporter.event_session sets "spoken" on the OBL event (here) to true if "spoken" on the log event is true or if it is nil. (I'm not 100% confident, but I assume the unset "spoken" in the client-side log event translates to a nil "spoken" in the server-side log event.)

I'm not currently able to send a pull request to fix this (I'm waiting on my employer's copyright folks to get back to me), but my proposed fix would be:

  1. Set obj.spoken explicitly in all cases in activate_button. This will ensure future logs are uploaded with "spoken" set properly to false for unspoken buttons events.
  2. Remove the || event['button']['spoken'] == nil clause in Exporter.event_session. This will ensure past unspoken button events are not labelled as spoken in the OBL logs.
  3. If the nil check was there because some older logs never have "spoken" included, I would assume that any session where "spoken" is never set is from that era, and force it to true only for those sessions.

spoken-unspoken.txt is a barebones subset of my OBL file demonstrating the issue; please compare the button events with "spoken": true to the utterance at the end.

Please let me know if I can provide any more information. I hope to be able to provide a fix at some point, if you'd like it, my employer's okay with me contributing, and my proposed solution is amenable.

Thanks for all your tireless work on Coughdrop; it has been a wonderful tool for me.

@juliatuttle juliatuttle changed the title Unspoken linked buttons logged as linked Unspoken linked buttons included in OBL as spoken Mar 27, 2022
@juliatuttle
Copy link
Author

Pardon the error, I was a little too aggressive minimizing spoken-unspoken.txt.
spoken-unspoken.txt should be valid JSON and should show the issue.

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

No branches or pull requests

1 participant