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

Allow to remove the emoji of a page #422

Closed
mejo- opened this issue Nov 8, 2022 · 11 comments · Fixed by #907
Closed

Allow to remove the emoji of a page #422

mejo- opened this issue Nov 8, 2022 · 11 comments · Fixed by #907
Assignees
Labels
enhancement New feature or request ui/ux

Comments

@mejo-
Copy link
Member

mejo- commented Nov 8, 2022

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:

  1. create a page in a Collective
  2. assign an emoji to the page

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:

  1. Add a button in the emoji picker to remove the emoji
  2. While the emoji picker is open, pressing Delete or Backspace on your keyboard will also get rid of the emoji
@mejo-
Copy link
Member Author

mejo- commented Nov 9, 2022

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?

@mejo-
Copy link
Member Author

mejo- commented Dec 12, 2022

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?

@mejo-
Copy link
Member Author

mejo- commented Dec 12, 2022

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: 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.

@narFnarF
Copy link

narFnarF commented Mar 6, 2023

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.

@narFnarF
Copy link

narFnarF commented Mar 6, 2023

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)

@Snafu
Copy link

Snafu commented Apr 11, 2023

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.

@niklas-englert
Copy link

@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.

@arnowelzel
Copy link

arnowelzel commented Jul 31, 2023

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;

@max-nextcloud max-nextcloud self-assigned this Jul 31, 2023
@max-nextcloud
Copy link
Collaborator

The upstream library we use provides an extension now that makes this possible:
serebrov/emoji-mart-vue#253 (comment)

We will need to make this available in vue-nextcloud first before we can use it here.

max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Jul 31, 2023
In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)
max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Jul 31, 2023
In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)
max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Jul 31, 2023
In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)
max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Jul 31, 2023
In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)

Signed-off-by: Max <max@nextcloud.com>
max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Jul 31, 2023
In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)

Signed-off-by: Max <max@nextcloud.com>
max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Aug 1, 2023
In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)

Signed-off-by: Max <max@nextcloud.com>
max-nextcloud added a commit to nextcloud-libraries/nextcloud-vue that referenced this issue Aug 1, 2023
Backport of #4381.

In collectives pages optionally have an emoji set.
Once this is set there is currently no way to remove it.

Enhance the emoji picker to show the currently selected emoji
and enable unselecting it to clear the previous selection.

See also:
* nextcloud/collectives#422
* serebrov/emoji-mart-vue#253 (comment)

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud
Copy link
Collaborator

Nextcloud vue ships the ability to unset an emoji from 7.12.2 on: nextcloud-libraries/nextcloud-vue#4409

So we need to upgrade and then toggle that feature on where needed.

@tortuetorche
Copy link

tortuetorche commented Sep 25, 2023

Hi, the nextcloud-vue package seems up to date now, so maybe you can toggle its allowUnselect option?

mejo- added a commit that referenced this issue Sep 26, 2023
Fixes: #422

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Sep 26, 2023
Fixes: #422

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Sep 26, 2023
Fixes: #422

Signed-off-by: Jonas <jonas@freesources.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ui/ux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants