damus-io / damus

iOS nostr client
GNU General Public License v3.0
2k stars 289 forks source link

Render Custom :shortcode: emoji support NIP-30 #2003

Open alltheseas opened 8 months ago

alltheseas commented 8 months ago

user story

As a Damus and emoji aficionado, I would like to be able to see & share custom emojis, so that I can increase my enjoyment of nostr.

Acceptance criteria

  1. Damus user can read custom shortcode emoji
  2. Damus user can send custom shortcode emoji

implementation

Example note with emoji links in tags

https://gist.github.com/mattn/9b43595824750c3794902d77ec9deb71

NIP-30

List of generic shortcode emojis: https://emojibase.dev/shortcodes/?

Origin image

https://damus.io/nevent1qqs0hw2euptpu5k6t6ruyx6wtvvp9czzjeyr0eyj9ltru3p6gl9z8jgpramhxue69uhkummnw3ez6un9d3shjtnwda4k7arpwfhjucm0d5hsz9mhwden5te0wfjkccte9ehx7um5wghxyctwvshszythwden5te0dehhxarj9emkjmn99uqsuamnwvaz7tmev9382tndv5hsvu7lx4

alltheseas commented 8 months ago

Example link with shortcode:

https://damus.io/nevent1qvzqqqqqqypzq2aj4wlutzft00dg77x4x6pdjy7vnfzxk30pry5lpy6a3l0uks9aqy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqyp7a3z7nlr4p4eqhyckmpkcql6rses4p23f5rlpcpaptg8upe4a07c50gha

https://njump.me/nevent1qvzqqqqqqypzq2aj4wlutzft00dg77x4x6pdjy7vnfzxk30pry5lpy6a3l0uks9aqy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqyp7a3z7nlr4p4eqhyckmpkcql6rses4p23f5rlpcpaptg8upe4a07c50gha

alltheseas commented 8 months ago

Clients that support

Nostter noStrudel Amethyst Rabbit (I am not sure to whether it's only reactions or kind1 also)

mattn commented 8 months ago

njump will fix by https://github.com/fiatjaf/njump/pull/42

alltheseas commented 8 months ago

open question

How are inline emojis displayed in notecrumbs (e.g. in telegram or other places where damus.io/neventlinks are shared)?

kernelkind commented 7 months ago

I'm working on this

alltheseas commented 7 months ago

Do you think you can fit this in for current sprint @kernelkind ?

kernelkind commented 7 months ago

I believe I can do rendering this sprint

kernelkind commented 7 months ago

Can we break this issue up into multiple? I recommend the following issues:

alltheseas commented 7 months ago

Can we break this issue up into multiple? I recommend the following issues:

  • rendering custom emojis
  • Ability to add custom emojis from local cache/db to new post
  • uploading new custom emojis

Yes, great suggestion

2055

2056

jb55 commented 7 months ago

On Thu, Mar 14, 2024 at 02:20:29PM -0700, kernelkind wrote:

Can we break this issue up into multiple? I recommend the following issues:

  • rendering custom emojis
  • Ability to add custom emojis from local cache/db to new post
  • uploading new custom emojis

yes, makes sense!

alltheseas commented 6 months ago

@jb55 has performance worries about this. Can @kernelkind @danieldaquino help test performance impacts of this feature add?

alltheseas commented 6 months ago

1) manual test first, 2) go to profiler ("xcode instruments"). SwiftUI profiler is good. Shares info about SwiftUI views (e.g. if views getting invalidated too quickly). Can help test network bandwidth.

Should collect network stats on individual components. Will suspects images. Some people suspect relay queries.

alltheseas commented 6 months ago

related

measure and attribute data https://github.com/damus-io/damus/issues/1838

alltheseas commented 6 months ago

NostrSDK supports NIP-30 https://github.com/nostr-sdk/nostr-sdk-ios?tab=readme-ov-file

cc @tyiu @joelklabo @bryanmontz

jb55 commented 5 months ago

there's a lot involved to implement this well:

I can start putting together a tracking issue for this

jb55 commented 5 months ago

I will use this as the tracking issue