One thing is that it is a matter of 'restrictive' vs 'non-restrictive', as with relative clauses. In your #1, she is standing in front of the mirror while fancying. If you use a comma, then she is standing in front of the mirror as a result of fancying.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.