When using an autocomplete field, the throbber icon does not dissapear after HTTP errors (e.g. 404 if the autocomplete url is not found).

Attached patch fixes this and also makes it work in one of my modules where the same autocomplete javascript object (ACDB) is shared by many controls (they're all recipe ingredient fields, so they share the same cache).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Thox’s picture

Title: Autocomplete HTTP errors don't stop throbber » Autocomplete throbber triggers on wrong events
FileSize
1.59 KB

Changed the name of the issue because it's not just HTTP errors that make the throbber start/stop at the right time.

When typing something in the autocomplete box, there's a 300ms delay before the HTTP request is made. The throbber should start when the HTTP request is made and end when the HTTP request finishes.

Dries’s picture

We forgot to commit the throbber image. Can't we cool up the throbber a bit? (Make it a rotating Druplicon or something. ;))

adrian’s picture

NO NO!. make it a throbbing druplicon =)

Steven’s picture

I didn't commit the throbber because I wasn't sure it should go into core. In any case, it was just a 5 minute try out to show off the idea.

Thox’s picture

The throbber should go in, but I don't think it should be anything like druplicon as default. A throbbing / spinning / bouncing druplicon could go in the bluemarine theme, but I think the throbber.gif in /misc/ should be something plain.

Having a throbber makes the control much more usable:
http://formassembly.com/blog/ajax-not-all-about-xmlhttprequest/

Dries’s picture

I find the throbber handy -- it tells me up front how the textfield will work (I know what behavior to expect), and shows me when it is busy getting data. Last but not least, it is cool. It are cool but useful details like this which makes an application stand out. So I'm all for includding throbber.

Steven: can you commit whatever is meant to be the final throbber image? It's not clear whether you have plans to refine it.

Steven’s picture

Committed this patch and an improved throbber to HEAD.
http://cvs.drupal.org/viewcvs/*checkout*/drupal/drupal/misc/throbber.gif...

Anonymous’s picture

sign’s picture

Version: » 7.x-dev
FileSize
5.46 KB

Just a quick try, throbbing druplicon :)

kourge’s picture

Awesome, sign! Now this is coolness.

xmacinfo’s picture

Title: Autocomplete throbber triggers on wrong events » Add new autocomplete druplicon throbber
Category: bug » feature
Priority: Normal » Minor
Status: Closed (fixed) » Needs review

Reopening. I like the proposed throbber attached to comment 9.

chx’s picture

We should add this to Garland. Let's keep the default simple -- but as Garland gives Drupal a Drupal face, why not use our icon?

Steven’s picture

Using the Druplicon as throbber feels tacky and out of place and is certainly going to annoy a lot of developers and their clients. The image's function is to denote activity, not advertise software.

The current throbber's only link to Drupal is the use of 'drupal blue', which is already quite garish and likely to clash with other themes. If anything, it should be made more neutral.

Even if this is only for Garland... you're talking about the ultimate chameleon theme. Don't ruin that by plastering Druplicons all over. Take a page from Apple's book: they replaced the -symbol with ⌘ in their menus. For their loyal customers, their brand is only marginally associated with the logo, and relies instead on the elegant designs and technology applied in their products.

mfer’s picture

While this may quickly become a color of the bike shed thread, here is my 2 cents.

I like Stevens idea of having something more neutral in drupal core. Something that looks good across most themes. This seems more professional and useful for all those sites that don't use drupal blue. If we did that, we could use the blue throbber in garland and, maybe, a druplicon throbber on d.o (as long as it looks good).

xmacinfo’s picture

Although I like this new throbber, I agree, it should be configurable at a theme level like we do for the Druplicon logo and the Drupal favicon.

Using a druplicon in the autocomplete area is another way to advertize Drupal.

Susurrus’s picture

If we had a way to easily override icons such as in #138489: named and themed icons that would definitely make this less of an issue. I do agree that a more neutral throbber would be great. What Garland could do, however, is override the standard throbber with a Druplicon throbber. I think that would be a nice compromise there.

yoroy’s picture

If we want to increase usability and overall appearance of Drupal, this is not the way to go. Fully agree with Steven's comment that this is tacky, likely to become annoying real quick and an inappropriate place for branding. Even for Garland this is not a good idea.

Please, just don't do this.

kourge’s picture

Despite how cool I'd admit a Druplicon throbber would be, I'd also agree that the throbber is not exactly the best place to put branding.
Applying Jobs' quote to this situation: "We're taking the Druplicon in vain!"

soxofaan’s picture

FileSize
12.05 KB

I also agree than a Druplicon throbber as default is a bit too aggressive branding-wise
but it doesn't hurt having one around
so I couldn't prevent myself making this one ;)

(edit: typo)

mfer’s picture

@soxofaan Check out the format of the existing image (linked above). What is the part of the image for the case when we don't have a moving throbber?

soxofaan’s picture

#19 was just a proof of concept
but here you are

(the nohighlight version has no specular highlight in the upper left part of the drop)

xmacinfo’s picture

Well, I think that everyone agrees that branding through the autocomplete throbber is way too agressive.

So we will need a patch that would let the admin load his own throbber, a new druplicon throbber or use the current default one through the theme administration GUI.

We may also decide to simply modify Garland and have it use a Druplicon autocomplete throbber, leaving intact the rest of Drupal core.

mfer’s picture

Why would we do this through an admin interface? The throbber is handled via css. To override the throbber and put your own in it's a simple css override. I think it would look something like:

html.js input.form-autocomplete {
  background-image:url(mythrobber.gif);
}

in your style.css file.

