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

Strange behavior with fill() autocomplete in talk-through recording #349

Closed
pamelafox opened this issue Jul 7, 2015 · 4 comments
Closed
Assignees

Comments

@pamelafox
Copy link
Collaborator

I just recorded this talk-through:
https://www.khanacademy.org/computer-programming/special-processingjs-functions/5076945701306368

If you watch at around -2:04, you'll see me write fill(mouseX, mouseY, mouseY);
It's all well and good, but then if you pause at any point, you'll see the fill() autocomplete come in, with 255, 0, 0); and it places it at a bad spot, causing the code to be error-full.

@kevinbarabash
Copy link
Member

I don't have computer-programming/special-processingjs-functions/5076945701306368 locally, if I update my datastore will that grab it?

@pamelafox
Copy link
Collaborator Author

Probably not, since I made it yesterday. But, I was able to replicate it locally with a quick talk-through:

  1. Go to /cs/new/pjs
  2. Click record
  3. Type
    draw = function() {
    fill(mouseX, mouseY, mouseZ);
    ellipse(10, 10, 10, 10);
    }
  4. Save recording
  5. Play it, and jump forward, see same issue

screen shot 2015-07-07 at 9 35 29 am

@kevinbarabash
Copy link
Member

I was able to reproduce the bug. I'm going to work on this right now because I think it probably impacts the most people. Let me know if you'd rather me work on something else.

@kevinbarabash kevinbarabash self-assigned this Jul 7, 2015
kevinbarabash added a commit that referenced this issue Jul 7, 2015
Summary:
#349
All text that was typed	and auto-filled	when recording a talk-through
gets saved as commands.	When playing back those commands if auto-fill
is enabled the auto-filled text	can remain when pausing or seeking b/c
the text is essentially	added twice: once from the commands and	once
from autofill. In order to correct this we disable auto-fill during
playback and seek operations.

Test Plan:
- run "gulp test_record" to grab recording-data.json from S3
- run "tests/record/index.html", re-run any failed suites in isolation
- create a new pjs recording and type the following text
```
   rect (100, 100, 100, 100);
   draw = function() {
       fill(mouseX, mouseY, mouseY);
   };
```
- play the recording back and pause after the start of the `fill` command
- jump to various locations and make sure that there's never any extra text like:
```
   fill(mouseX, mouseY, mouseY);255, 0, 0);
```

Reviewers: pamela

Subscribers: john

Differential Revision: https://phabricator.khanacademy.org/D19211
@kevinbarabash
Copy link
Member

Fixed in 85def8f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants