Skip to content

Native Context Menu & Hop Path Map#307

Merged
Avi0n merged 8 commits into
Avi0n:devfrom
0PandaDEV:feature/context-menu
Jun 10, 2026
Merged

Native Context Menu & Hop Path Map#307
Avi0n merged 8 commits into
Avi0n:devfrom
0PandaDEV:feature/context-menu

Conversation

@0PandaDEV

Copy link
Copy Markdown
Contributor

This adds a native context menu when haptic pressing a message bubble it also includes a detailed hop path page with a map view.

Screenshot 2026-06-09 at 4 44 40 AM Screenshot 2026-06-09 at 4 44 56 AM Screenshot 2026-06-09 at 4 45 12 AM

@0PandaDEV 0PandaDEV mentioned this pull request Jun 9, 2026
Avi0n and others added 5 commits June 9, 2026 12:24
Version 1.0
Replace bestMatch with resolve() and skip ambiguous/duplicate hops to prevent criss-cross pile-ups on the map. Extend hop badge rendering to non-ring pins and raise the max badge cap to 64.
@0PandaDEV 0PandaDEV changed the title Native Context Menu for Messages Native Context Menu & Hop Path Map Jun 9, 2026
@0PandaDEV 0PandaDEV marked this pull request as ready for review June 9, 2026 22:18
@Avi0n

Avi0n commented Jun 9, 2026

Copy link
Copy Markdown
Owner

I like the switch back to contextMenu. I originally switched to sheet because not all the info could fit in the menu. Not sure why I didn't think of adding a details button and sheet like you did...

One thing I'd like to request from you, then I can do a followup commit for the rest:
The new MessageInfoSheet doesn't include path-hash size and original send time. I think your PR came in before I added those to the old sheet. Please add them to your new detail sheet:

// after the hops row
if let hashSize = message.pathHashSizeIfKnown {
    Text(L10n.Chats.Chats.Message.Info.pathHash(hashSize))
}

// after the sent row
if message.timestampCorrected {
    Text(L10n.Chats.Chats.Message.Info.originalSendTime(
        message.wireSentDate.formatted(date: .abbreviated, time: .standard)))
}

@0PandaDEV

Copy link
Copy Markdown
Contributor Author

Added those two fields.

@Avi0n Avi0n merged commit 0d10683 into Avi0n:dev Jun 10, 2026
@0PandaDEV 0PandaDEV deleted the feature/context-menu branch June 10, 2026 00:39
@Avi0n

Avi0n commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Hi @0PandaDEV, just wanted to give you a heads up that I decided to revert the context menu and reimplement the sheet. The context menu was causing message drift issues that were proving difficult to fix due to the chat view being a flipped UIKit table (this was done because SwiftUI scroll view currently doesn't work well for chats). A lifted preview worked, but required so much extra code and workarounds for right-click on iPadOS/macOS that I decided to go back to the sheet. When it's possible to switch to only SwiftUI for the chat view with no bugs (such as bottom anchoring), I'll likely think about switching to a context menu again.

@Avi0n Avi0n mentioned this pull request Jun 18, 2026
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.

2 participants