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

Make it easier to customize ComposerVC.updateContent() #3112

Merged

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Mar 22, 2024

🔗 Issue Links

Resolves #3074

🎯 Goal

Make it easier to customize ComposerVC.updateContent() by breaking it down into multiple functions.

📝 Summary

Because of the composer's text view, in some scenarios, hiding and showing views twice can cause the input text view to jitter. These separation of the updateContent function will make sure that a customer can set the visibility of buttons only once. Or at least make it easier to do it.

🧪 Manual Testing Notes

N/A, UI and E2E Tests should pass to make sure there are no regressions.

☑️ 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 Mar 22, 2024
@nuno-vieira nuno-vieira requested a review from a team as a code owner March 22, 2024 00:32
@Stream-iOS-Bot
Copy link
Collaborator

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 13.35 ms -33.5% 🔽 🔴
Duration 2.6 s 2.57 s 1.15% 🔼 🟢
Hitch time ratio 4 ms per s 5.19 ms per s -29.75% 🔽 🔴
Frame rate 79 fps 78.37 fps 0.8% 🔼 🟢
Number of hitches 1 1.2 -20.0% 🔽 🔴
ChannelList Hitches total duration 12.5 ms 5.84 ms 53.28% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 5 ms per s 2.3 ms per s 54.0% 🔼 🟢
Frame rate 76 fps 74.53 fps 1.93% 🔼 🟢
Number of hitches 1.2 0.6 50.0% 🔼 🟢

@nuno-vieira nuno-vieira marked this pull request as draft March 22, 2024 02:19
@nuno-vieira nuno-vieira marked this pull request as ready for review March 22, 2024 14:16
Copy link
Contributor

@laevandus laevandus left a comment

Choose a reason for hiding this comment

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

Looks nice!

@Stream-iOS-Bot
Copy link
Collaborator

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 10.01 ms -0.1% 🔽 🟡
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 3.92 ms per s 2.0% 🔼 🟢
Frame rate 79 fps 78.65 fps 0.44% 🔼 🟢
Number of hitches 1 1.0 0.0% 🔽 🟢
ChannelList Hitches total duration 12.5 ms 5.01 ms 59.92% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 5 ms per s 1.97 ms per s 60.6% 🔼 🟢
Frame rate 76 fps 74.62 fps 1.82% 🔼 🟢
Number of hitches 1.2 0.6 50.0% 🔼 🟢

Copy link

sonarcloud bot commented Mar 25, 2024

@nuno-vieira nuno-vieira merged commit 6053178 into develop Mar 25, 2024
4 of 5 checks passed
@nuno-vieira nuno-vieira deleted the add/make-it-easier-to-customize-composer-update-content branch March 25, 2024 14:50
@laevandus laevandus mentioned this pull request Mar 26, 2024
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.

Composer text input not resizing correctly
4 participants