Composer update - UI enhancements

- Composer height =58px - Frame = 42px
- Replace current scroll to bottom implementation with a scroll to Bottom FAB on both themes
- The text inside the composer frame should be centered
- The padding between the "reveal plus" button, composer frame and Left + Right sides should be at equal distance on default mode
- Verify that the "Send a message..." String matches with the colour indicated on Figma.
- The padding between each component (buttons and composer frame) should be at equal distance on default mode. E.g : It should be at 12px for each gap.
- The input text jumps down when users start typing. It should be centered at all times.
- Remove the Scroll bar in the text frame.
- DARK THEME
This commit is contained in:
Gil Eluard
2021-03-20 21:31:17 +01:00
parent bdcfc88d6b
commit ea8add1953
25 changed files with 167 additions and 115 deletions

View File

@@ -85,7 +85,7 @@
growingTextView.font = [UIFont systemFontOfSize:15];
growingTextView.textColor = ThemeService.shared.theme.textPrimaryColor;
growingTextView.tintColor = ThemeService.shared.theme.tintColor;
growingTextView.placeholderColor = ThemeService.shared.theme.textTertiaryColor;
growingTextView.internalTextView.showsVerticalScrollIndicator = NO;
growingTextView.internalTextView.keyboardAppearance = ThemeService.shared.theme.keyboardAppearance;
@@ -100,6 +100,19 @@
UIImage *image = [UIImage imageNamed:@"input_text_background"];
image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(9, 15, 10, 16)];
self.inputTextBackgroundView.image = image;
self.inputTextBackgroundView.tintColor = ThemeService.shared.theme.roomInputTextBorder;
if ([ThemeService.shared.themeId isEqualToString:@"light"])
{
[self.attachMediaButton setImage:[UIImage imageNamed:@"upload_icon"] forState:UIControlStateNormal];
}
else if ([ThemeService.shared.themeId isEqualToString:@"dark"] || [ThemeService.shared.themeId isEqualToString:@"black"])
{
[self.attachMediaButton setImage:[UIImage imageNamed:@"upload_icon_dark"] forState:UIControlStateNormal];
}
else if (@available(iOS 12.0, *) && ThemeService.shared.theme.userInterfaceStyle == UIUserInterfaceStyleDark) {
[self.attachMediaButton setImage:[UIImage imageNamed:@"upload_icon_dark"] forState:UIControlStateNormal];
}
}
#pragma mark -
@@ -187,21 +200,15 @@
if (self.rightInputToolbarButton.isEnabled && !self.rightInputToolbarButton.alpha)
{
[UIView animateWithDuration:.4 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:8 options:UIViewAnimationOptionCurveEaseIn animations:^{
self.rightInputToolbarButton.alpha = 1;
self.messageComposerContainerTrailingConstraint.constant = self.frame.size.width - self.rightInputToolbarButton.frame.origin.x + 12;
[self layoutIfNeeded];
} completion:^(BOOL finished) {
}];
self.rightInputToolbarButton.alpha = 1;
self.messageComposerContainerTrailingConstraint.constant = self.frame.size.width - self.rightInputToolbarButton.frame.origin.x + 12;
[self layoutIfNeeded];
}
else if (!self.rightInputToolbarButton.isEnabled && self.rightInputToolbarButton.alpha)
{
[UIView animateWithDuration:.4 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:8 options:UIViewAnimationOptionCurveEaseIn animations:^{
self.rightInputToolbarButton.alpha = 0;
self.messageComposerContainerTrailingConstraint.constant = 12;
[self layoutIfNeeded];
} completion:^(BOOL finished) {
}];
self.rightInputToolbarButton.alpha = 0;
self.messageComposerContainerTrailingConstraint.constant = 12;
[self layoutIfNeeded];
}
}