Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook reaction pickers into the system's recently used keyboard emojis #3453

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

stefanceriu
Copy link
Member

The way this works is by opening the com.apple.EmojiPreferences suite and then getting the EMFDefaults.EMFRecentsKey from it. The same goes in opposite direction when chosing a reaction from the app.

NB

  • the feature is currently only enabled on development builds
  • there will be no changes on the mac until we figure out what to do with the context menu

Screenshot 2024-10-25 at 16 17 35

Screenshot 2024-10-25 at 16 17 25

@stefanceriu stefanceriu requested a review from pixlwave October 25, 2024 13:28
@stefanceriu stefanceriu requested a review from a team as a code owner October 25, 2024 13:28
Copy link

github-actions bot commented Oct 25, 2024

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against 4f0c88b

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

👏

@stefanceriu stefanceriu enabled auto-merge (squash) October 25, 2024 14:09
Copy link

Copy link

codecov bot commented Oct 25, 2024

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
849 3 846 0
View the top 3 failed tests by shortest run time
PreviewTests test_secureBackupRecoveryKeyScreen()
Stack Traces | 2.17s run time
failed - Snapshot "Not set up" does not match reference.

@−
"file:.../__Snapshots__/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-en-GB.Not-set-up.png"
@+
"file:.../tmp/PreviewTests/test_secureBackupRecoveryKeyScreen-iPhone-16-en-GB.Not-set-up.png"

To configure output for a custom diff tool, use 'withSnapshotTesting'. For example:

    withSnapshotTesting(diffTool: .ksdiff) {
      // ...
    }

The percentage of pixels that match 0.9957123 is less than required 1.0
The lowest perceptual color precision 0.70734376 is less than required 0.98 (.../PreviewTests/Sources/PreviewTests.swift:84)
PreviewTests test_createRoom()
Stack Traces | 3.07s run time
failed - Snapshot "Create Room" does not match reference.

@−
"file:.../__Snapshots__/PreviewTests/test_createRoom-iPhone-16-en-GB.Create-Room.png"
@+
"file:.../tmp/PreviewTests/test_createRoom-iPhone-16-en-GB.Create-Room.png"

To configure output for a custom diff tool, use 'withSnapshotTesting'. For example:

    withSnapshotTesting(diffTool: .ksdiff) {
      // ...
    }

The percentage of pixels that match 0.957489 is less than required 1.0
The lowest perceptual color precision 0.39937502 is less than required 0.98 (.../PreviewTests/Sources/PreviewTests.swift:84)
PreviewTests test_secureBackupScreen()
Stack Traces | 7.51s run time
failed - Snapshot "Both setup" does not match reference.

@−
"file:.../__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Both-setup.png"
@+
"file:.../tmp/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Both-setup.png"

To configure output for a custom diff tool, use 'withSnapshotTesting'. For example:

    withSnapshotTesting(diffTool: .ksdiff) {
      // ...
    }

The percentage of pixels that match 0.92419434 is less than required 1.0
The lowest perceptual color precision 0.29250002 is less than required 0.98 (.../PreviewTests/Sources/PreviewTests.swift:84)

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@frebib
Copy link

frebib commented Oct 25, 2024

Does this mean the information won't be sync'ed with Element Web's own tracking of frecently used emojis in account data?

@stefanceriu stefanceriu added the pr-feature for a new feature label Oct 25, 2024
@stefanceriu stefanceriu disabled auto-merge October 25, 2024 16:58
@stefanceriu stefanceriu merged commit 7a47e37 into develop Oct 25, 2024
7 of 9 checks passed
@stefanceriu stefanceriu deleted the stefan/1934 branch October 25, 2024 16:58
@Hywan
Copy link
Member

Hywan commented Oct 28, 2024

That's neat!

@Hywan
Copy link
Member

Hywan commented Oct 28, 2024

@frebib indeed, this information is not synced, it's only device-specific.

@simonmichael
Copy link

simonmichael commented Nov 8, 2024

If this is what I think it is, thank you very much! Emoji favourites save much time.

With today's 1.9.4 testflight EXI build I see two emoji pickers.

  1. when I focus the message text field and press the keyboard's emoji button:
image
  1. when I long press on a message:
image

And when I press on the more icon here I get

  1. a full-screen vertical scroll picker:
image

I can't quite remember what it showed before this release - something less native-looking that didn't know my favourites (perhaps it was 3). 1 is much more usable. Hopefully favourites will be coming to the reacting-to-message case as well in due course!

(iphone SE 2nd generation, IOS 18.0.1)

@simonmichael
Copy link

simonmichael commented Nov 8, 2024

Update for other users/testers after some advice from chat.

This is disabled by default. To test it, you need to enable the secret developer options screen in app settings, then enable the Timeline -> Show frequently used emojis toggle:

image

After doing this, reacting to a message (my image 2 above) shows your recent reactions instead of generic ones , and the full browser (my image 3) now has a Frequently used section at the top (like the images at top of this issue page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants