Friendica: Explicit mentions: Make the Friendica display user-controlled

Created on 29 Jan 2019  路  71Comments  路  Source: friendica/friendica

Follow-up to #6541

We need to explicitly display the mentions in the post body to networks that are used to it to avoid confusions, but we don't need to systematically display them in the comment boxes.

We should add an additional feature setting to allow admins to enabled/disable/lock displaying mentions in comment boxes, and for users to be able to enable/disable it for finer mentioning control.

Thanks @rebeka-catalina for the report, see https://forum.friendi.ca/display/fd59d1fe-175c-50a9-e97b-66c395538401

Steps:

  • [x] Add implicit mentions to outgoing Diaspora post body. (#6614)
  • [x] Add implicit mentions to outgoing ActivityPub post body. (#6614)
  • [x] Remove implicit mentions from incoming ActivityPub post body. (#6614)
  • [x] Remove implicit mentions from incoming ActivityPub post tags. (#6614)
  • [x] Add user config to enable explicit mentions in the comment box. (#6614)
  • [x] Improve the top-level comment box behavior when there already are replies in the thread. (#6660)
Enhancement UX

Most helpful comment

There are multiple issues at play:

  • The mentions shown on remote servers: this can be solved independently of the display on Friendica side.
  • The display on Friendica that people may or may not want, independently of the implementation.
  • The actual implementation, which seems to depend on the current display a priori of the comment box only on threads with at least one reply which can be debated independently.

Personally:

  • I don't mind showing the mentions in comment boxes, whether they're already present or added by Javascript on opening the comment box, because
  • I don't like the ever-present comment box on threads with at least one reply. I understand the problem (avoid back-and-forth between the top and bottom of the thread) but I'd rather have a full-fledged button/link instead of a half-displayed comment box.

I actually like Twitter solution with a completely fake input box to prompt you to click, and then shows the actual input which is quite different (different height, text color):
screen shot 2019-01-29 at 15 50 30
screen shot 2019-01-29 at 15 51 00
I'd like us to adopt a similar behavior with a slimmer input box without the mentions that opens the actual comment box with a large textarea (more than the current two lines) with the mentions (if enabled).

All 71 comments

To avoid confusion of users who change from one server to another, the setting should only be a user setting, not an admin setting at all.

And - for a better UX - we probably should work with loading the mentions upon clicking on the comment box, shouldn't we?

There are multiple issues at play:

  • The mentions shown on remote servers: this can be solved independently of the display on Friendica side.
  • The display on Friendica that people may or may not want, independently of the implementation.
  • The actual implementation, which seems to depend on the current display a priori of the comment box only on threads with at least one reply which can be debated independently.

Personally:

  • I don't mind showing the mentions in comment boxes, whether they're already present or added by Javascript on opening the comment box, because
  • I don't like the ever-present comment box on threads with at least one reply. I understand the problem (avoid back-and-forth between the top and bottom of the thread) but I'd rather have a full-fledged button/link instead of a half-displayed comment box.

I actually like Twitter solution with a completely fake input box to prompt you to click, and then shows the actual input which is quite different (different height, text color):
screen shot 2019-01-29 at 15 50 30
screen shot 2019-01-29 at 15 51 00
I'd like us to adopt a similar behavior with a slimmer input box without the mentions that opens the actual comment box with a large textarea (more than the current two lines) with the mentions (if enabled).

Would be great if you could do it. I'm just too bad into this whole frontend stuff.

I have made some progress towards this. I've disabled the default comment text, and started prepending explicit mentions (based on the to field) in all outgoing ActivityPub messages. Mastodon displays the mentions as expected.

The next step is to remove extraneous mentions from the body in all incoming ActivityPub messages (based on the parent item mentions). This should enable clean Friendica-looking messages from Mastodon, since it supports threading we don't need explicit mentions.

Further step:

  • Adding a user config to enable explicit mentions in the comment box. This would disable the automatic mention prepending.
  • Improving the top-level comment box behavior when there already are replies in the thread. The current behavior is clunky and relies on the textarea to be empty to function properly, which contradicts the previous point.
  • Add mention prepending to outgoing Diaspora messages. Since Diaspora doesn't support threading at the moment, remote contact can be confused when a Friendica account replies on an earlier comment without an explicit mention.

I don't think that we should remove mentions in the body on incoming messages. They are formatted that way, so we shouldn't interfere.

The fine line I'm threading is that additional mentions beyond the "replying mentions" should be kept. Otherwise initial mentions aren't of any use in Friendica itself.

Concerning the "to"-header there are two sources for it:

  1. The author of the item we are commenting on
  2. Every person that we explicitly mentioning (in the body)

I noticed, this is why I check for existing mentions in the body before prepending any additional one. The advantage of using to is that I don't risk self-mentioning life the default comment text currently does.

If you answer to your own post, then you are self answering yourself.

Yes but you shouldn't explicitly self-mention yourself.

Concerning this removal of incoming mentions: Then you cannot see anymore who had been directly mentioned. I guess this removal would only make sense if we would display the content of the "to" header in the message.

You will see who's explicitly mentioned, but not the author of the replied post nor all the other implied conversants.

For example, in this reply, both prepended mentions will be removed: https://friendica.mrpetovan.com/display/52acf9cd487f3571a4afbe3e7ad2bfb901e870e2

But in this example, the @hypolite mention was added manually and should stay: https://friendica.mrpetovan.com/display/52acf9cd85e7b769b1bb76cbf2729db885620a26

Progress report: Stripping unused prepended mentions from the incoming message body works in both cases above. However the mentions are kept because they are extracted from a different AP field so the notification behavior so far hasn't changed (you're still getting "X tagged you in Y post") and may be slightly confusing since all the mentions aren't necessarily displayed anymore in the item body.

My next move will be to cull the implicit mentions from the AP tags as well so that they don't clog the term table.

So I went ahead and "fixed" the frio design of threaded conversations.

Current display:
friendica_thread_redesign_old_top

New comment box display:
friendica_thread_redesign_new_top

New fake form display on posts with at least one reply, as well as a progressive tint of the background by indentation level and the highlighting of the comment that was linked to:
friendica_thread_redesign_new_bottom

tell me what you think! Especially @rabuzarus

The current automatic mentions have problems with Diaspora:
https://pluspora.com/posts/694270#e18176ef-205c-63e1-49ef-75d949814519

For Diaspora these mentions shouldn't be added at all, I think.

The new editor look nice - but this is unrelated to the mentions, isn't it?

Well, you know, I had some gripes with the editor and the thread display, so this was my chance to kill three birds with one stone. As usual.

The main features of the new design:

  • Separation between submit buttons and formatting buttons: I kept pressing the wrong button on mobile, opening the image browser when I wanted to submit my post.
  • Separation between attachment button and formatting buttons: This should reduce the confusion between the paper clip and the chain link that I experienced many a time.
  • Increase of the textarea height. We're smartly showing/hiding the comment box anyway, there was no reason for a tiny initial textarea.
  • Visual improvement of the indentation level through progressive background tinting. I haven't tested to the 7th level, might be too dark.
  • Visual simplification of the top-level comment box when there are replies. it is now a single-line fake textarea with a mention to the top-level author that gives way to the comment box when it is interacted with.
  • Visual improvement of the correlation between the indentation level and the comment box. It is now displayed directly below the text that is being replied, with the width of said text.
  • Replace float with display: flex, which allows to remove a bunch of empty clearing elements.
  • Replace styling <hr> by CSS border and padding.

It is supposed to work with explicit mentions, but I haven't tested yet. I will do so during the day and I'll fix the probable issues tonight EST.

For Diaspora these mentions shouldn't be added at all, I think.

This conversation shows me that it is very much needed. There are multiple people replying to multiple other people in a non-threaded setting. We can iron out the way it looks and feel, like removing self-mentions and showing the display name instead of the nick, but I still think they are useful.

For Diaspora these mentions shouldn't be added at all, I think.

I think so, too. Currently users on diaspora are confused.
On diaspora - as we know - there is no threading. Today contact1 posted a top level posting and contact2 also commented there. I didn't know that we currently send the @mention of the author of the top level and I just wrote "thank you" and it was meant to contact2. Then contact2 asked, why I said "Thank you" to contact1. This is very confusing. I didn't though that we send these mentions to diaspora - diaspora doesn't support yet activityPub.

Currently the automatic mentions happen, but on friendica we cant' do anything against it because to us it's not visible :-/

Can I ask you which comment box did you use to thank the top-level author? The difference is important for implicit mentions.

I used the lower one - so the one to comment on the top level.

Oh, but it wasn't intended to thank the top level author.

Once again

Hypolite is author of top level.

Michael and me are commenting and I write 'thank you' and I mean it to
Michael, but in the comment on appears

@Hypolite Thank you - because Hypolite is top-level author.

Ok, so it makes perfect sense that a comment to the top level post would be mentioning the top-level author. I was wondering if a comment on a reply would be mentioning the top-level author but it isn't the case.

You have two one solutions to this kind of confusion:

  • disable the implicit mentions in the site config.
  • OR
  • comment below the intended post.

Do I understand correctly that
'disable_mentions_removal' => true,

should then display again all the mentions?

Yes, and I just checked, it won't prevent adding implicit mentions to outgoing messages, I edited my previous comment.

But on my node it doesn't bring this effect :-/ It is as before, that mentions aren't displayed but still happen. I have put the line in config/local.config.php und 'system' . It's not a big problem, because there is the possibility to comment on the comments to send the right mention.... but are additional steps required to make this setting work?

Like I said above, this config key only prevents implicit mention removal from incoming messages, and doesn't do anything to outgoing messages.

Oh ok - thank you :-)

I still think it shouldn't be sent to diaspora. If I had a diaspora account I really would be annoyed if I was mentioned in every comment by others.

The feature was born out of the opposite confusion: when you reply to a specific comment in a Diaspora conversation, it ends up displayed at the top-level on the Diaspora side, prompting "are you replying to me?" comments if there was no explicit mentions.

Until Diaspora finally sorts thread display out (the protocol already allows for it, but the frontend doesn't), I will stand by this feature.

I understand your point, but now the users get annoyed. They are just using the software - they are not developing diaspora.

Of course, but ultimately we at Friendica are working for Friendica users. Diaspora users should escalate their concerns to Diaspora developers. I will trade confusion for Diaspora users over confusion for Friendica users any day of the week.

The bottom line is that direct mentions to replied-to authors make sense, Diaspora users just aren't used to it like Mastodon users are. But until they have proper threading display these mentions make as much sense as they do on Mastodon.

Of course, but ultimately we at Friendica are working for Friendica users.

Really? I don't feel very well with sending mentions even if I don't want to send mentions. Do have a choice? No. Am I a friendica user? Yes.

This is very different from what you said before, and will more likely be addressed if you express it like this. The config key quickly added by @annando in #6651 could be expanded (and renamed) to cover outgoing messages as well.

This is very different from what you said before

It was perhaps just one aspect I reflected at the beginning. At least this part has many aspects, because it's not only that others get confused and annoyed and that I don't feel well with sending mentions that I don't want to so send. As it is currently it feels to me like the system forces me to interact in a way, because I suddenly must answer on comments to avoid confusion. I never really used to reply on comments when I interact with diaspora. I know that diaspora doesn't display threads and I communicate in a way that people understand me and know to whom I'm talking.
I just used to mention others when I want to mention them.

For me this entire automatically adding of mentions to the scene is a total anti-feature. Not only in Friendica, but in the other platforms as well. The information for which posting a comment is meant is in the meta-information of the comment, so the software should simply use that and not force additional mentions into the comment.

For me this entire automatically adding of mentions to the scene is a total anti-feature.

Totally agree.

When the user config "Explizite Erw盲hnungen" is activated, this automatic mentioning is deactivated. Possibly we should use some tri-state configuration there. In difference to the config setting for incoming mentions, this can be user controlled, so the user should decide, I think.

Oh and it doesn't work correctly. I now have had the situation:

toplevel by person1

comment by person2

I have commented the comment by person2 (with upper commentbox in thread), but person1 was mentioned.

I have commented the comment by person2 (with upper commentbox in thread), but person1 was mentioned.

Still on Diaspora? On Mastodon it is expected.

The information for which posting a comment is meant is in the meta-information of the comment, so the software should simply use that and not force additional mentions into the comment.

Which software? Ours or theirs? If their software isn't correctly displaying the comment metadata Friendica sends about threading, there's nothing we can do to their software.

As it is currently it feels to me like the system forces me to interact in a way, because I suddenly must answer on comments to avoid confusion.

As I said earlier this feature was created because I had to manually clear out confusion on Diaspora conversations. What you describe is that you adapted yourself to Diaspora's lack of threading display, but it doesn't have to be this way. This feature allows you to keep the same behavior no matter the target network.

I understand it is an uncomfortable change, I assume the same way it must have been an uncomfortable change to adapt to Diaspora's quirk, even if it became a habit. And it isn't perfect yet. Please bear with us while we stamp out the remaining oddities of this feature and hide it behind a config value.

Still on Diaspora?

Yes.

Is it a public conversation? Can you please paste the links to the Friendica and the Diaspora sides?

Is it a public conversation?

No it isn't :-/

Hubzilla actually receives comments both via ActivityPub and Diaspora, and in the former case, it includes all the previous mentions, and in the latter case, it only mentions the replied-to comment author:
friendica_explicit_mentions_hubzilla

Which software? Ours or theirs? If their software isn't correctly displaying the comment metadata Friendica sends about threading, there's nothing we can do to their software.

Theirs. I thought this explicit mentioning was only introduced because Friendica wanted to do something about it?

Yes, that's what I mean, we introduced changes to our software to better match their software we can't do anything about. This means adding adding additional mentions in outgoing posts, and removing implicit mentions in the incoming posts.

It is a private conversation, I replied to another person than the author of the top-level and wrote
"This comment of mine should now only mention you, $NAME"

And the person answered with a quote:

"This comment of mine should now only mention you, $OTHERNAME"

followed by:
"But I guess you meant me."

But since these mentions got added, it seems not to work anymore as expected. At least that is the impression I get.

it seems not to work anymore as expected. At least that is the impression I get.

To be fair, it has never worked as it is supposed to, it's very much a work-in-progress feature on the develop branch.

@rebeka-catalina This seems to be an entirely different issue as it now pertains to manual mentions. I'm not denying the implicit mention adding is flawed, but this doesn't look like this particular issue is relevant since you manually added the mention at the end of your message.

This seems to be an entirely different issue as it now pertains to manual mentions.

No it isn't. I'm just a bit tired and have seen, that the example I gave in here was written in a bad way - sorry for this - but please believe me : it happenend with automatic mentions and it isn't a different issue.

That's why I used "seems". Without a public conversation I can't verify how it looks on both sides nor retrieve the relevant public objects. If you're an admin of your own node, you can do it yourself though: just open the comments links (on the comment timestamp) in separate tabs and replace display in the URL by itemsource. Then you can send the displayed source objects to me at [email protected].

To be fair, it has never worked as it is supposed to

For me the expected behaviour is, that I decide who is mentioned im my postings and that I don't have to remove some automatically added mentions from the comment box before I am able to do so. That worked before the explicit and implicit mentions were added as far as I know.

After I replaced display with itemsource a form opened with an iput field for a GUID and a submit button. I have an account on a Diaspora-pod for tests and I created a public posting and asked somebody of the diaspora people to comment it. If someboday leaves a comment I can reply on it with my friendica account. I hope it works as wrong as in the private conversation.

and that I don't have to remove some automatically added mentions from the comment box

You have mentions in your commentbox, that you can remove? I don't have any mentions there. On my node it happens in a totally hidden way to me. I didn't know at all, that I send a mention, because there's nothing in the comment box.

The initial added behaviour was put behind an "Additional Feature".

The initial added behaviour was put behind an "Additional Feature".

Thank you. I have found and activated it, but my comment boxes are still empty.
Now they appear.

Ha!!

So in the case 'if' the additional feature isn't activated it doesn't work correctly, because then the mention goes to the author of the top level even if I reply on a comment by someone else.

We could successfully reproduce it:

https://pod.geraspora.de/posts/9492284
https://node.pc-tiede.de/display/18191ef0142601373964268acd52edbf

Thanks, I'm not sure what I'm looking at in the first link and I can't access the second link.

Thanks, I'm not sure what I'm looking at in the first link

You asked for the links to a public conversation where the problem
occurs. That's it. testprofil is my testaccount on diaspora. I have
created a posting as testprofil.
Then I replied with my friendica profile on the first comment by Deus,
but testprofil got mentioned.

and I can't access the second link.

That's at least a link to the same posting, but from friendica.

Thanks for the explanation, without the Friendica side of it I had no idea you had replied to Deus, which is the reason for this feature in the first place.

If explicit mentions are enabled: should these mentions always appear in the comment boxes or just under specific conditions? I'm asking because I have enabled it and I have disalbed in their removal in the local.conig.php, but the don't really appear to me.

Yes, they should always appear in the comment boxes. I've witnessed missing ones as well, so it's on my list of fires to put off:

  • [x] Fix incoming AP implicit mentions
  • [x] Add global config killswitch for implicit mentions
  • [ ] Fix Friendica-submitted items implicit mentions
  • [ ] Fix potential issue with outgoing Diaspora implicit mentions
  • [ ] Fix explicit mention default comment box text <- You are here
  • [ ] Fix outgoing AP implicit mentions

Phew!

This feature used to be 1/4 baked (#6541), now it's pretty much half-baked (#6614), but I have good hope for 3/4 baked for the upcoming release.

I just had the following mention in the comment box, which looks really interesting. Though it would have been transformed into the correct @-mention by the processor I don't think this should be looking that way.

friendica-explicit-mention

It is peculiar indeed.

But could have nothing to do with the mentioning itself. See the forum question of @hoergen here.

Closing here as all the steps have been completed. The journey continues here: #6676

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrPetovan picture MrPetovan  路  51Comments

utzer picture utzer  路  67Comments

nupplaphil picture nupplaphil  路  47Comments

MrPetovan picture MrPetovan  路  51Comments

AlfredSK picture AlfredSK  路  66Comments