Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for thread view not rendering parent message #2636

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented May 19, 2023

🔗 Issue Links

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

🎯 Goal

Adds a new flag to disable rendering the root message in the Thread View.

📝 Summary

  • Adds new  Components.threadRendersParentMessageEnabled flag

☑️ 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 May 19, 2023
@nuno-vieira nuno-vieira requested a review from a team as a code owner May 19, 2023 17:24
@sonarcloud
Copy link

sonarcloud bot commented May 22, 2023

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 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@ipavlidakis ipavlidakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

added a small comment but nothing blocking for sure.

@@ -106,6 +106,34 @@ final class ChatThreadVC_Tests: XCTestCase {
)
}

func test_whenThreadRendersParentMessageEnabledIsFalse() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Shall we add something as the expected result? Something like
test_whenThreadRendersParentMessageEnabledIsFalse_parentMessageWontRender?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opted to follow the same pattern in the rest of the tests in ChatThreadVC_Tests, for example: test_whenShouldMessagesStartAtTheTopIsTrue()

When the expected result is too obvious, I don't mind omitting it, but I don't mind being explicit, either. I think, in the end, it is just personal taste.

In this case, because it is consistent with the rest of the tests in this class, I'm willing not to change it, but let me know if you have a different opinion 👍

@nuno-vieira nuno-vieira merged commit e3b55e6 into develop May 22, 2023
17 checks passed
@nuno-vieira nuno-vieira deleted the add/add-support-for-thread-view-not-rendering-parent-message branch May 22, 2023 14:45
@nuno-vieira nuno-vieira mentioned this pull request May 24, 2023
This was referenced May 24, 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.

None yet

3 participants