-
Notifications
You must be signed in to change notification settings - Fork 111
Add emoji picker to menubar (Fixes: #987) #1707
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
Conversation
This comment has been minimized.
This comment has been minimized.
Yes, that one is indeed a bit tricky. The reason I went for the array instead of having the buttons directly in the component is that this allows to do some straight forward subset for rendering the popovermenu if the space exceeds the width. I might need to think about that a bit more. |
|
And I think a rebase is probably needed... |
dc7dec8 to
25c17ee
Compare
After thinking about it a second time, I'm more confident with my solution of special-treating the EmojiPicker in the for-loop. Beware though that the way I implemented it results in the EmojiPicker being always displayed as the last non-hidden tool. That's on purpose, given that adding an emoji would require three clicks otherwise (open popovermenu, open emojipicker, select emoji). Let me know what you think about it :) |
We could probably have a dedicated component with a slot that takes all the actions and then does conditional rendering based on the slot elements but not fully sure if that would be successful. Something similar how it is done in the actions component https://github.com/nextcloud/nextcloud-vue/blob/master/src/components/Actions/Actions.vue#L649 |
|
Anyways I'd be fine with the current workaround for now. Doesn't seem too bad ;) |
To be honest, I'm not sure whether it's worth the effort at the moment 😉. But you decide. If you'd like it to be that way, I'd give it a try.
Yay 😊 Feel free to approve/merge. I just changed the PR from draft to ready to merge. |
|
Rebased on latest master. |
|
😍 |
|
Awesome contribution @mejo- 👏 |
Summary
This is a first attempt to add the emoji picker to the text editor menubar. It works for me, but still has some rough edges.
Here's a screencast:
I'm curious to hear your thoughts @juliushaertl and @azul 😊
The way menu actions are organized in
src/mixins/menubar.jsat the moment unfortunately is a bit limited. Since the emoji picker isn't a simple<button>or<ActionButton>element and I prefer to reuse the<EmojiPicker>component from nextcloud-vue, I went a different route: I added the emoji action insrc/mixins/menubar.jsbut special-treated it in theMenuBarcomponent. I'm not particularly happy with this approach though. Maybe you have a better idea for a clean implementation?