Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developers:feature_ideas:stickers [2015/07/30 00:48]
promctagonist created - moved from /developers/stickers
developers:feature_ideas:stickers [2016/02/29 02:18] (current)
promctagonist [Storage] change filenames and mention order numbers
Line 13: Line 13:
 ===== User-Facing Behavior ===== ===== User-Facing Behavior =====
  
-{{  :sticker_popup_mockup.png?400|Proposal for popup menu design from https://github.com/tux3/qTox/issues/1294}}+{{ :users:sticker_popup_mockup_graphical.png?400|Graphical mockup of sticker menu.}}
  
 +{{ :sticker_popup_mockup.png?400|Proposal for popup menu design from https://github.com/tux3/qTox/issues/1294}}
  
 ==== Sending/In the Popup ==== ==== Sending/In the Popup ====
Line 27: Line 28:
  
 When a sticker is clicked or tapped, it is sent immediately and appears inline in the chat form. When a sticker is clicked or tapped, it is sent immediately and appears inline in the chat form.
 +
  
 ==== Receiving/In the Chat Form ==== ==== Receiving/In the Chat Form ====
  
 Animated stickers should play as long as they are the most recent sticker in the conversation. After that, they should play when hovered over. On touch devices, tapping takes the place of hovering. Animated stickers should play as long as they are the most recent sticker in the conversation. After that, they should play when hovered over. On touch devices, tapping takes the place of hovering.
 +
  
 ==== Saving/Sharing ==== ==== Saving/Sharing ====
Line 41: Line 44:
 ===== Technical Implementation ===== ===== Technical Implementation =====
  
-This includes the format in which sticker packs are stored (I vote for zipped folders with custom extension), the location, how we should detect if a user has a pack already, how animation should be done (svg spritesheets would be beautiful but might have to be NIHed, gifs are terrible but everyone knows them, webm is best but hard to make [maybe release a converter as a part of the Tox StickerMaker Premium Suite], >apng), etc+//This includes the format in which sticker packs are stored (I vote for zipped folders with custom extension), the location, how we should detect if a user has a pack already, how animation should be done (svg spritesheets would be beautiful but might have to be NIHed, gifs are terrible but everyone knows them, webm is best but hard to make [maybe release a converter as a part of the Tox StickerMaker Premium Suite], >apng), etc//
  
 Keep in mind the potential of the Tox sticker pack to become an open sticker format usable by all free software, like the KDE emoticon packs used by qTox. Keep in mind the potential of the Tox sticker pack to become an open sticker format usable by all free software, like the KDE emoticon packs used by qTox.
  
-==== File Structure ====+==== Sending ====
  
-    ~/.config/tox/stickers/+Once a sticker is selected by the user, it should be sent as a file transfer of TOX_FILE_KIND_STICKER with the name being a hash of its <del>content</del> <del>path</del> <del>name</del> something. //Discussion needed.// 
 + 
 +==== Receiving ==== 
 + 
 +When a client receives a sticker file transfer request, it first checks if that hash is already in the [[stickers#cache|cache]]. If it is, the file transfer is denied and the cached sticker is used instead. This mechanism addresses bandwidth concerns on mobile devices. 
 + 
 +==== Storage ==== 
 + 
 +=== Packs === 
 + 
 +A Sticker Pack is a zipped folder containing stickers, an about.txt, and a pack.png/svg/etc. The Sticker Packs are what appear in the client's sticker-sending popup. This is the user's collection of stickers. Sticker filenames end with numbers, according to the order they should be displayed in. 
 + 
 +    ~/.config/tox/stickers/packs/
      |      |
-     |--Cute Grey Striped Cat/+     |--Orange Cat.zip
        |        |
 +       |--pack.svg
        |--about.txt        |--about.txt
-       |--cat_sitting.svg +       |--grin_1.svg 
-       |--cat_making_cake.svg +       |--heart_eyes_2.svg 
-       `--cat_quizzical.svg+       `--kiss_3.svg
      |      |
-     `--pack_2/+     `--pack_2.zip
          |          |
 +         |--pack.png
          |--about.txt          |--about.txt
          |--sticker_1.png          |--sticker_1.png
          |--sticker_2.png          |--sticker_2.png
          `--sticker_3.png          `--sticker_3.png
 +         
 +The file about.txt contains information about the pack. //Should we make it an ini and do real metadata or nah?//
 +
 +The file pack.png/svg/etc is an image used as the thumbnail of the pack as displayed in the client's sticker popup.
 +
 +=== Cache ===
 +
 +The Sticker Cache is a directory that contains all received stickers, stored flatly.
 +
 +    ~/.config/tox/stickers/cache/
 +     |
 +     |--hash.svg
 +     |--hash.png
 +     |--hash.gif
 +     `--hash.svg
 +     
 +//It would be neat to prune/retain stickers from the cache based on how often they're received  //
 +
 +=== Getting ===
 +
 +When a user opts to download a sticker pack from a friend, a file transfer should be initiated and the sticker pack should be automatically saved to the correct location.
 +
 +
  
Print/export