Khan / Khan/live-editor

SQL talk-throughs can be partially edited while the talk-through is playing

Open
#524 2 comments 0 reactions 0 assignees View on GitHub
editor sql
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

I noticed that, while watching SQL talk-throughs that had created a table in them, while the talk-through was playing, I could click on the table name (in the canvas) and there would be a new line in the code with `SELECT * FROM table_name;`. This is especially annoying (and confusing to new students, considering that this example is in the Hour of Databases) because, as I understand it, you record what Pamela types and where she types it (e.g. end of line 5). (It may be more complicated than that but that's just me having a guess.) This means that when she types `SELECT name FROM groceries;` on line 8 of Querying the table - https://www.khanacademy.org/computing/computer-programming/sql/sql-basics/p/querying-the-table -, the line ends up as `SELECT * FROM groceries;SELECT name FROM groceries;`.

NB: When the talk-through is paused and I clicked the table name (in the canvas), and then started playing it again, the extra lines of code were deleted. It seems to be just when the talk-through is playing and you click the table name in the canvas that it glitches.

SCREENSHOTS:

The 'groceries' table layout in the canvas, including the green link that can edit the talk-through while it's playing:
![SQL table declaration in the KA canvas](https://cloud.githubusercontent.com/assets/16276687/11912793/a28c841a-a645-11e5-97e0-1ec199faa954.png)

Pamela's recorded text input is placed after the text that was inserted by clicking on the table name on the canvas:
![Pamela's prerecorded line is typed after the glitched show table line](https://cloud.githubusercontent.com/assets/16276687/11912807/1975cf28-a646-11e5-80a6-ca872c315768.png)

When Pamela explains that to show all the rows, you "replace 'name' with 'star'", this happens (or at least it did for me, it probably depends when you press the table name link in the canvas):
![Pamela replaced 'name' with 'star' - glitch](https://cloud.githubusercontent.com/assets/16276687/11912818/86511288-a646-11e5-9824-e961ac214f78.png)

I'm sorry for not posting it on ZenDesk - my computer doesn't allow access to it - but I hope you can fix it just as easily!

**EDIT:** I don't see why it would matter, but I am using a Chrome OS laptop manufactured by Dell.
**EDIT 2:** I don't know if this is the correct repository to post this under, but I thought this is probably the correct one because I couldn't find a different one like this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue in the linked SQL lesson by clicking the table name in the canvas while the talk-through is playing, then compare the result with playback while paused. Trace the talk-through playback and canvas table-name interaction; done means clicking the table name during playback no longer inserts or corrupts SQL, while the recorded input remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sql
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.