feat(home): announcement 'don't show again' + clickable markdown links#17
Merged
Merged
Conversation
Two web-parity gaps on home-screen announcements: - Dismissal was session-only (an in-memory set), so a dismissed announcement reappeared on the next load. Add a 'Don't show again' action that persists the id into the android client-settings dismissed_announcements list (read back on load, unioned with the local set), matching web; the X still does a session-only dismiss. - Announcement bodies rendered as plain text. Add InlineMarkdownText, a small inline-only renderer (clickable http/https/mailto links plus bold/italic/code/strikethrough, no block markdown) and use it for the body, so an admin can include a link. Non-http(s)/mailto schemes fall through to plain text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two web-parity gaps on the home-screen announcement banners.
"Don't show again" (persistent dismiss)
Dismissal was session-only (an in-memory set), so a dismissed announcement came back on the next load. Added a "Don't show again" action that persists the announcement id into the
androidclient-settingsdismissed_announcementslist (read back on load and unioned with the local set so an optimistic dismiss isn't lost to a racing refresh). Matches web, which stores the same list per client. The X still does a session-only dismiss.Clickable markdown links in the body
Announcement bodies rendered as plain text. Added
InlineMarkdownText- a small inline-only renderer: clickable links (via Compose'sLinkAnnotation) plus bold / italic /code/strikethrough. No block markdown (headings, lists, images), so it stays safe in a compact banner. Onlyhttp(s)andmailtotargets are honoured; anything else (e.g.javascript:) falls through to plain text. This is deliberately not the fullSheafMarkdownTextrenderer, per the ask.Verification
:app:testPlayReleaseUnitTestpass;:app:assemblePlayReleasegreen through R8.