• LibraryThing
  • Book discussions
  • Your LibraryThing
  • Join to start using.

Minor Annoyance Fix: "Loading" box is not always seen

Recommend Site Improvements

Join LibraryThing to post.

This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.

1aethercowboy
Edited: Feb 2, 2010, 11:10am

When I'm doing stuff on LT that unhides the "Loading" box, it's more comforting to see it. Unfortunately, it's mostly at the top of the page somewhere, and that means I have to scroll up to see it when it's affecting something further down. :(

A proposed fix:

I'm not sure how it works in other browsers, but this would solve the problem in AT LEAST Firefox:

Add the following lines to the Javascript that loads on any page with a red "Loading" box. Those lines should reads:

var loading = document.getElementById("loading");
loading.style.top = "10px"; // can be whatever value is most aesthetic.
loading.style.position = "fixed"; /** fixes it to be in that position relative to the visible portion of the window. **/


or, add to the pages CSS file the following section (again, feel free to replace 10px with some other number+px):

#loading {
top: 10px;
position: fixed;
}


or, even, generate the loading box to look like this (ditto on the 10px):

<div id="loading" style="top: 10px; position: fixed; display: none;">Loading...</div>


This will make the red loading box significantly more useful, at least to me. And, now you have no excuse for not doing it, since I already did most of the work for you. (,;;,)

Edited to include "display: " style in HTML example above. Keep everything else the same, and it should work well.

And then subsequently edited to re-add my escaped characters. Ugh...

2brightcopy
Feb 2, 2010, 10:28am

Could you explain more about what box you're talking about? Is this a box that's normally not seen but you're greasing the page and hence making it visible? You've piqued my curiosity.

3aethercowboy
Feb 2, 2010, 11:07am

E.g., when you're on your main page and you're looking at the Talk module. If you click from one tab to another (e.g. "All topics", "Hot topics", "Your groups", etc.), a little red box appears near the top of the page while that request is processing. That's the Loading box I'm talking about.

It's display: none regularly, but display: block when something's processing. I also want it to be visible in the relative view of the user, so that it actually has value.

I forgot to include the "display: " bits in my examples above...

4brightcopy
Feb 2, 2010, 11:15am

Ah, of course. It never clicked with me as a "box", just as text, but it's totally clear now.

As far as cross-browser-ness, maybe you could look at how Gmail does its loading box in different browsers.

5aethercowboy
Feb 2, 2010, 11:18am

I did something similar for my company's web page, and got it to work with IE, Fx, and Chrome (so, by extension, it should work with Opera and Safari, right?). From looking at my code, I think that just setting the position to fixed and setting at least a top or a left (with units) should do it.

Of course, the one I made was also translucent, so I had to do some xplat tweaks.

Group: Recommend Site Improvements

68,660 messages

This group does not accept members.

About

This topic is not marked as primarily about any work, author or other topic.

Touchstones

No touchstones

Help/FAQs | About | Privacy/Terms | Blog | Contact | APIs | WikiThing | Common Knowledge | Legacy Libraries | 70,047,848 books!