Skip to content
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

Mentions in chat #67

Open
rachelhamlin opened this issue Nov 26, 2019 · 4 comments
Open

Mentions in chat #67

rachelhamlin opened this issue Nov 26, 2019 · 4 comments

Comments

@rachelhamlin
Copy link

Mentions Specs v2

User Stories

As a (sending) user, I want to get the attention of certain individuals within group or public chats.

As a (receiving) user, I want to notice when someone calls me out or responds to me directly in a group or public chat.

Iterations

MVP: Discord style mentions: Visual distinction only.

v1: Mentions & replies via PN for Android: Visual distinction, scroll-to-position when opening from PN. <— Heaviest/most variable and research-intensive scope of work.

v2: In-app notification center for mentions & replies, scroll-to-position when tapped.

MVP: Discord style mentions: Visual distinction only


(Design WIP)

  • As a (sending) user, I type the @ symbol to pull up the list of users in a chat—both random names and ENS—and either type or select the person I want to mention.
    • Acceptance criteria:
      • Typing @ produces a list of names
      • Both ENS and random names
      • User can type the name or select it from the list; as they type the selection of names is narrowed.
  • As a (receiving) user, my mentions appear highlighted within a chat.
    • Acceptance criteria:
      • Visual distinction for each mention.
      • Visual distinction between ENS & non-ENS names.

Work required

  • Go/protocol: Bulk of the work for MVP. Status-go will parse messages to check for mentions. Mentions will be based on a user's pubkey.
  • React: UI is very similar to previous text commands, which can be re-used. We will experiment checking a user's list of known users in react and including ENS name if relevant. If too expensive, we will move to status-go. A few days of work.

Questions & Constraints

  • When does the visual distinction change/fade? e.g. how is a mention marked as read?
  • Concern that receiving mentions in status-react will become too expensive if mentions are frequently used.

v1: Add push notifications: Visual distinction + PN on Android + scroll-to-position


(Design WIP)

  • As an Android user, I receive a push notification when somebody mentions or replies to me in a group or public chat.
    • 3 possible variations depending on system settings:
      • Preview available/mention
      • Preview available/reply
      • Previews hidden
  • When I open the PN, the chat scrolls to the position of the mention.

Work required

  • Go/protocol: Parsing as much as possible in status-go.
  • React: Research required. Likely we will want to pull the mentioned message + 10 on either side of it for buffer. Additional messages load as user scrolls.

Questions & Constraints

  • Can we make scroll to position work for this feature?
    • Main challenge is what to do with all the messages that need to be loaded in between the user's last loaded message, and the mention (if it's 1000 messages back, for instance, that's a performance issue)
  • It is not worth implementing scroll-to-position for iOS because the complexity is too great when dealing with multiple mentions. The better solution is to build v2 - in-app notification center.

v2: In-app notification center: Visual distinction + PN on Android + in-app notification center + scroll-to-position


(Design WIP)

  • As a user, I can visit my notification or activity center at any time to see a list of my recent mentions and replies.
  • When I open a mention or reply from the notification center, I scroll to the position of the message within chat.
  • When I receive a new mention or reply while using Status, it appears in a banner in real time at the top of my screen.

Questions & Constraints

  • How long do notifications live in the notification center?
  • Will not see historical mentions after you first install the in-app notification center build.

Work required

  • Go/protocol: As mentions are parsed out, create a different db entry. To show a notification, create another entry.
  • React: UI is a few days of work.

Future versions

  • Invite people outside of a chat into chat
    • contacts or non-contacts
@rachelhamlin
Copy link
Author

cc @cammellos @yenda @errorists for review

@cammellos
Copy link
Contributor

Looks ok, to me, I would have a more detailed issue for the first iteration, as there's are still a few things to iron out, for example

As a (sending) user, I type the @ symbol to pull up the list of users in a chat—both random names and ENS—and either type or select the person I want to mention.

I guess in a one-to-one is disabled. In a private group chat is the list of users who joined that group chat, in a public chat is not so clear, as it would be anyone who posted in that chat, as there's no concept of membership. That can be a fairly large number, so for the sake of simplicity, should we cap it to the last x users who posted?

@errorists
Copy link

errorists commented Nov 26, 2019

After inserting the @ character, the list should populate with a capped, say 16, number of people you mentioned most recently, ordered from most recent on top. If there's no one yet, then it's empty. As you start typing, only then it would try and match your query with anyone present in the chat.

I'm detailing that in the design now, I find that will be more helpful that a list of everyone present in a chat.

@oskarth
Copy link
Contributor

oskarth commented Dec 3, 2019

Thanks! From a (protocol) spec POV, I believe it'l look something like:

Possibly privacy considerations too, if you mention with a private name and it is in a public channel (e.g.)

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

No branches or pull requests

4 participants