Opened 10 years ago

Last modified 5 years ago

#6342 needs_work defect

[with patch; needs work] notebook -- fix that the slideshow mode in the notebook utterly completely broken

Reported by: was Owned by: boothby
Priority: major Milestone: sage-6.4
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by was)

This patch turns slideshow mode into something actually pretty useful. It is maybe uglier than it was 2 years ago. It is maybe "lame"-ish, perhaps. But it is usable! Which is a million times better than the literally buggy situation now.

The actual patch attached here tracks both the cell_list (the compute cells), and adds a new list allcell_list, which contains all the cells (not just the compute cells).

One other thing -- this patch addresses what looks to me like some terrible scary code in the tinymce integration into Sage. Basically there was a massive junk of javascript that got sent back from the server with each evaluation, and got eval'd via a timeout -- not good. Now it is done statically without any code being eval'd.

Attachments (5)

trac_6342.patch (13.6 KB) - added by was 10 years ago.
trac_6342-part2.patch (6.8 KB) - added by was 10 years ago.
trac_6342-part3.patch (790 bytes) - added by was 10 years ago.
a tiny little bugfix
trac_6342-part4.patch (3.8 KB) - added by was 10 years ago.
make it so slides delimited by text cells with <hr>'s; lighten up control css
trac_6342-part5.patch (929 bytes) - added by was 10 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 10 years ago by was

  • Summary changed from notebook -- fix that the slideshow mode in the notebook utterly completely broken to [with patch; needs review] notebook -- fix that the slideshow mode in the notebook utterly completely broken

comment:2 Changed 10 years ago by was

  • Description modified (diff)

Changed 10 years ago by was

comment:3 Changed 10 years ago by boothby

  • Summary changed from [with patch; needs review] notebook -- fix that the slideshow mode in the notebook utterly completely broken to [with patch; needs work] notebook -- fix that the slideshow mode in the notebook utterly completely broken

Under Ubuntu j & firefox, I can repeatably hit an infinite memory consumption:

  1. Switch into slideshow mode
  2. Shift-click to create an html cell above the first cell
  3. Enter the text, This is some $foo$
  4. Shift-enter to save the html cell
  5. Shift-click to edit the html cell just created
  6. Quickly kill firefox before it takes down your system.

comment:4 Changed 10 years ago by boothby

notes on the above comment:

Step 1 may be omitted, this bug is active in normal mode. Step 5 should read, "double-click".

Changed 10 years ago by was

Changed 10 years ago by was

a tiny little bugfix

comment:5 Changed 10 years ago by was

  • Summary changed from [with patch; needs work] notebook -- fix that the slideshow mode in the notebook utterly completely broken to [with patch; needs review] notebook -- fix that the slideshow mode in the notebook utterly completely broken

Changed 10 years ago by was

make it so slides delimited by text cells with <hr>'s; lighten up control css

comment:6 Changed 10 years ago by boothby

Problems:

  1. Shift-enter is broken in html cells
  2. Up & down buttons are completely broken (as are the pgup/pgdn keys):
    1. Without any <hr> tags, nothing happens at all
    2. With one <hr> tag, one can view either the first cell or just the text cell with the <hr> all by itself.

Comments:

  1. I liked the previous version which showed cells after the current one.
  2. It would be nice if you didn't have to have your mouse in a cell for the pgdn/pgup keys to work. (this would take some effort, as we have no global key handling right now -- so this should be handled in another ticket)

comment:7 Changed 10 years ago by boothby

  • Summary changed from [with patch; needs review] notebook -- fix that the slideshow mode in the notebook utterly completely broken to [with patch; needs work] notebook -- fix that the slideshow mode in the notebook utterly completely broken

comment:8 Changed 10 years ago by boothby

I just read the new entry in the tutorial. According to the specified behavior (which I don't like), the up&down buttons are almost working -- however,

  1. Deleting a cell in a 'frame' jumps back to the previous frame, even if it wasn't the first cell in the frame.
  2. The first frame shows up fine, but the second and subsequent frames don't show any code cells -- it's just the HTML cells, and there's no way to view the code cells. Interestingly, if you add a few cells to the frame, they don't show up -- but after 10 or 20, they start appearing. However, if you switch out of and back into the frame, it's back to not showing any code cells.
  3. The counter / progress meter shows the number of cells, not the number of frames. This is counterintuitive.

Reasons I don't like the specified behavior:

  1. The resulting code is more complex.
  2. Using <hr>'s, while documented, is not intuitive. I'd never have thought of that, and I'd probably assume that the slideshow mode was just broken crap.

By contrast, the version before part-2.patch was clean, simple and intuitive.

comment:9 Changed 10 years ago by was

The first frame shows up fine, but the second and subsequent frames don't show any code cells

This is an unintended bug which I'm fixing.

Reasons I don't like the specified behavior:

  1. The resulting code is more complex.
  2. Using <hr>'s, while documented, is not intuitive. I'd never have thought of that, and I'd probably assume that the slideshow mode was just broken crap.

By contrast, the version before part-2.patch was clean, simple and intuitive.

I'm trying to give an *actual* talk, and in preparing it, I learned that the version before part-2.patch was actually totally broken crap for actual use. In contrast, what I've just written is really awesome for actual use. There is a huge difference between imagining maybe giving a talk and actually writing a talk you're going to give in front of a 130 people. It is absolutely essential to have slides that are given by a marker. <hr> is a very reasonable choice for a marker.

  1. The counter / progress meter shows the number of cells, not the number of frames. This is counterintuitive.

It's going to be a lot more work to implement the counter to show the frames, and I decided not to implement that in the interest of iterative development.

Changed 10 years ago by was

comment:10 Changed 10 years ago by boothby

Slideshow mode now works, shift-enter on HTML cells is still broken.

comment:11 Changed 10 years ago by boothby

Oops, the "bottom" button now jumps to the last cell instead of the last frame.

comment:12 Changed 10 years ago by rlm

It would be nice if there were some way to

  1. indicate which hr's delimit slide breaks, and which don't, i.e. if you want to use an hr in the middle of a slide, and
  1. allow for slides which don't contain any cells.

Regarding 1, we could even use something like <sage_slide_break> instead

comment:13 Changed 10 years ago by rlm

I think also if there is a newline at the end of an html block, it cuts the slide after the next cell.

comment:14 Changed 10 years ago by rlm

Adding a cell to the end of a slide is also problematic.

comment:15 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:16 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:17 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:18 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.