Giving descriptive text of the character who is speaking is a great way to add further detail to dialogue, while at the same time letting the reader know who is speaking. For example, you could write:
“That’s my cup,” said Bob. “Give it back.”
But it would be better if you wrote:
Bob narrowed his focus on the chipped, blue mug in my hand. “That’s my cup. Give it back.”
The second example gives the reader more information about the situation between the main character and Bob. There are three possible placements for descriptive text within dialogue:
1) Before the dialogue
Bob narrowed his focus on the chipped, blue mug in my hand. “That’s my cup. Give it back.”
2) After the dialogue
“That’s my cup. Give it back.” Bob narrowed his focus on the chipped, blue mug in my hand.
3) In the middle of the dialogue
“That’s my cup.” Bob narrowed his focus on the chipped, blue mug in my hand. “Give it back.”
You can and should use a variety of these placements in your writing, but note the following rules:
a) Before the dialogue is the best choice if the reader has no idea who is speaking as you want to give that information as soon as possible. Otherwise, the reader has to rethink the dialogue after they figure it out and this pulls them out of the flow.
b) After the dialogue is the best choice if you want to go on to a longish description of Bob’s actions. But if what you are giving are physical actions (like above) consider the placement carefully. People tend to physically react before they speak. For example, if something shocked you, your eyes would grow wide before you said “Wow! I can’t believe that!” You wouldn’t say “Wow! I can’t belive that!” and then widen your eyes when you stopped speaking. But if you put the physical description after the dialogue, that is what it means.
c) In the middle of the dialogue is the best choice when you want to break the flow of the dialogue in order to slow down the pace or give the reader time to consider what has been said. This is not a good choice when the speaker is supposed to be saying something that needs to remain unbroken (for example, a screaming rant) because it essentially acts like a pause.
If you are ever unsure which of these to use, take your dialogue and descriptions and act them out. The one that feels most natural is probably the right choice.