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

Feat/emojis as project icons #3575

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stavby
Copy link
Contributor

@stavby stavby commented Oct 12, 2024

Description

Add the option to use emojis as project and tag icons:

image
image

(I also fixed a test in the last commit - the test date has passed and it started failing because of that, I moved the date to 2030 so it stays on saturday and won't pass soon)

Issues Resolved

#3558

Check List

  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@johannesjo
Copy link
Owner

Hey there! Thank you very much for providing this PR! This is a really nice addition and I'd very much like to see this Incorporated.

I am wondering however if there maybe is an alternative route we can go, because @ctrl/ngx-emoji-mart is not a small dependency. I should have mentioned this before you started, but adding new dependencies is always a bit tricky, since they often require some extra maintenance in the long run and sometimes need to be replaced completely, which is often painful. When you made the proposition about this features I was expecting something with only native utf emojis, which would have been much more lightweight. Should have spelled this out before. I am sorry for that!

What do you think? Would be using only native utf emojis also be a possible option?

On a further note: I had a little bit of difficulties getting to the emojis in the picker, since they only show up last. Maybe we can also improve on that.

@stavby
Copy link
Contributor Author

stavby commented Oct 13, 2024

Hey,
I understand what you're saying, although I still think that dependency is the best option.

I used it because of 2 main advantages:

  1. Custom emoji set display (I used Apple's) - Windows and Android emojis look terrible in my opinion and I liked that I can use better looking ones.
  2. Emoji search - it provides an API to search emojis in a smart way, the alternative would be to let the user paste emojis which they might not know about and not a common thing to do using PCs. You could also maintain a list of all emojis (which the package provides), but I think that's too much of a pain.

I don't support using native emojis, so it's up to you if you want to go forward with this PR, I did use a heavy dependency without consulting you so that's on me too.
About the order - we can make the emojis show up before the icons.

@johannesjo
Copy link
Owner

Hey there @stavby ! I spent quite some time thinking about this. I am all for adding basic unicode icons (which we could extract from here: https://github.com/missive/emoji-mart/blob/main/packages/emoji-mart-data/sets/5/native.json), but adding such a big dependency (the apple icons alone are 4.2MB) doesn't feel right to me personally. Using this would also affect the user data the app saves, which would make migrating away, when needed, all the more difficult. Unicode icons on the other hand, are a widely used (though a bit inconsistent) standard.

I am very sorry for the time you sunk into this and I hope you can understand my reasoning. It would be great if you could rework the PR, but I also would totally understand if you choose not to.

Not sure if I am overlooking anything, but in my head a possible implementation would work like this:

  • the native.json is extracted into a list of id and unicode icon (e.g. [{id:'smile',ico:"😊'}])
  • the icons are just integrated and alphabetically sorted into the existing list and the id is used for selecting the icons in the autocomplete
  • we display icons by making use of the mat-icon component (if not possible, we use a dedicated wrapper component instead)

Alternatively we could add a dedicated picker just listing all the unicode icons, such as messengers like whatsapp do.

What do you think?

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.

2 participants