Skip to content
Snippets Groups Projects

Add emoji selector

Closed Jared Redford requested to merge jaredr/pleroma-fe:101-emoji-selector into develop
6 unresolved threads

Closes #101 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
static/font/config.json 100644 → 100755
240 240 "code": 59416,
241 241 "src": "fontawesome"
242 242 },
243 {
244 "uid": "c64623255a4a7c72436b199b05296c4f",
245 "css": "emo-happy",
  • HJ
  • HJ
    HJ @hj started a thread on the diff
  • 3 <span class="emoji-dropdown-toggle" @click.prevent="togglePanel">
    4 <i class="icon-smile"></i>
    5 </span>
    6 <div class="emoji-dropdown-menu panel panel-default" v-if="open">
    7 <div class="panel-heading emoji-tabs">
    8 <span class="emoji-tabs-item" :class="{'active': activeGroup === key}" v-for="(value, key) in emojis" :key="key" :title="value.text" @click.prevent="highlight(key)">
    9 <i :class="value.icon"></i>
    10 </span>
    11 </div>
    12 <div class="panel-body emoji-dropdown-menu-content">
    13 <div class="emoji-search">
    14 <input type="text" class="form-control" v-model="keyword" />
    15 </div>
    16 <div class="emoji-groups" ref="emoji-groups" @scroll="scrolledGroup">
    17 <div v-for="(value, key) in emojis" :key="key" class="emoji-group">
    18 <h6 class="emoji-group-title" :ref="'group-' + key">{{value.text}}</h6>
  • Jared Redford added 1 commit

    added 1 commit

    Compare with previous version

  • HJ
    HJ @hj started a thread on the diff
  • 37 this.$refs['emoji-groups'].scrollTop = top + 1
    38 this.activeGroup = key
    39 },
    40 scrolledGroup (e) {
    41 const top = e.target.scrollTop
    42 Object.keys(this.emojis).forEach(key => {
    43 if (this.$refs['group-' + key][0].offsetTop < top) {
    44 this.activeGroup = key
    45 }
    46 })
    47 }
    48 },
    49 computed: {
    50 emojis () {
    51 const standardEmojis = this.$store.state.instance.emoji || []
    52 const customEmojis = this.$store.state.instance.customEmoji || []
    • Maintainer

      should be sorted, but not here - where it's obtained (instance.js i believe) since order is all over the damn place.

    • Please register or sign in to reply
  • HJ
    HJ @hj started a thread on the diff
  • 44 this.activeGroup = key
    45 }
    46 })
    47 }
    48 },
    49 computed: {
    50 emojis () {
    51 const standardEmojis = this.$store.state.instance.emoji || []
    52 const customEmojis = this.$store.state.instance.customEmoji || []
    53 return {
    54 standard: {
    55 text: 'Standard',
    56 icon: 'icon-star',
    57 emojis: filterByKeyword(standardEmojis, this.keyword)
    58 },
    59 custom: {
    • Maintainer

      I think custom emojis are much more often used in fedi and should have higher priority over unicode ones.

    • Please register or sign in to reply
  • HJ
    HJ @hj started a thread on the diff
  • 118 }
    119 }
    120
    121 &-item {
    122 width: 34px;
    123 height: 34px;
    124 box-sizing: border-box;
    125 display: flex;
    126 font-size: 16px;
    127 align-items: center;
    128 justify-content: center;
    129 padding: 5px;
    130 cursor: pointer;
    131
    132 img {
    133 max-width: 100%;
    • Maintainer

      i'd make it size of container with object-fit: contain for consistency, probably can remove wrapper, too

    • Please register or sign in to reply
  • HJ
    HJ @hj started a thread on the diff
  • 1 <template>
    2 <div class="emoji-dropdown" @click.prevent="insideClicked">
  • Maintainer

    image

    Conflicts with already existing picker

  • Maintainer

    I'm REALLY not liking that there's copypaste between post form and emoji input.

    Also i EXPLICITLY ASKED you to refactor EmojiInput before you do Emoji picker, so please do that and then we can see about this MR.

    Edited by HJ
  • HJ mentioned in merge request !895 (merged)

    mentioned in merge request !895 (merged)

  • Please register or sign in to reply
    Loading