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

Problem with mentions' autocomplete #272

Closed
remouk opened this issue Feb 5, 2023 · 8 comments
Closed

Problem with mentions' autocomplete #272

remouk opened this issue Feb 5, 2023 · 8 comments
Labels

Comments

@remouk
Copy link

remouk commented Feb 5, 2023

Hello, I'm not really sure how this is working, but I think this is related to #213 where the autocomplete is messing up content.

I have a page where I give my contacts: where to find me / follow me. For Mastodon/ActivityPub I wrote "@myusername@mywebsite.com" in plain text.

Since the update, it's automatically replaced with "@myusername" which is not plain text but a link to "https://mywebsite.com/author/myusername"

I cannot bypass the change, thus I cannot simply share my ActivityPub account anymore.

Am I missing something?

@pfefferle
Copy link
Member

pfefferle commented Feb 7, 2023

yes, that is currently a bit tricky. You can try adding some HTML, like for example:

<span>@myusername</span>@mywebsite.com

@remouk
Copy link
Author

remouk commented Feb 7, 2023

Thanks for the workaround! 👍

Do you agree this should not happen? I didn't use the autocomplete and never chose this behavior, it should not be automatically applied, right?

@pfefferle
Copy link
Member

pfefferle commented Feb 7, 2023

It should automatically apply, this is how the feature is planned. I have no idea to do it differently. It now works exactly how it works on mastodon. And mastodon has the same issue. You will not be able to post the plain identifier.

I think this should be the default behavior, but if you can tell me your exact usecase, I maybe find a different and more elegant way to share the WebFinger URI in a blogpost.

@remouk
Copy link
Author

remouk commented Feb 7, 2023

Maybe this is just me, sorry, but I don't think you should apply the feature exactly like Mastodon does. WordPress has it's own way of working, and users expects the software to work that way.

In WordPress, there shouldn't be a case where the text is modified without our control. We write and arrange our posts in blocks (or classic editor), this is WYSIWYG. We write text in the editor = it is shown as text = it should display as text.

For example, if you type an url or an email address in WP it will be simple text. It's up to you to make an hyperlink. While in Mastodon an hyperlink is automatically made clickable, in WordPress it is not. If you want to "unlink" an url in WP, you can.

Autocomplete is a good idea but it should only be applied if we clicked on it. Right now, it's out of our control. Worse, it applies automatically to old posts as well!

It took me a while to understand what was happening, and I understood because I saw the problem the same day as I made the update. But I guess many users won't understand why their content is modified.

@mediaformat
Copy link
Collaborator

I have a page where I give my contacts: where to find me / follow me. For Mastodon/ActivityPub I wrote "@myusername@mywebsite.com" in plain text.

As @pfefferle mentioned, being able to @ mention people is part of Wordpress core, and the plugin (despite the current lack of UI for remote users), so your issue, however you look at it is a question of escaping current functionality to achieve a desired presentation.
Here are some suggestions

  • write it as plain text and link it yourself
  • or wrap it in another tag, ex: <pre>

@remouk
Copy link
Author

remouk commented Feb 8, 2023

"write it as plain text and link it yourself"
-> That's what I'm asking for. I'd love to write it in plain text, but I can't. :/

"or wrap it in another tag, ex: <pre>"
-> That's what I did in the first place, but let's be honest this is an ugly workaround.

I'm sorry to insist, but mentions should only be applied if we want to. Modifying content automatically, and having no way to bypass the change, is not something a WordPress user expects. This is a really weird and unwanted behavior.

The autocomplete is a good idea, but if we don't use it, if we don't click it, it should not modify the plain text we just wrote. If we click it, there should be a way to remove the mention, too. Just like an hyperlink works, for example.

Btw, thank you very much for your hard work, all your plugins are very helpful and very well done!

@github-actions
Copy link

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants