-
Notifications
You must be signed in to change notification settings - Fork 269
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
feat(ui): expose a method for checking whether a message contains only emojis and should be boosted (use a bigger font size) #4577
base: main
Are you sure you want to change the base?
Conversation
…y emojis and should be boosted (use a bigger font size)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4577 +/- ##
==========================================
- Coverage 85.42% 85.40% -0.02%
==========================================
Files 286 286
Lines 32213 32229 +16
==========================================
+ Hits 27517 27525 +8
- Misses 4696 4704 +8 ☔ View full report in Codecov by Sentry. |
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.
Neat!
@@ -442,6 +443,19 @@ impl EventTimelineItem { | |||
} | |||
} | |||
|
|||
pub fn should_boost(&self) -> bool { |
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.
Please add a documentation with an example :-).
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.
Documentation sorted but I'm not so sure about the example, creating a timeline item seems too involved.
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.
Pro tips: You can create declare a function that takes a TimelineItem
as a parameter, however the function is “hidden” from the doc:
/// # fn test(timeline_item: TimelineItem) {
/// timeline_item.do_something();
/// # }
rustdoc
will be able to run the test by checking the types (not the execution though, because test()
won't run), and rustdoc
will also be able to render the doc, as:
timeline_item.do_something();
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.
See Documentation tests, Hiding portions of the example to learn more.
85a2b49
to
d145fce
Compare
d145fce
to
ae29e45
Compare
LazyTimelineItemProvider
so that it can be opt in