Skip to content

Conversation

@nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Oct 27, 2023

🔗 Issue Links

Resolves https://github.com/GetStream/ios-issues-tracking/issues/610

🎯 Goal

Some customers complained that it was difficult to override the subtitleText: String in the ChatChannelListItemView. There is quite a lot of logical branching inside this property which made it difficult to override the rendering of the subtitle without duplicating logic on the App side.

📝 Summary

The following functions were added to make it easier to customize the channel item view without duplicating logic:

  • Added open func channelTitleTextForSearchedMessage()
  • Added open func channelTitleText()
  • Added open func previewMessageTextForEmptyMessage()
  • Added open func previewMessageForAudioRecordingMessage()
  • Added open func previewMessageTextForSystemMessage()
  • Added open func previewMessageTextForSearchedMessage()
  • Added open func previewMessageTextForCurrentUser()
  • Added open func previewMessageTextFor1on1Channel()
  • Added open func previewMessageTextFromAnotherUser()
  • Added open func attachmentPreviewText()
  • Added open func translatedPreviewText()
  • Added open var typingUserString: String?

🎨 Showcase

N/A

🧪 Manual Testing Notes

N/A

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

@nuno-vieira nuno-vieira added 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK ✅ Feature An issue or PR related to a feature labels Oct 27, 2023
@nuno-vieira nuno-vieira requested a review from a team as a code owner October 27, 2023 12:14
@nuno-vieira nuno-vieira changed the title Make it easier to customize the channel list preview texts Allow easier customisation of the ChatChannelListItemView Oct 27, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 17 Code Smells

89.6% 89.6% Coverage
0.0% 0.0% Duplication

@nuno-vieira nuno-vieira merged commit e90d3bb into develop Oct 27, 2023
@nuno-vieira nuno-vieira deleted the add/make-it-easier-to-override-message-preview-text branch October 27, 2023 14:33
@opfeffer
Copy link

opfeffer commented Nov 2, 2023

I wouldnt say I complained 😇

@testableapple testableapple mentioned this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ Feature An issue or PR related to a feature 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants