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

Unicode Variant selectors on some emojis work, while others are parsed incorrectly #3179

Closed
3 of 7 tasks
techy-robot opened this issue Nov 19, 2024 · 9 comments · Fixed by #3191 or #3193
Closed
3 of 7 tasks
Labels
priority: high A high priority/important request scope: emojis and signifiers Anything to do with emojis and signifiers scope: parsing markdown See also 'scope: global filter' type: bug Something isn't working

Comments

@techy-robot
Copy link

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Steps to reproduce

  1. Launch an Obsidian vault the latest Tasks 7.13.0 plugin
  2. Create a task by manually entering scheduled or due date emojis (hour glass not done, or calendar) using an emoji picker, not the prompt
  3. Create a tasks query that uses the emojis, e.g.
not done
has scheduled date
sort by description
group by scheduled

Result:
Recognized: - [ ] test ⏳ 2024-11-18, Not recognized: - [ ] test ⏳️ 2024-11-18

Expected Behavior

Tasks should ignore emoji variants like what is described in #2273, except on all emojis. Emoji variants should have no effect on its parsing behavior.

Current behaviour

Currently, Tasks ignores the variant selector on the priority arrows (a previous issue), however it does not ignore it on other emojis like Scheduled. The solution appears to be focused on a specific emoji case, when really it can show up in all emojis. I was initially confused as to why tasks wouldn't show up using a filter, until I played around with different methods of getting the emoji and realized that it must be a variant selector. Sure enough, I was getting \ufe0f\u23f3 on the hour glass emoji that didn't work, and just \ufe0f on the one that did.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.6.7

Tasks Plugin Version

7.13.0

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

Implement a solution similar to #2695, except ignoring variant selectors in all emojis.

@techy-robot techy-robot added the type: bug Something isn't working label Nov 19, 2024
@techy-robot techy-robot changed the title Unicode Variant selectors on some emojis are not recognized Unicode Variant selectors on some emojis work, while others are parsed incorrectly Nov 19, 2024
@claremacrae
Copy link
Collaborator

claremacrae commented Nov 19, 2024

Thanks for logging the issue.

Do you know how the variant selectors got added in the first place?

@claremacrae claremacrae added question Further information is requested scope: parsing markdown See also 'scope: global filter' scope: emojis and signifiers Anything to do with emojis and signifiers labels Nov 19, 2024
@claremacrae
Copy link
Collaborator

using an emoji picker, not the prompt

Can you please be more specific than that. What exact emoji picker did you use?

@claremacrae
Copy link
Collaborator

Why would an emoji picker need to add a variant? What is going on here?

@techy-robot
Copy link
Author

I don't know exactly why the emoji picker added a variant selector on, but over half the emojis I regularly use multiple several Unicode characters instead of one. I'm guessing it's to ensure that the emojis are displayed in color instead of text mode in some applications. Emote is the picker I'm using to enter emojis.

@Cito
Copy link
Contributor

Cito commented Nov 19, 2024

I was getting \ufe0f\u23f3 on the hour glass emoji that didn't work, and just \ufe0f on the one that did.

Do you mean \u23f3\ufe0f on the one that didn't work and just \u23f3 on the one that did? That would make more sense. \ufeof is the variant selector VS16, and it should come after the actual character.

We had a similar issue #2273 which was solved, but it looks like the fix covered only the priority selector, not the other icons.

@claremacrae claremacrae added the priority: high A high priority/important request label Nov 19, 2024
@claremacrae
Copy link
Collaborator

Hi @techy-robot and @Cito,

Thank you both for pointing out the link to #2273.
With that PR I solved the single case, as there was no evidence of any systems adding variant selectors to any other emojis.

Obviously this issue changes that, and a more general solution is now required.

I've added the priority: high label, and will look at it when I have a block of free time. No ETAs.

@claremacrae
Copy link
Collaborator

Reopening.
I didn't intend the above preparatory PR to mark this as closed...

@claremacrae
Copy link
Collaborator

Reopening. I didn't intend the above preparatory PR to mark this as closed...

This time it is really fixed - and with some earlier refactorings, the code is less repetitive and easier to maintain too.

Thanks again for reporting it, @techy-robot.

I have to write some docs for a new feature before I can do the next release. So I'll leave a note here when the release is done...

@claremacrae
Copy link
Collaborator

Just released in Tasks 7.14.0 - Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high A high priority/important request scope: emojis and signifiers Anything to do with emojis and signifiers scope: parsing markdown See also 'scope: global filter' type: bug Something isn't working
Projects
None yet
3 participants