[feat] Allow setting custom emoji as icon for emoji pack #419

Open
opened 2024-09-27 15:40:10 +00:00 by pounce · 2 comments

The idea

Akkoma should allow setting the emoji which represents an icon pack in akkoma-fe. This could be represented in the pack.json as follows:

{
  "files": {
    "an_emoji": "image.jpg",
    "most_unique_emoji": "special.png" 
  },
  "pack": {
    "description": "my emoji pack",
    "share-files": true,
    "default-emoji": "most_unique_emoji"
  }
}

Then when browsing "an emoji pack" in akko-fe, the thumbnail of "my emoji pack" should be special.png instead of image.jpg

The reasoning

It's often hard to figure out what 'tab' represents an emoji pack if you have lots of them. The names aren't listed in akko-fe (until hover), and they are identified only by their icon which is identified by the first emoji, sorted by shortcode. For example, on nyan.network I have a pack called 'Nyan Network'. I want this pack identified by the emoji :nyan_network:, but 'n' is unfortunately a bit far down the alphabet, so other emojis show up first.

There was a discussion on IRC about this and the consensus was that a feature request should be opened.

Have you searched for this feature request?

  • I have double-checked and have not found this feature request mentioned anywhere.
  • This feature is related to the pleroma-fe Akkoma frontend specifically, and not the backend.
### The idea Akkoma should allow setting the emoji which represents an icon pack in akkoma-fe. This could be represented in the pack.json as follows: ```json { "files": { "an_emoji": "image.jpg", "most_unique_emoji": "special.png" }, "pack": { "description": "my emoji pack", "share-files": true, "default-emoji": "most_unique_emoji" } } ``` Then when browsing "an emoji pack" in akko-fe, the thumbnail of "my emoji pack" should be `special.png` instead of `image.jpg` ### The reasoning It's often hard to figure out what 'tab' represents an emoji pack if you have lots of them. The names aren't listed in akko-fe (until hover), and they are identified only by their icon which is identified by the first emoji, sorted by shortcode. For example, on nyan.network I have a pack called 'Nyan Network'. I want this pack identified by the emoji `:nyan_network:`, but 'n' is unfortunately a bit far down the alphabet, so other emojis show up first. There was a discussion on IRC about this and the consensus was that a feature request should be opened. ### Have you searched for this feature request? - [x] I have double-checked and have not found this feature request mentioned anywhere. - [x] This feature is related to the pleroma-fe Akkoma frontend specifically, and not the backend.
Author

not sure if akko changes are required as well. I quickly looked at the source and couldn't see any validation done to pack.json, so this might be possible without any backend changes.

not sure if akko changes are required as well. I quickly looked at the source and couldn't see any validation done to pack.json, so this might be possible without any backend changes.
Member

The thing is:

Mastodon emoji listing API does not contain the pack.json data and there’s no good place to add any global metadata since it’s a top-level list of emoji.

*oma API can (a) list pack names and (b) return the pack.json data for a given pack, but the latter only includes file paths relative to the pack.json file, not image URLs for the emoji, thus it’s not suitable for use in the frontend

So while in theory, with ugly and costly reprocessing of the initial emoji list and a bunch of extra queries to get all pack.json data it could be done frontend-side now, a sane implementation necessitates a new API.

The thing is: [Mastodon emoji listing API](https://docs.joinmastodon.org/methods/custom_emojis/#get) does not contain the pack.json data and there’s no good place to add any global metadata since it’s a top-level list of emoji. \*oma API can (a) list pack names and (b) return the `pack.json` data for a given pack, but the latter only includes file paths relative to the pack.json file, not image URLs for the emoji, thus it’s not suitable for use in the frontend So while in theory, with ugly and costly reprocessing of the initial emoji list and a bunch of extra queries to get all `pack.json` data it *could* be done frontend-side now, a sane implementation necessitates a new API.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma-fe#419
No description provided.