Message view long-press: add pressed-state visual feedback

Open
#1,220 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
swift
Domain
mobile

Research direction

Start by locating the SwiftUI message view and its internal long-press handling in this repository. Compare the proposed style, callback, and built-in-default directions, then define one concrete API and verify that the pressed state is visible before the actions view appears.

Written by the indexing model from the issue text.

Description

Feature request

What are you trying to achieve?

When the user long-presses a message, there is currently no immediate visual feedback during the “press-and-hold” phase (before the actions / context menu appears). The message looks identical until the menu shows up.

This makes the interaction feel unresponsive and unnatural:

  • Users don’t get confirmation that their press was recognized.
  • The gesture is harder to discover (some users never realize long-press exists).

I want the message cell to provide a subtle pressed state (e.g., scale down, opacity change, highlight, blur, or haptic) while the finger is held, and then transition into showing the actions view.

If possible, how can you achieve this currently?

There is no supported way to customize or hook into the “pressed / isHolding” state for the message view. The library controls the long-press handling internally and does not expose a modifier, callback, or style API for the pre-menu visual feedback.

What would be the better way?

Expose customization for the long-press pressed state so apps can match their interaction design and improve discoverability.

Possible API directions (any one of these would work):

  1. Style / modifier for the pressed state
  • Add something like a messagePressStyle(...) / longPressFeedbackStyle(...) modifier that applies while the long-press is active (finger is down, before the actions view is presented).
  • The style could be a closure that receives isPressed and returns a View.
  1. Expose a pressed-state binding / callback
  • Provide onMessageLongPressStateChange { }
  • This would let the app drive any custom animation (scale, shadow, overlay, etc.) without the library prescribing the visuals.
  1. Built-in defaults with configurability
  • Provide a reasonable default pressed animation (e.g., scaleEffect(0.98) + slight dimming) and allow opting out or tuning it:
    • pressedScale: CGFloat
    • pressedOpacity: Double
    • pressedOverlay: AnyView (or a typed closure)
    • pressedAnimation: Animation

Even a minimal solution (just scale + opacity) would materially improve perceived responsiveness and gesture discoverability.

Dominant language
Swift
Stars
502
Forks
125
Avg merge
1d 3h
Merged PRs (30d)
28

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GetStream/stream-chat-swiftui

All issues in GetStream/stream-chat-swiftui

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.