-
-
Notifications
You must be signed in to change notification settings - Fork 491
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 HTML output #18292
Comments
comment:2
My thinking was that it should call display manager. Or the idea is that And actually, since calling |
comment:3
Yes, the existing HTMLExpr should have |
Branch: u/vbraun/fix_html_output |
Commit: |
comment:6
What about interacts? Obviously the current (*): Really just New commits:
|
Author: Volker Braun |
comment:10
Well, |
comment:11
Agreed.
Yes, exactly, and especially to get LaTeX of things that might vary in an interact. I am pretty sure we are not the only ones using it for this, either. |
comment:12
Is there a hook for checking whether we are running in the sage cell server? There is no sage.plot.plot.EMBEDDED_MODE... What might be worth a thought is to have every top-level statement in an
though better not on this ticket... |
comment:13
There used to be a special version of |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Karl-Dieter - any plans to adjust !SageNB to use new display framework "properly"? Once it is done, we can get rid of |
comment:16
I accept pull requests but don't understand this new framework at all and don't have time to learn it for some time yet. |
comment:17
IMHO there isn't really any need to change SageNB, |
comment:18
What is the motivation for replacing |
Reviewer: Andrey Novoseltsev |
comment:19
Otherwise looks good to me and should be merged for widespread testing! |
comment:20
|
comment:21
I think that the decision was made at the time John et al. made (Also, there is no header column option in |
comment:22
With this ticket + updating the cell server to the new display backend just table() should work and display a html table. Should I just deprecate html.table altogether? |
comment:79
Heehee, that's what I thought you'd say - hence the smiley face. But there are always unauthorized uses for any computation :)
No, of course not.
Great, thanks - I think Andrey implied this as well. |
comment:80
Replying to @novoselt:
Perhaps the best solution would be to add a hook to the rich output backend, what do you think? It is very much related to the UI frontend. Though ideally do this on a separate ticket.
I potentially agree but don't want to change it on this ticket. I haven't tried whether your suggestion will work.
The commandline can't display HTML output, so that tests is false. Not returning anything from |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:82
Lest this all seem of academic importance, see this SO question. |
comment:83
Replying to @kcrisman:
And that poor soul just wants a good-looking table. But |
comment:84
Correct, that was my point. |
comment:85
Loose ends:
|
Changed branch from u/vbraun/fix_html_output to |
Changed commit from |
comment:87
Hah! I was right about all this silly stuff like "pretty_print". Real-life users don't get all these conventions. http://ask.sagemath.org/question/29450/is-there-a-way-to-fix-my-html-lines/ I love "about 8 weeks of my work were gobbled up". Even if this is really a "bug" in the cell server, I don't think anyone was crying out for html to suddenly return a string. (And note that even if there is a regex that can solve all this user's woes, that is not really the correct solution, any more than the fact that my library's recent decision to completely change their web hierarchy has as a solution "email so-and-so for the new URL for that page". We can't be handing out regex commands like candy all day long.) |
comment:88
I am crying for a) consistency and b) being able to construct HTML representations of objects. When you call |
comment:89
And I didn't push back too hard here because the sagenb continues to allow
to correctly render, without a deprecation, or so the above discussion (and my testing just now) suggests. But now the Sage cell apparently doesn't? Though I don't see the deprecation warning... so why is it showing up in the embedded version for this user? (We can open a new ticket or discuss at the ask.sagemath question, if need be.) |
comment:90
html here returns something and that something is automatically displayed as the last thing in the cell. Try putting some stuff after html in the same cell - you should get deprecation. Same with the cell server: html by itself has no warning (and will work like that forever), but if it is followed by something there is a warning and it has to be addressed in a year or so. |
comment:91
If |
comment:92
The displayhook displays the result of the last expression:
|
comment:93
Thank you, that is SUPER helpful and it's a wonder that I never saw that clear of an explanation before. So at least one workaround that should work into the future is, as Andrey says, just putting |
comment:94
That's not at all a workaround if you have code that tries to display multiple HTML bits in different places. And there is (or rather there will be) nothing special about |
comment:95
Follow up: #19230 |
comment:96
Something's still up, at least in cell server -
doesn't work. Nor does anything else I tried with the interact library. Also, I'm not sure we need to ask people to import |
comment:97
Note that cell server is running 6.9.beta6 (unless you are experimenting with the test one I've set up recently). I am fine with putting |
comment:98
I guess the point being that I can't figure out a way to use things like |
comment:99
You are supposed to build
|
comment:100
That's fine. I don't actually care about |
Html output also suffers from the EMBEDDED_MODE syndrome, it should actually return html expressions (instead of the empty string) and not rely on print()ing HTML to the screen doing anything.
The current behavior is:
CC: @novoselt @kcrisman @jhpalmieri
Component: notebook
Author: Volker Braun
Branch:
553d2bb
Reviewer: Andrey Novoseltsev
Issue created by migration from https://trac.sagemath.org/ticket/18292
The text was updated successfully, but these errors were encountered: