The cells of the intestines are interesting tissues.  They have to both absorb nutrients, but able to protect and defend themselves against all the organisms in or trying to grow on the food, and those that see the intestines as a prime place to set up shop.

First cells of the intestines "turn over" rather quickly.   As they are scraped off as food moves thru them new intestine cells are rapidly made to replace the lost ones from underneath.  Second is they secrete enzymes, immune substances and mucous which breaks food down, but also slows down and thwarts parasites.  Third is intestine are packed with areas of immune cells than can spring into action.  The three main features have to work together to resist digestive enzymes, absorb the broken down nutrients and at the same time keep the inevitable and possible pathogens out.  It is a complex and tricky balancing act.

Cells of the intestines respond to what is moving thru the intestines.  Changes in the secretions and activity of immune cells changes the consistency of fecal matter.  The analysis of feces has been and still is one of the primary and traditional methods of diagnosis of health and disease in humans and pets.  (perhaps one reason new mothers are obsessed with the contents of their children's diapers).

 "Normal" feces are medium brown color, well digested and formed, and in fish rapidly fall apart in water.   In all animals, what is consumed can change the color (food dyes change the color of both dog and fish feces).  While fish in the wild eat a varied diet, a meal of all rice, for example, can lead to white feces, especially since this food is not well digested.  Poorly digested food is more likely to retain the color of the original food (think corn in humans).  Fish have short intestines set up to deal with small but steady quantities of food.  Their intestines and digestive enzymes dont break down complex foods well, especially "land based" carbohydrates like grains and long string fats.

In animals, diarrhea is a sign of infection, if I remember correctly, it is the toxins produced that lead to either an increase in secretions or a loss of "patency" or ability of the intestine cells to regulate water and electrolyte loss.  In humans, this can be "preformed toxins", like those produced by staph bacteria or toxins produced in the gut by bacteria like salmonella.  Infants with little fluid volume can die quickly due to fluid and electrolyte loss,  while adults can usually withstand quite a few days of fluid loss before succumbing.  With fish, any fluids that leak from the anal port when a fish is gently squeezed should be considered a symptom of diarrhea.  Blood mixed in with diarrhea (or leakage)  is a more severe symptom, indicating a more profound loss of intestine patency.  The brighter the blood, the lower in the intestines the blood loss is occurring.  Very dark sticky feces or dark bloody diarrhea indicates digested blood, the color of the iron lost from digested red blood cells.  Either stinky water or stinky fluid and/or greenish fluid oozing from the anal port is an indication of certain kinds of bacteria, pseudomonas is one.  In humans, dark sticky thin or thick feces is often a symptom of ulcers, for example, or can be caused by an overdose of iron in vitamins, or even the use of Pepto Bismol of all things.

The intestines respond to irritating, but not toxin producing parasites or to irritating foods by sticky secretions and the mobilization of immune cells.  Mucous (like the stuff we cough up with a cold) is thick, sticky and generally colorless, altho any color makes it more ominous.  Mucous is the bodies way of engulfing and slowing down pathogens, or trapping dust and particles, encasing them in stuff, slowing them down and expelling them (sometimes there are immune substances in it too). Humans produce a quart of mucous per day in an effort to keep crud outta the airways and nose.  In fish, mucousy encased feces is a symptom of irritation causing more than normal amount of  mucous being produced.  Fish are good at producing mucous in general, their slime coat is filled with immune secretions and is stimulated both by parasites and by irritants like salt.   A white coating indicates white blood cells are involved.  In wounds or even pimples, the white stuff is immune cells like macrophages that have "died in the line of duty".  Pus is white blood cells, dead and/or dying.

Fish feces is complicated by the addition of reproduction in that both eggs, milt and feces exit the same "port".  Eggs are coated with a sticky mucous that sticks them to plants.  Re-absorbed eggs are encased in a mucousy casing and expelled along with feces.  I dont know enough about fish reproduction to know how much egg mucous contributes to the overall mucousy make up of feces.  But the common portal means eggs and the reproductive tract is always more or less open to possible and/or opportunistic pathogens.  I dont know how the immune system protects the reproductive tract in fish either.  Long thin clear casings with zig zags are re-absorbed eggs being expelled.  Long thin white casings indicate encased dead white blood cells, more likely an infection with non-toxin forming pathogens.  It could be from the intestines or from the reproductive tract.  If the fish are eating,  the feces may be a normal color, but mucous encased forming long thick strings.   Feces that float have entrapped air, either from the food, or due to  bacteria fermenting the food and producing gas.   Because there is no connection between the digestive system and the air or swim bladder in Goldfish, eating air bubbles may cause air bubbles in feces.

Determining what is the causative agent (what to treat for) is the diagnosis part. Each diagnostic feature rarely stands alone, rather it is part of a package of signs and symptoms.

SO IN GENERAL,  thin white poop is bacteria.
BUT if the head is down, it may be parasites or bad food, so both the slime coat and food has to be checked.
But if the feces are thin, white but with bubbles in the feces AND the fish are seen excessively eating bubbles at the surface, this has been correlated to an internal infection with columnaris.

Diarrhea in fish is often seen as a brownish tinge in the water.  Bad foods with toxins can cause diarrhea.  Fish wobble or spin in the water as they lose electrolytes (which cause the neurological symptoms.)

So treatment with anti-parasitic or antibiotic food depends on the whole picture, rather than any one diagnostic feature.