Note: it's also never the case that some sparkle and some don't in the same battle. Either all of them do or none of them.
For example, in my last online raid, one of my allies had a shiny Gallade.
I am certain it showed up like this, but it never sparkled. I just found it odd and wondered why it does this sometimes. This isn't an isolated incident, either - it happens so frequently, to various different shinies, that I decided to bring it here.
Also, every time I bring a shiny, everyone else's sparkle (provided they are truly shiny). Haven't seen it fail when I bring one.