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

Fix notebook interaction and cell focus bugs #7339

Closed
qed777 mannequin opened this issue Oct 28, 2009 · 6 comments
Closed

Fix notebook interaction and cell focus bugs #7339

qed777 mannequin opened this issue Oct 28, 2009 · 6 comments

Comments

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 28, 2009

Please see sage-notebook for the report.

Possibly relevant recent tickets include #7238 and #7254.

CC: @jasongrout @williamstein

Component: notebook

Author: Mitesh Patel

Issue created by migration from https://trac.sagemath.org/ticket/7339

@qed777 qed777 mannequin added c: user interface labels Oct 28, 2009
@qed777 qed777 mannequin assigned boothby Oct 28, 2009
@qed777
Copy link
Mannequin Author

qed777 mannequin commented Oct 28, 2009

comment:1

The report:

In Firefox 3.5.3 on Ubuntu 9.04, I opened up the "Play: Epidemic
Modeling" worksheet that is published at the top of the list on sagenb.org
and evaluated the interact (the second cell down the page or so).  I
changed the R0 slider a few times.  Each time I changed the slider, the
interact updated and focus jumped to the top of the preceding cell,
which was annoying.

Then I changed the R0 slider once more and it's been hanging there for a
while.  The green line on the side indicates that the interact is being
updated.

I tried to restart the worksheet from the menu at the top, but when I
select "Restart", the combo box closes with the "Restart" option
selected and nothing appears to happen.  When I selected the "Restart"
option, this error appeared in the Firebug console:

D is null
cell_set_not_evaluated()main.js (line 831)
set_all_cells_to_be_not_evaluated()main.js (line 1243)
restart_sage()main.js (line 1244)
eval()4 (line 1)
go_option()main.js (line 436)
function onchange(event) { go_option(this); }(change )3 (line 2)

(831 out of range 2)

I saw this error multiple times yesterday too on different worksheets,
along with this problem of the restart option not working.

I restarted the browser, and the focus-jumping problem does not happen
anymore.  However, I was able to evaluate the interact, change a few
sliders, and get the error above again when selecting the "Restart
worksheet" option from the menu at the top of the worksheet.

I hope that helps track down the problem.

Jason 

@qed777
Copy link
Mannequin Author

qed777 mannequin commented Oct 29, 2009

Fix interact cell focus "bug" and worksheet restart bug.

@qed777
Copy link
Mannequin Author

qed777 mannequin commented Oct 29, 2009

Author: Mitesh Patel

@qed777
Copy link
Mannequin Author

qed777 mannequin commented Oct 29, 2009

comment:2

Attachment: trac_7339-sagenb_cell_bugs.patch.gz

Please let me know if either problem remains, or if another obtains.

By the way, I've made a few changes that would be suggested by JSLint. Currently, JSLint quits with the message

Lint at line 193 character 20: Too many errors. (4% scanned).

Although some of the checks may seem pedantic, I think we should aim for a nearly [1] lint-free notebook library per JSLint's "The Good Parts" mode (Crockford video). The short-term pain may reveal and resolve many [potential] problems [2].

[1] We'll need to "Tolerate eval", but possibly only in eval_script_tags.

[2] For Python, see PyChecker, PyFlakes, and Pylint.

@qed777 qed777 mannequin added the s: needs review label Oct 29, 2009
@qed777
Copy link
Mannequin Author

qed777 mannequin commented Oct 31, 2009

Attachment: trac_7339-sagenb_cell_bugs_v2.patch.gz

Rebased vs. #7309, #7310, #7332. Apply only this patch.

@williamstein
Copy link
Contributor

comment:3

Very nice! This is awesome (both fixing the original problem + the JSLint updates).

Positive review and merged into sagenb-0.4.3

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