Skip to content

feat: add an emoji picker#35019

Merged
pauldambra merged 38 commits into
masterfrom
feat/pd/em-pi
Jul 16, 2025
Merged

feat: add an emoji picker#35019
pauldambra merged 38 commits into
masterfrom
feat/pd/em-pi

Conversation

@pauldambra
Copy link
Copy Markdown
Member

@pauldambra pauldambra commented Jul 14, 2025

we want to make emoji commenting easier...
having the emojis in the comment form made people think they could add emojis to the text of the comment
reasonable

so...

  • switch to an emoji icon instead of a down arrow for the quick emoji reaction
  • add an emoji picker to the text area footer so that folk can add emojis when typing
  • keep track of frequency of emoji use and use frequently used emojis for quick emoji row
  • add an emoji picker to the quick emoji row

2025-07-15 12 02 47

2025-07-15 19 51 06

locally it takes ~90ms to comment
earlier for some reason one of the calls took 3 seconds and I realised you get no feedback on a slower network so

2025-07-15 22 09 43

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 14, 2025

Size Change: +29.8 kB (+1.15%)

Total Size: 2.61 MB

Filename Size Change
frontend/dist/toolbar.js 2.61 MB +29.8 kB (+1.15%)

compressed-size-action

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

  • chromium: 0 added, 6 modified, 0 deleted (diff for shard 16)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

  • chromium: 0 added, 6 modified, 0 deleted (diff for shard 16)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

4 snapshot changes in total. 0 added, 4 modified, 0 deleted:

  • chromium: 0 added, 4 modified, 0 deleted (diff for shard 15)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

  • chromium: 0 added, 6 modified, 0 deleted (diff for shard 16)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@pauldambra
Copy link
Copy Markdown
Member Author

split out #35040 to avoid crossing the streams

Comment on lines +12 to +31
const EmojiPickerCategoryHeader = ({ category, ...props }: EmojiPickerListCategoryHeaderProps): JSX.Element => (
<div className="bg-bg-light px-3 pt-3 pb-1.5 font-medium text-neutral-600 text-sm" {...props}>
{category.label}
</div>
)

const EmojiPickerEmojiRow = ({ children, ...props }: EmojiPickerListRowProps): JSX.Element => (
<div className="scroll-my-1.5 px-1.5" {...props}>
{children}
</div>
)

const EmojiPickerEmojiButton = ({ emoji, ...props }: EmojiPickerListEmojiProps): JSX.Element => (
<button
className="flex items-center justify-center rounded-md text-xl size-8 data-[active]:bg-secondary-3000-hover"
{...props}
>
{emoji.emoji}
</button>
)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these don't really need to be split out... i was going to add recent emojis in this PR but decided to split it
i'll need these as separate components in that follow-up since I'll be adding a custom row of results

Comment thread frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsx Outdated
Comment on lines +59 to +61
icon={<IconComment className="text-lg" />}
sideAction={{
icon: <IconEmoji className="text-lg" />,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this button and its bar are getting pretty busy again 🫠

@pauldambra pauldambra marked this pull request as ready for review July 15, 2025 15:37
@pauldambra pauldambra requested a review from veryayskiy July 15, 2025 15:38
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR improves the UX around emoji reactions by changing how users interact with emojis in comments. The main changes include:

  1. Replacing the down arrow with a dedicated emoji icon
  2. Adding an emoji picker popover using the 'frimousse' library
  3. Moving emoji selection from the comment form to a dedicated picker in the text area footer
  4. Updating the @posthog/icons package to support new emoji icons

The changes are well-scoped and address a specific UX issue where users were confused about emoji placement in comments. The implementation follows existing UI patterns and sets up for future improvements around emoji usage tracking.

Confidence score: 3/5

  1. This PR is moderately safe to merge but requires careful testing of the emoji picker integration
  2. While the core changes are solid, there's a TypeScript type issue in EmojiPickerPopover that needs attention, and the loading state handling could be improved
  3. Files needing attention:
    • frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsx (TypeScript issues)
    • frontend/src/lib/lemon-ui/LemonTextArea/LemonTextArea.tsx (spacing changes)

8 files reviewed, 6 comments
Edit PR Review Bot Settings | Greptile

Comment thread frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx Outdated
Comment thread frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx
Comment thread frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsx
Comment thread frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsx Outdated
Comment thread frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsx Outdated
@pauldambra pauldambra requested a review from Copilot July 15, 2025 19:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an emoji picker feature to improve emoji commenting in session recordings. The implementation includes tracking emoji usage frequency and replacing hardcoded emoji lists with user-personalized favorites.

  • Adds a new emoji picker component with popover functionality using the frimousse library
  • Implements emoji usage tracking with local storage persistence to show frequently used emojis
  • Integrates emoji picker into both quick comment actions and text area markdown editor

Reviewed Changes

Copilot reviewed 10 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Updates @posthog/icons dependency to support new emoji icons
frontend/package.json Adds frimousse emoji picker library dependency
playerFrameCommentOverlayLogic.ts Removes hardcoded quickEmojis array (moved to usage logic)
CommentOnRecordingButton.tsx Integrates emoji usage tracking and picker into quick comment functionality
emojiUsageLogic.ts New logic for tracking emoji usage frequency with 30-day retention
LemonTextAreaMarkdown.tsx Adds emoji picker to markdown text area footer
LemonTextArea.tsx Minor styling adjustment removing gap in footer actions
EmojiPickerPopover.tsx New emoji picker popover component with custom styling
EmojiPickerPopover.stories.tsx Storybook stories for the new emoji picker component
categories.ts Adds new emoji icons to the icon categories
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread frontend/src/lib/lemon-ui/LemonTextArea/emojiUsageLogic.ts Outdated
Comment thread frontend/src/lib/lemon-ui/LemonTextArea/LemonTextAreaMarkdown.tsx Outdated
Comment thread frontend/src/lib/components/EmojiPicker/EmojiPickerPopover.tsx
@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

8 snapshot changes in total. 0 added, 8 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Copy Markdown
Contributor

@veryayskiy veryayskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💖👍🌶️

@posthog-bot
Copy link
Copy Markdown
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@pauldambra pauldambra merged commit 4eea968 into master Jul 16, 2025
157 checks passed
@pauldambra pauldambra deleted the feat/pd/em-pi branch July 16, 2025 13:49
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

Successfully merging this pull request may close these issues.

5 participants