-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix JSQAudioMediaItem Outgoing design. #1577
Conversation
self.audioViewAttributes.playButtonImage.size.height); | ||
CGRect buttonFrame; | ||
if (!self.appliesMediaViewMaskAsOutgoing) { | ||
buttonFrame = CGRectMake(self.audioViewAttributes.controlInsets.left + 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want this hardcoded 5
here.
we should handle this somehow in controlInsets
Thanks so much @hassan8357 ! 😄 @eliburke -- what's the best way to handle this? |
@hassan8357 thanks for catching this. @jessesquires I need to think on the best way to fix, but this isn't the first time I've bumped into alignment issues related to tail vs tailless bubbles. For example, aligning the cell top label with the bubble, rather than the bubble's tail, on an incoming message. What do you think about adding a CGFloat for the tail width somewhere (perhaps JSQMessagesCollectionViewLayoutAttributes) and then I can start to look for places where we can use it to adjust for situations like this. |
I don't think we'll need this for v8.0. Since we'll be section-based, the cell labels can become header/footer views. |
I don't see how header/footer views solve the problem of aligning with the main bubble body. But ignoring them for the moment just consider bubble contents. If i want a square image inside a bubble, or if I want to embed any view or html that does not get masked to the shape of the bubble (like here in the audio media bubble), the width of the tail is an unknown. There is no way to know the left border of the mask. For now, would it be appropriate to use JSQMessagesCollectionViewLayoutAttributes.textViewFrameInsets.left? (or textViewTextContainerInsets-- I can't remember which does what) |
Oh derp. Sorry, I misread that. |
Replacement pull request in #1590. |
thanks so much for finding and reporting this bug @hassan8357! 👍 |
Pull request checklist
This fixes issue #___JSQAudioMediaItem Outgoing design.
What's in this pull request?
Fix JSQAudioMediaItem Outgoing design

