#6001: [with patch, needs work] tear out docstrings in the notebook into a new
window
-------------------------+--------------------------------------------------
Reporter: mpatel | Owner: boothby
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: notebook | Keywords:
-------------------------+--------------------------------------------------
Comment(by mpatel):
I've tested the new, possibly improved [attachment:introspect_v2.js
`introspect.js`] on Fedora 9 Linux in Firefox 3.0.10, Opera 9.64, and a Qt
4.5.0 !WebKit-based "browser" demo.
I'm not sure about how well the latter, which I found in
`/usr/lib64/qt4/demos/browser,` approximates Safari. It returns
{{{
"Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527+ (KHTML, like Gecko,
Safari/419.3) demobrowser/0.1"
}}}
when I enter `navigator.userAgent` in the !JavaScript console (check the
"Tools" menu or right-click on any element, then click on "Inspect"). To
get "tab" introspection working, I just added `'sl':keyboard_saf` near the
end of `keyboards.py.` Perhaps this is related to ticket #4046.
Anyway, it seems all the browsers have their own way of doing just about
everything, and no major UI library handles pop-ups seamlessly across
browsers. We may not (cannot?) get identical behavior on all major
browsers.
Some possible tests, besides the obvious:
* Check whether multiple tear-outs from a worksheet go to a common
window.
* Ditto, from multiple worksheets.
* Ditto, after reloading a worksheet(s).
* Ditto, after navigating to another domain (e.g., `google.com`) in a
tear-out window(s) (see [http://en.wikipedia.org/wiki/Same_origin_policy
same origin policy]).
* Check the behavior when tear-outs go to an ''unsized'' window and the
browser is set to open tabs vs. set to open windows.
* Ditto for ''sized'' windows.
For the latter, see the `window.open()` lines in `introspect.js.` In
Firefox, I still get a blank tab when I force new windows to open in tabs
and use unsized pop-ups. I have got this to work with a somewhat
different approach, but I haven't yet reconciled it with what's in v2.
Drag-and-drop sometimes behaves oddly in Firefox, adding copious spurious
placeholders to the list. I've noticed this after I navigate to a
different domain in a tear-out window, forcing the script to open a new
window. I think this is a jQuery [UI] bug, since it goes away when I
substitute the latest versions. This and other quirks may be a good
reason to upgrade both. Worst case: Disable some tear-out features for
certain browsers.
Some ideas, though my patience with browser "programming" has all but
vanished:
* Do something server-side instead or in addition.
* Add a top-level toolbar to the tear-out window, e.g., to toggle, close,
resize all docstrings.
* Add a simple "cell" input that calls
`window.opener.evaluate_cell_inspection().`
* Cookies, preferably chocolate.
Some ideas related to #5653:
* Collect anonymous statistics on docstring access: compute correlations,
do Bayesian predictions, rank the greatest (and worst) docstring writers
of '''''all time'''''.
* Generate a large graph of all docstrings and their cross-links. Drive
the graph theorists wild. Actually, I think it's rather sparse at the
moment. Not an [http://en.wikipedia.org/wiki/Expander_graph expander]?
* Upgrade Sphinx and test the Qt help builder, though it may
[http://groups.google.com/group/sphinx-
dev/browse_thread/thread/64dd226d9b4cec36/6fa3e0d251dae768#6fa3e0d251dae768
need work]. Try running Qt's `assistant` (`assistant-qt4` on Fedora 9)
for a taste.
* Add "PDF" to the toolbar, with maybe a rude surprise for PDF plug-in
users.
* One-click copy-pasting of examples for the truly lazy.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6001#comment:6>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---