proposal: x/tools/cmd/present: Support presenter notes on the Go present tool
audreylim opened this issue · 15 comments
I propose adding support for presenter notes in the Go present tool.
Motivation: Go present is great. I used Go present at the recent GopherCon India and wished there was support for presenter notes. Having a presenter tool, with Go present, can make presentations a lot smoother and calm the presenter's nerves. Presenters don't have to use alternatives with presenter options if they want to use Go present. Best of both worlds.
Demo: http://virtivia.com:27080/1vs4fiwjm924q.mov
An implementation: https://github.com/audreylim/go-presenter#readme
If this proposal is accepted, I can submit a CL with the changes I've done for further review.
EDIT: here are the changes
CC @adg
Summary of changes (latest): audreylim/go-presenter@6d2d6fe...9b35c29
Technical implementation:
- Presenter uses localStorage event listeners to sync both windows - the main browser window and the pop up window, which will display the slides and presenter notes
- Processing is done entirely in the front end (javascript), no websockets involved
- The main browser window listens for keypress 'P', which will open the Presenter window. However, 'P' only works when Presenter mode is enabled, by running
present -pinstead ofpresent - Presenter features will run only if Presenter mode is enabled, so none of its features (eg. local storage, event listeners) will interfere with the original
presentif that is not the intent - Instruction for pressing 'P' appears in the terminal logs when
present -pis run - for informing the speaker - The slides are loaded onto the Presenter window using an iframe - this retains the layout of the Go present slides, and allows dual syncing triggered by localStorage events, which ensures reliability and speed of the syncing
- Every time the slides are updated on either the Presenter window or main browser window, the latest slide index is stored in localStorage - the event listener catches this and triggers the update in the other window
- The notes are updated on the Presenter window by listening and retrieving the updated slide number stored in localStorage
- Notes are parsed/identified in the backend by prefixing a paragraph with
"& ". Multiple paragraphs are supported
Notes/Concerns:
- Running
.playactions by clicking onRundoes not sync in the other window (see example) - Currently does not display timer, but that can be added (also indicate current slide number)
- The focus was to get this working, so it currently supports only Chrome. Multiple browser support can be investigated/enabled
- This implementation is meant to help speakers primarily, so speaker notes will not be directly available on sites like go-talks.appspot.com for readers/audiences. It works only if run locally as
present -pcan be enabled "& "is the current syntax for notes, but that can be changed. Maybe ("// ") or something comment/notes like- The Presenter window currently displays a sneak preview (one-tenth) of the previous and next slide. If the preference is to view the entire slide, the window width can be changed
Please let me know what you think.
I think the general approach looks fine. We'll need to resolve the issue with run not being synchronized. The state of the presenter window and the main window should be completely synchronized.
Hey @robpike (who has some ownership over the present file format) do you think that & is a fine start-of-line symbol for presenter notes?
I think it doesn't matter much but I might choose > or even -> .
I think it doesn't matter much but I might choose > or even -> .
I don't mean to bikeshed, but I would mention the following about > as the prefix:
> is often used as a prefix for doing a quote or blockquote. It's what it looks like:
> some quote goes here
some reply goes here
Which is also valid Markdown that gets rendered as:
some quote goes here
some reply goes here
-> prefix does not have this problem as far as I know.
However, I looked at some existing talks, and did not find any usages of this markdown idiom there. The one quote I found was actually written as a quote rather than a blockquote, so maybe > is not bad (even if it conflicts with markdown).
-> seems unnecessarily hard to type, imo.
Another options is :, which is (too?) similar to the comment character ;.
Slide content
& Speaker note
Slide content
> Speaker note
Slide content
: Speaker note
I'm actually kinda partial to :. More so than & at least. Using colon has the property that it doesn't already mean something in markdown, and it is very unlikely to have been used in slides to mean anything. (It's conceivable but unlikely someone might have started a line with &, though.)
I too apologize for bike shedding.
I liked > but as @shurcooL pointed out, it conflicts with Markdown convention.
The next best choice seems to be :. It's more correlated to "speaking" than &.
Eg.
Person A says: hello
Person B says: hi
My vote goes to :.
Okay, let's go with : assuming there are no fierce objections.
Implementation-wise, I suggest going in this order:
- Parse notes and record them in the
Sectionstruct - Add the command-line flag to enable presenter notes
- Add the notes to the slide template
- Display the notes, synchronize browser windows
- Docs
I also suggest, since notes seem to be the focus here, that the flag be -notes rather than -p.
I would consider issue #12355 closed once this is resolved. The approach described there is overkill, I think.
I like :. More than &.
After seeing @audreylim's analogy to "Person A says: hello", that makes it easy to remember too.
@adg Noted your suggestions.
Minor: With the -notes flag instead of -p, any preference for the keypress? It's currently P (for Presenter) to open a window. With notes, might be more consistent to use keypress N
N also sounds good.
CL https://golang.org/cl/21485 mentions this issue.
CL https://golang.org/cl/21489 mentions this issue.