m3avrck’s picture

I agree with @Steven's comments.

I think there should be a default, neutral throbber that works with any theme. I would be in favor of using the 2nd throbber in this list (the one most commonly used around the internet) : http://www.ajaxload.info/

Example : http://www.ajaxload.info/cache/FF/FF/FF/00/00/00/2-1.gif

Dries’s picture

I think the proposed throbber is funny (especially the latest ones), but as indicated by others, it isn't necessarily very professional. It would be a step backward compared to a neutral throbber.

mfer’s picture

FileSize
1.77 KB
1.3 KB

Here are a couple throbbers to take a look at. One is the classic blue one from Steven converted to grayscale. The other is the most widely used on the web with white space when the throbber isn't active. Thoughts?

cburschka’s picture

This makes me wonder: Perhaps the color module could recolor the throbbing icon as well?

catch’s picture

A recolourable throbber (and possible other icons) sounds like a very nice feature.

I agree the rotating/throbbing druplicons are tacky, yet also fun. We already have a few choices of drupal powered buttons in /misc - so could it go in there without modifying any themes? Or maybe just modify bluemarine, which is ultra-Drupal and less ubiquitous. Or somewhere in the handbook if not?

Also, it might've been mentioned, but there's an Icons module in the works which'd help with some of these issues: http://groups.drupal.org/node/11066

Gurpartap Singh’s picture

+1 for re-colourable throbber(unless overridden maybe), preferably within global theme settings.

mfer’s picture

Creating animated gifs in php with GD takes a little more effort than just modifying an image. From what I have read we would have to have each frame as an individual image, modify the color scheme of each frame, and then build an animated gif from the individual frame images.

For an example check out http://www.phpclasses.org/browse/package/3163.html.

How about we open a separate issue to add color module support for the throbber and decided on core throbber here.

rickvug’s picture

I think there is general agreement here that a throbbing druplicon is not the correct way to do. In #26 mfer posted ajax-loader.gif. Seems like a clean, neutral option that works with any type of theme.

soxofaan’s picture

FileSize
19.18 KB

Note that the throbber in ajax-loader.gif from #26 is 16x16 px, while the original throbber (#7) or the desaturated version (throbber.gif in #26) is only 13x13 px (I'm talking about the size of the throbbers themselves, not the image dimensions).
In the default Garland text box, ajax-loader looks a bit cramped (see attached screenshot).

I still prefer the desaturated version of the original throbber (throbber.gif in #26) because it has a disabled state, it is simpler/less intrusive and will consequently be less annoying in the long term, I think.
It is also a bit different than the usual web2.0 throbbers, which sets Drupal apart from the rest (in a positive, branding kind of way), while it is still clear what it means because it looks like a clock.

cburschka’s picture

Title: Add new autocomplete druplicon throbber » Make throbber recolorable by color.module
Status: Needs review » Active

As far as I understand, the Druplicon throbber won't be used as it is "too tacky" for a default theme (which I agree with).

So the original issue is kind of "won't fix", but we would like a recolorable throbber if it is possible. So I'm changing the issue title.

cburschka’s picture

Component: base system » color.module

Moved, too.

betamos’s picture

+1

webchick’s picture

Version: 7.x-dev » 8.x-dev

Didn't make feature freeze. Bumping to 8.x.

q0rban’s picture

I think recoloring it could actually be pretty easy (and done without color module) if your color is set via CSS and behind the throbber image (ie using negative space). The problem with this is that throbber.gif would have to be a pretty big image so that there would be no color bleed (It wouldn't be big in byte size, but in dimensions).

The down side to this is that it would have to be something simpler than the current throbber, since gif aliasing would be ugly without knowing the underlying color.

q0rban’s picture

Just noticed that Firefox and Safari both have support for aPNGs (animated pngs). Now that would be awesome! What kind of browser support do we need to see before we can use something like that? (Please don't say IE, Please don't say IE)

Open Social’s picture

This is a very cool tool for spicing up your ajax loader or throbber: http://www.ajaxload.info/

markhalliwell’s picture

Version: 8.x-dev » 9.x-dev

Didn't make feature freeze. Bumping to 9.x (that is if we still want this). Otherwise someone should just close the issue. FWIW, I actually had planned on making the throbber icon based (webfont/CSS3 rotations) and replacing it via the Icon API.

catch’s picture

Version: 9.x-dev » 8.1.x-dev
Issue summary: View changes
Status: Active » Postponed

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Steven committed 91f666b on 8.3.x
    - #23506: Fix autocomplete throbber firing on wrong events. - Add simple...

  • Steven committed 91f666b on 8.3.x
    - #23506: Fix autocomplete throbber firing on wrong events. - Add simple...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Steven committed 91f666b on 8.4.x
    - #23506: Fix autocomplete throbber firing on wrong events. - Add simple...

  • Steven committed 91f666b on 8.4.x
    - #23506: Fix autocomplete throbber firing on wrong events. - Add simple...

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

  • Steven committed 91f666b on 9.1.x
    - #23506: Fix autocomplete throbber firing on wrong events. - Add simple...
xmacinfo’s picture

Not sure what is happening with this issue (and the commits).

apaderno’s picture

It is happening with other issues too: An automatic comment is added for old commits (in this case, one done on 2005), and it's being reported as done for the 9.1.x branch. I guess that some changes on Drupal.org are confusing the module adding those system comments.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Project: Drupal core » Color backport
Version: 9.5.x-dev » 2.x-dev
Component: color.module » Code

Color has been removed from core, #3270899: Remove Color module from core.