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

Emoji Picker & Comment improvements #11946

Merged
merged 21 commits into from Apr 22, 2022
Merged

Emoji Picker & Comment improvements #11946

merged 21 commits into from Apr 22, 2022

Conversation

Nitwel
Copy link
Member

@Nitwel Nitwel commented Mar 4, 2022

grafik

@Nitwel Nitwel marked this pull request as ready for review March 4, 2022 17:12
@benhaynes
Copy link
Sponsor Member

Thanks, @Nitwel!! Here are a few things:

  • When we open the emoji chooser, let's give the search box focus so they can filter immediately
  • Let's give the search bar a white background (--background-input)
  • Can we align the emoji picker with the comment textarea so it's not so far left?
  • When I focus on the search box, the comment box loses its focus/cursor location... and the emoji is always added to the beginning of the comment instead of my previous cursor position.
  • The Skin color dropdown is overlapping the icons below (let's give it a background to avoid this)
  • Is there a way to show all emoji in one long scroll instead of by category (similar to Discord)? If not, then we should make the categories gray to differentiate them.
  • We need to more clearly separate the category and recently used from the scrolling list
  • My comments aren't saving properly... they save, but are empty.
  • Let's add a cancel button to the Comment form (left of the Submit button)

Screen Shot 2022-03-08 at 10 11 21 AM

@Nitwel
Copy link
Member Author

Nitwel commented Mar 8, 2022

When I focus on the search box, the comment box loses its focus/cursor location... and the emoji is always added to the beginning of the comment instead of my previous cursor position.

What browser are you using as it worked in Firefox?

My comments aren't saving properly... they save, but are empty.

You have to make sure that DB_CHARSET="utf8mb4_unicode_ci" or something similar is set as the DB sometimes doesn't know what the emojis are by default.

Let's add a cancel button to the Comment form (left of the Submit button)

We have that when editing a comment but what should it do when writing new comments?
Clear the current text?

@benhaynes
Copy link
Sponsor Member

Browser: Chrome (latest)

We have that when editing a comment but what should it do when writing new comments?

Yeah, clear the text and collapse the input back down. I see that you removed that collapse, but I think it's nice, so let's add that back in. Before the user has taken action, the comment input should be short (one line) and have the placeholder: Comment.... Then focusing on it would expand the height and show the other buttons. It would collapse on blur, unless there is text in the input.

Also, when an emoji is at the end of a line, it's getting overflow cut off:
Screen Shot 2022-03-08 at 10 51 06 AM

@rijkvanzanten
Copy link
Member

@benhaynes What exact version of chrome? Latest can mean 98, 99, or 100 depending on exact OS and other variables 🙇🏻‍♂️

@benhaynes
Copy link
Sponsor Member

benhaynes commented Mar 8, 2022

Nils and I are discussing on Chat-A, going to switch to a more popular (powerful) Emoji library that solves all these issues

Copy link
Member

@rijkvanzanten rijkvanzanten left a comment

Choose a reason for hiding this comment

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

For future changes, lets do the refactor to script setup in a separate PR. It's very difficult to see what you changed vs what was already there before

@rijkvanzanten rijkvanzanten enabled auto-merge (squash) April 21, 2022 21:37
@rijkvanzanten rijkvanzanten added this to the v9-next milestone Apr 21, 2022
@rijkvanzanten rijkvanzanten merged commit 7639023 into main Apr 22, 2022
@rijkvanzanten rijkvanzanten deleted the emoji-picker branch April 22, 2022 16:18
@koksikus
Copy link

koksikus commented Apr 22, 2022

I do not know why but for me there are only ??? without icon.

@rijkvanzanten
Copy link
Member

@koksikus Sounds like MySQL w/ a collation that doesn't support emojis. See #12287 for a longer thread on the same thing 👍🏻

AustinPhillipTaylor pushed a commit to AustinPhillipTaylor/directus that referenced this pull request May 11, 2022
* add simple emoji picker and improve comments

* add v-md option to open in new tab

* fix styling when editing comment

* clean up code

* use script setup

* use different emoji lib

* fix inserting emojis into text

* fix search styling

* always show cancel button

* comment style tweaks

* clean up emoji picker

* add placeholder to v-template-input

* cleanup comments some more

* clean up comments sooooome more

* fix notify message on update

* update comment markdown styling

* button and icon hover colors

* move styling to global file

* clean up code

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Ben Haynes <ben@rngr.org>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants