Skip to content

feat(dm): add clickable URLs, long-press actions, and message reporting#2389

Merged
realmeylisdev merged 4 commits intomainfrom
feat/dm-clickable-urls-message-actions
Mar 23, 2026
Merged

feat(dm): add clickable URLs, long-press actions, and message reporting#2389
realmeylisdev merged 4 commits intomainfrom
feat/dm-clickable-urls-message-actions

Conversation

@realmeylisdev
Copy link
Copy Markdown
Contributor

@realmeylisdev realmeylisdev commented Mar 22, 2026

Closes #2391

Summary

  • Clickable URLs in DM message bubbles — http:// and https:// URLs render as blue underlined links that open in external browser
  • Long-press message actions — bottom sheet with Copy text (all messages) and Report (received messages)
  • Report DM messages — full report dialog with 9 categories, optional details, block user, NIP-56 + Zendesk submission
  • Snackbar fixClipboardUtils now uses DivineSnackbarContainer instead of raw SnackBar
  • Bubble color fix — sent = surfaceContainer, received = neutral10 per Figma spec

Addresses divinevideo/support-trust-safety#109 — moderation DM templates contain URLs (content links, policy links, crisis resources) that were previously not clickable or copyable.

"Delete for everyone" via NIP-09 kind 5 events tracked separately in #2388.

Test plan

  • Send a message containing a URL (e.g. Check out https://divine.video/terms) — URL renders blue+underlined, tapping opens browser
  • Send plain text — renders normally, no blue styling
  • Long-press a sent message — sheet shows "Copy text" only
  • Long-press a received message — sheet shows "Copy text" and "Report"
  • Tap "Copy text" — copies to clipboard, shows themed snackbar (dark rounded, not green)
  • Tap "Report" — report dialog with 9 categories, submit works
  • Verify sent bubble color is dark green (#032017), received is dark gray (#1B1C1C)
  • 42 unit tests passing (12 message bubble + 30 conversation bloc)

- Linkify http/https URLs in message bubbles using Text.rich with
  TapGestureRecognizer; tapping opens in external browser via url_launcher
- Add long-press gesture on message bubbles showing an actions bottom sheet:
  sent messages offer Copy text; received messages offer Copy text and Report
- Create ReportMessageDialog for reporting DM messages via NIP-56 + Zendesk
  with optional sender blocking (same flow as video report)
- Create MessageActionsSheet using VineBottomSheetActionMenu pattern
- Fix ClipboardUtils snackbar to use DivineSnackbarContainer instead of
  raw SnackBar for consistency with the rest of the app
- Correct message bubble colors to match Figma: surfaceContainer for sent,
  neutral10 for received

Addresses divinevideo/support-trust-safety#109 — moderation DM templates
contain URLs (content links, policy links, crisis resources) that were
previously not clickable or copyable.

Delete-for-everyone via NIP-09 kind 5 tracked in #2388.
@github-actions github-actions bot added the needs-issue PR needs a linked tracking issue label Mar 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 22, 2026

Mobile PR Preview

Property Value
Preview URL https://afdd9cdf.openvine-app.pages.dev
Pages project openvine-app
Preview branch pr-2389
PR branch feat/dm-clickable-urls-message-actions
Commit 2a2b37e

Copy link
Copy Markdown
Contributor

@hm21 hm21 left a comment

Choose a reason for hiding this comment

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

@realmeylisdev I love seeing how this feature is evolving, and I’ve just left a few comments. I’ll test it afterward, unless someone else tests and approves it before then :)

Addresses all 9 review comments from @hm21:

message_bubble.dart:
- Wrap bubble in Semantics widget for accessibility (comment #1)
- Use defaultStyle.copyWith() for link style instead of hard-coded
  TextStyle to stay in sync with bodyMediumFont changes (comment #2)
- Add external URL warning dialog for non-Divine domains before
  opening in browser, with trusted domain allowlist (comment #3)

report_message_dialog.dart:
- Replace all raw TextStyle(color: VineTheme.whiteText) with
  VineTheme.titleMediumFont/bodyMediumFont/bodySmallFont (comments #5, #6)
- Replace all raw SnackBar with DivineSnackbarContainer.snackBar()
  for consistent themed snackbar styling (comments #7, #8)
- Replace manual _getReasonDisplayName switch with
  reason.description from ContentFilterReason enum (comment #9)
- Remove dead _getReasonDisplayName method (14 lines)
@realmeylisdev
Copy link
Copy Markdown
Contributor Author

@hm21 All 9 review comments addressed in the latest commit:

  • Semantics widget added to message bubble
  • Link style uses copyWith() now
  • External URL warning dialog for non-Divine domains (with trusted domain allowlist)
  • VineTheme typography methods replace all raw TextStyle instances
  • DivineSnackbarContainer replaces all 3 raw SnackBar usages
  • reason.description replaces manual _getReasonDisplayName switch (method removed)

Ready for re-review when you get a chance.

@realmeylisdev realmeylisdev requested review from hm21 and omartinma March 22, 2026 20:42
Move span-building and gesture recogniser allocation from build() into
initState/didUpdateWidget so they are not re-created on every rebuild.
Properly disposes TapGestureRecognizer instances on widget update and
disposal. Addresses review comment #4 on PR #2389.
Copy link
Copy Markdown
Contributor

@hm21 hm21 left a comment

Choose a reason for hiding this comment

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

@realmeylisdev Thanks for fixing the review comments! I just left one final comment after the LGTM.

Move Semantics directly above GestureDetector, replace label with hint,
and add onLongPressHint for accessibility.
@realmeylisdev realmeylisdev requested a review from hm21 March 23, 2026 08:28
Copy link
Copy Markdown
Contributor

@untreu2 untreu2 left a comment

Choose a reason for hiding this comment

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

LGTM

@realmeylisdev realmeylisdev merged commit 46fbce1 into main Mar 23, 2026
5 checks passed
@realmeylisdev realmeylisdev deleted the feat/dm-clickable-urls-message-actions branch March 23, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(dm): add clickable URLs, long-press actions, and message reporting

3 participants