Closed mejo- closed 1 year ago
Dear @narF_narF, thanks for your report. Indeed there's no way to unset the emoji for a page or collective at the moment. To better understand your usecase, could you explain what's the reason for you to not assign a fitting emoji but instead wanting to clear the emoji?
In GitLab by @narF_narF on Dec 12, 2022, 17:45
I accidentally added an emoji to 1 file in a folder. Now this file visually stands out compared to all other documents in that folder (who have no emoji). If I want all documents in that folder to look the same, our organization would need to add the same emoji to all past and future documents created in that folder. At this point it would probably be easier to just duplicate the document to a new one without the emoji.
In general, users expectation of software is that every action should be revertible. If an action will have a permanent effect (such as deleting a file permanently), there should be a warning message informing users that this action cannot be reverted. Which, for an emoji picker, would be quite unexpected and confusing.
Maybe you could explain me why it's so difficult to implement a mechanism for removing emojis?
Dear @narF_narF. In general I agree that there should be a way to remove the emoji of a page.
Maybe you could explain me why it's so difficult to implement a mechanism for removing emojis?
Sure. We use an external javascript library as emoji picker. Unfortunately, until now, this picker doesn't support to select an "empty emoji". I now went ahead and opened a feature request against the upstream project: https://github.com/serebrov/emoji-mart-vue/issues/253
Adding an own action "Remove emoji" would be a bit too heavy and clutter the actions menu in my eyes.
In the meantime, you could detect if the user presses Esc or Del or Backspace on the keyboard while the emoji picker is open, and remove the emoji. It's not ideal because it's hidden and not touch-devices friendly, but it's at least better than the status quo.
Another option would be to display a delete button only when mouse over the emoji. You could even use the ⛔ emoji for that button! 😋
The note app Joplin moved the emoji picker inside the popup when editing the name of a notebook: Maybe Collectives could display the ⛔ button on the emoji picker when the cursor is inside the title textbox? This way, it would let users on touch devices be able to remove the emoji.
I have more ideas if you're interested.
For anyone reading this and looking for a solution on how to remove an emoji, a workaround is to go in the File app and locate the file of the Collective page, and then duplicate that file. The copy will not have the emoji. (The downside is that it will break links to that page, if any)
Hello, I'm facing the same issue as @narFnarF and would like to request some kind of fix as well.
Sure. We use an external javascript library as emoji picker. Unfortunately, until now, this picker doesn't support to select an "empty emoji". I now went ahead and opened a feature request against the upstream project: serebrov/emoji-mart-vue#253
Adding an own action "Remove emoji" would be a bit too heavy and clutter the actions menu in my eyes.
I have to disagree here. As you correctly state, you are using an external library for picking an emoji. Once you pick this emoji, the picker somehow returns the emoji picked for futher use. However, this has nothing to do with how this emoji is then used later on. In my opinion the emoji picker project doesn't need to be changed at all, but the way it is used needs to be changed. The flaw is that Collectives allows you to choose an emoji, then displays it next to the title but there is no way to clear that emoji. A more traditional use case of the emoji picker would be a text box, there you click the picker, choose your emoji and it gets iserted at the cursor position. If you don't like the emoji, you can delete it with the backspace key. This operation is not possible though in Collectives, because apparently the only interface to that emoji field is the picker. Maybe you could add that if you hit backspace at the beginning of the title input, it clears the emoji (or gives a popup "do you want to clear the emoji?"). Or add a menu that shows up when you do a right mouse click. Alternatively the popup like in Joplin would also be OK in my mind.
I have to agree again with narF_narF that it is currently bad user interface design in Collectives. For an irreversible action, I too would expect a warning popup before I commit to the action. Picking an emoji shouldn't be an irreversiable action, though. Like narF_narF I was facing the issue of the odd one out in the overview of pages. I ended up creating a new page, copying the content of the old page and deleting the old page.
@mejo- I request this issue to be marked as a bug not an enhancement as this renders the main feature of supporting icons on collective pages unstable due to inconsistencies.
I also agree that this should be considered a bug. Since the default for new pages is not having an emoji at all it should be possible to remove the emoji again after you have selected one. The issue is indeed, that the external picker only selects a new emoji but of course you can not remove the existing one since this is not the responsibility of the picker. The picker would at least need to display the currently selected emoji so you can remove it as well using some kind of "clear" or "X" button on the selected emoji. But as I understand the current implementation: the picker does not know anything at all about the current selection - it will just return whatever the user selected. If you close the picker without selecting anything, this will be considered as "no emoji selected, don't change anything" and not as "remove current emoji".
Another suggestion: if it is not (easily) possible to remove emojis - why not just set a default emoji for new collectives and pages? Then even the behaviour would make more sense. There is a default emoji but you can change that if you like. Since pages will already be represented by a default icon in the navigation tree, using an emoji like 📄 (:page_facing_up:
) would be a good alternative as default emoji. Or maybe even let the user decide what default emoji to use for new documents in the collective settings (maybe in the page settings of the collective).
You might also update existing documents in the database during an app update, so those documents which have currently no emoji yet, (NULL
) will get updated (and if the collectives get a new setting for the default emoji of new pages that would have to be set as well of course):
update oc_collectives set emoji = '📄' where emoji is NULL;
update oc_collectives_pages set emoji = '📄' where emoji is NULL;
The upstream library we use provides an extension now that makes this possible: https://github.com/serebrov/emoji-mart-vue/issues/253#issuecomment-1585978632
We will need to make this available in vue-nextcloud first before we can use it here.
Nextcloud vue ships the ability to unset an emoji from 7.12.2 on: https://github.com/nextcloud-libraries/nextcloud-vue/pull/4409
So we need to upgrade and then toggle that feature on where needed.
Hi, the nextcloud-vue
package seems up to date now, so maybe you can toggle its allowUnselect
option?
In GitLab by @narF_narF on Nov 8, 2022, 15:13
Currently, it's impossible to remove an emoji after it has been set. It would be nice to allow the user to undo its change.
Steps to reproduce:
Current result: There are no way to remove the emoji Expected result: The user can remove the emoji
Note: While it's possible to assign a different emoji, it's not possible to get rid of it entirely
Suggestions: