[NEW] Support announcements #2514
[NEW] Support announcements #2514
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2514 +/- ##
===========================================
+ Coverage 26.33% 26.46% +0.13%
===========================================
Files 456 457 +1
Lines 16928 16957 +29
===========================================
+ Hits 4458 4488 +30
+ Misses 12470 12469 -1
Continue to review full report at Codecov.
|
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.
It looks pretty nice, thank you very much for the PR! Just one small thing about translation. Thanks!
@@ -45,6 +46,10 @@ class ChannelActionsViewController: BaseViewController { | |||
title: localized("chat.info.item.description"), | |||
descriptionText: hasDescription ? subscription.roomDescription : localized("chat.info.item.no_description") | |||
), | |||
ChannelInfoDescriptionCellData( | |||
title: "Announcement", | |||
descriptionText: hasAnnouncement ? subscription.roomAnnouncement : "No announcement" |
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.
Let's localize the string "No announcement"
please!
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.
@rafaelks Yes, I overlooked this! Am I supposed to add a string to each of the files and Google translate each language? Or do I just add the English version only?
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.
@blewjy Just English is fine, you can just input the English translation in all other languages and you can use Sem anúncio for pt-BR
💯
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.
@rafaelks Done!
@@ -45,6 +46,10 @@ class ChannelActionsViewController: BaseViewController { | |||
title: localized("chat.info.item.description"), | |||
descriptionText: hasDescription ? subscription.roomDescription : localized("chat.info.item.no_description") | |||
), | |||
ChannelInfoDescriptionCellData( | |||
title: localized("chat.info.item.announcement"), | |||
descriptionText: hasAnnouncement ? subscription.roomAnnouncement : localized("chat.info.item.no_announcement") |
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.
Line Length Violation: Line should be 120 characters or less: currently 134 characters (line_length)
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.
Corrected.
fc20184
to
de54420
Compare
@blewjy Thank you!!! 👍 |
@RocketChat/ios
Closes #1593.
Two main additions to the application:
ChannelActionsView
as one of the channel's information. Placed between Description and Topic, similar to the desktop client.UIView
class,ChatAnnouncementView
. This banner will follow the colour scheme of the current active theme, with the background beingbannerBackground
and label textauxiliaryText
.Light theme - iPhone XS Max
Dark theme - iPad Pro 12.9 inch (Please ignore the test channels... :P)
Black theme - iPhone SE (also a deliberately long announcement to see the text formatting when the label overflows the screen.)
Lastly, I have also updated the subscription test to include testing for this new feature.
Please feel free to let me know if there are any changes to be made. Cheers!