little green plus

7 views
Skip to first unread message

Joe Corneli

unread,
Aug 12, 2013, 8:27:52 AM8/12/13
to planet...@googlegroups.com
I added a little green plus to http://planetmath.org/ that lets people
expand all of the messages. The behavior and look leaves something to
be desired (in particular, it's showing the raw code, without LaTeX
rendering)... but unless anyone objects, I'll leave it there as a
work-in-progress since I think even in an unfinished state this is a
very useful piece of functionality. (I can hopefully get further
jQuery help from Lucas to get most of this finished off today.)

Deyan Ginev

unread,
Aug 12, 2013, 9:22:07 AM8/12/13
to planet...@googlegroups.com, Joe Corneli
Hi Joe,

Interesting feature.

There is a small "more" link at the bottom of the "Latest messages" box,
why not adapt that one? It is more explanatory than a green plus to me.

Also to keep in mind -- when the messages are updated they break out of
their "box" and also go straight through the footer. The CSS should
probably evolve to keep the looks nicer.

And, in the case you have a non-trivial number of messages (100 or more)
that feature would be quite heavy on the front page, so I am not sure
you really want it in the long run.

Just my first thoughts,
Deyan

Joe Corneli

unread,
Aug 12, 2013, 9:31:18 AM8/12/13
to Deyan Ginev, planet...@googlegroups.com
On Mon, Aug 12, 2013 at 2:22 PM, Deyan Ginev
<d.g...@jacobs-university.de> wrote:

> There is a small "more" link at the bottom of the "Latest messages" box, why
> not adapt that one? It is more explanatory than a green plus to me.

Hm, like "expand all"? That would work. I kind of felt like the
plus is inviting eye-candy - and once it's been clicked once, the user
will know what it does. But it's true, it's not so clear up front.

> Also to keep in mind -- when the messages are updated they break out of
> their "box" and also go straight through the footer. The CSS should probably
> evolve to keep the looks nicer.

Definitely - I hope to either get that fixed today or tomorrow (and if
we can't, I'll remove the feature until we have it sorted out). We
have to recalculate and adjust the heights on the fly, but that's
doable with jQuery (by adapting some code we already have).

> And, in the case you have a non-trivial number of messages (100 or more)
> that feature would be quite heavy on the front page, so I am not sure you
> really want it in the long run.

The front page is limited to 14 messages at a time so we should be OK
in this regard.

Joe

Joe Corneli

unread,
Aug 12, 2013, 10:29:31 AM8/12/13
to Deyan Ginev, planet...@googlegroups.com
>> Also to keep in mind -- when the messages are updated they break out of
>> their "box" and also go straight through the footer. The CSS should probably
>> evolve to keep the looks nicer.

I just got the show/hide to work more smoothly, have a look. If we
can get this to do the MathML instead of the source that would be
quite nice.

Deyan Ginev

unread,
Aug 12, 2013, 10:35:19 AM8/12/13
to Joe Corneli, planet...@googlegroups.com
Cool, the box and footer now behave appropriately and indeed it looks
quite nice.

As to the MathML - don't you have it stored in a different field in the
DB adjacent to the source? I have zero familiarity with the code, but it
ought to be a simple change if you have them both stored.

Deyan

Joe Corneli

unread,
Aug 12, 2013, 4:53:38 PM8/12/13
to Deyan Ginev, planet...@googlegroups.com
On Mon, Aug 12, 2013 at 3:35 PM, Deyan Ginev
<d.g...@jacobs-university.de> wrote:
> As to the MathML - don't you have it stored in a different field in the DB
> adjacent to the source? I have zero familiarity with the code, but it ought
> to be a simple change if you have them both stored.

It's in there alright - retrieving it currently requires an MD5 hash
and a query to another table -- but this is quite doable.

Joe Corneli

unread,
Aug 19, 2013, 9:40:40 AM8/19/13
to Deyan Ginev, planet...@googlegroups.com
I came up with a solution to the vertical dimension issue -- which as
I currently understand it would be harder or impossible to deal with
if we display the MathML -- namely, this would be one place to use the
Drupal "overlay" for display purposes. I'll look into that.
Hopefully this means that the next edition will have MathML.

Joe Corneli

unread,
Sep 7, 2013, 8:09:43 AM9/7/13
to Deyan Ginev, planet...@googlegroups.com
A quick question on StackOverflow seems to reveal the "right way" to do this:

http://api.jquery.com/innerHeight/

I haven't implemented the solution yet but it should give us a much
nicer little hide/show button.
Reply all
Reply to author
Forward
0 new messages