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
Alphanumeric cell IDs, resize on paste (#2902), ESC ends introspection (#5644), JSLint for notebook_lib.js #7666
Comments
This comment has been minimized.
This comment has been minimized.
Author: Mitesh Patel |
comment:2
Please the commit string for a brief summary. Other notes:
|
comment:3
A pre-existing bug:
? It seems the client and server cell lists are out of sync. This might explain the "spontaneously appended cell" phenomenon. |
comment:4
In v9, "Evaluate All" can delay the updates of freshly rendered interacts. I can restore their priority (e.g., prepend their IDs to the |
This comment has been minimized.
This comment has been minimized.
comment:7
The latest, V13, is rebased vs. #7811. |
comment:8
I'll stop pre-emptively rebasing this patch, for now. Just let me know, if/when it's time. |
comment:9
mpatel -- fyi, Tom Boothby is going to help get this work into Sage very soon... |
comment:10
That's great! I should still rebase the patch and include a few corrections from #6855's "B" series. Remarks:
|
comment:11
Just a quick note: I'm working on breaking this up into more manageable pieces. |
comment:13
Please see #7858 about setting the |
comment:14
#7863 applies JSLint to the notebook's auxiliary JS files. |
comment:15
If I save |
comment:16
Oops! Wrong ticket. |
This comment has been minimized.
This comment has been minimized.
comment:17
|
This comment has been minimized.
This comment has been minimized.
comment:19
Reminder: Set |
comment:20
mpatel asked if I would test this package. Some observations follow, Firefox 3.5.6 on Kubuntu 9.10.
(a) paste into a new cell, hit edit key and the pasted text is gone. (b) this one took me a while
Without a space at the start of the line, sometimes there's no problem. Notice if you keep sliding the window edge, and push two words onto the next line, the sizing comes back to being right. |
comment:21
Replying to @rbeezer:
Thanks for your detailed feedback!
I think the JavaScript compressor may be so aggressive that it's changing the semantics of the code. Could you try this (but don't bother if it's too much trouble):
This should be easy to fix by also sending the input to the server just after the paste event.
I've noticed this, too. The server code and JS library use different methods to (re)size a cell. The server does the sizing just before it sends the worksheet to the browser (e.g., on first display, after exiting "Edit" mode, etc.), but the browser resizes in between. I don't know how easy it is to reconcile the methods, but I'll definitely take a closer look. |
comment:22
Oops. That should be |
comment:23
V4 should make it so a cell is resized and saved about 0.25 seconds after a paste event -- using no delay at all is too fast, apparently. I think unifying the client and server resize methods should be a separate ticket. Neither of the current methods is optimal. The server assumes 80-column-wide input cells. The browser suffers from the problem described above. I'm not sure what to do about the compressor. See #7787 and sage-notebook for potential options. For now, how about adding .min.js file(s), generated offline with the YUI Compressor? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:25
Found the problem: The function foo() {
return 'hello';
} to function foo(){return
'hello'
;} But In particular, if I execute function foo(){return"hello"} |
This comment has been minimized.
This comment has been minimized.
comment:27
I've updated the spkg to V5, too. |
comment:28
Excellent work. Cleans up the library quite well. I've rebased the patch on a new patch queue, but since the reject is just some empty lines, I'll mark this with a positive review.
The new patch queue is:
|
Rebase on a new patch set. |
Attachment: trac_7666-alphanumeric_cell_ids_B5.patch.gz Attachment: trac_7666-reviewer.patch.gz A few style tweaks. |
comment:29
I've attached a few additional style tweaks to be applied on top of the patch. Feel free to review it or ignore it. |
Combined patch. See comment. Apply only this patch. |
comment:30
Attachment: trac_7666-alphanumeric_cell_ids_B6.patch.gz I've attached a combined patch that incorporates most of the reviewer patch. Thanks for further simplifying |
Reviewer: Tim Dumol |
comment:31
I think that the rule is made for functions with less than say, 5, variables. Putting all of those declarations in one line is a tad hard to read. |
comment:32
B7 does this function bar() {
var foo1, foo2, foo3, foo4, foo5, foo6,
foo7, foo8, foo9, foo10;
// ...
} |
Attachment: trac_7666-alphanumeric_cell_ids_B7.patch.gz Combined patch. Apply only this patch. |
Merged: sagenb-0.6 |
This ticket
notebook_lib.js
"through" JSLint.Patch:
Suggested queue, applied to SageNB 0.4.9 + #7269:
Or install this spkg:
CC: @williamstein @TimDumol @boothby @mwhansen
Component: notebook
Author: Mitesh Patel
Reviewer: Tim Dumol
Merged: sagenb-0.6
Issue created by migration from https://trac.sagemath.org/ticket/7666
The text was updated successfully, but these errors were encountered: