lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

Bad autocomplete for !community@instance

Open Die4Ever opened this issue 1 year ago • 1 comments

Requirements

  • [X] This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • [X] Please check to see if this issue already exists.
  • [X] It's a single bug. Do not report multiple bugs in one issue.
  • [X] It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

Typing [email protected] gives the autocomplete for !fedigrow[[email protected]](https://lemm.ee/c/fedigrow), which is unnecessary since all frontends correctly handle the plain [email protected] (I think even Mbin handles this correctly)

And the autocomplete incorrectly takes you to a remote instance. Also the autocomplete incorrectly shows the community name twice

Screenshot_20241109-160005 shows the community name twice.

Steps to Reproduce

  1. Type [email protected]
  2. Click autocomplete
  3. See incorrect markdown
  4. Click Preview and see incorrect result

Technical Details

Tested in Chrome and Firefox

Discussion here: https://lemmy.world/post/21832647

Lemmy Instance Version

0.19.5

Lemmy Instance URL

programming.dev

Die4Ever avatar Nov 09 '24 21:11 Die4Ever

We really just need to stop having it autocorrect to a URL embed via []() and allow people to just type [email protected] and autocorrect to the community without embedding the link as a link format. Especially since the backend already handles annotating the community links already without needing to do that and makes them functional on any instance, but directly linking hardcodes them to that instance which is a poor choice for remote users who will just get redirected there instead of the community on their own instance.

DraconicNEO avatar Nov 10 '24 04:11 DraconicNEO

Can't replicate this, the autocomplete for communities is working fine: https://enterprise.lemmy.ml/post/1244/7064

dessalines avatar Jul 30 '25 12:07 dessalines

I just tested this on retrolemmy running 0.19.12 and it's still not good

Image

Die4Ever avatar Jul 30 '25 16:07 Die4Ever

Looks correct, its creating a proper markdown link. What's the issue?

dessalines avatar Jul 30 '25 16:07 dessalines

It's unnecessarily relying on Lemmy's specific URL format. It would be like if you tried to type @ for a username in Mastodon and it gave you

[@[email protected]](/@[email protected])

Making it a broken link for Lemmy and probably many other platforms. Other platforms (including Lemmy) correctly interpret the ! format without needing the markdown link, so why break that?

Edit: Also this is currently linking to the full path and not a relative path? I suspect this is quite annoying on some platforms, and again unnecessary since I delete the markdown and it's a nice clickable link for everyone that I've never received complaints about. It works with every app and platform.

Die4Ever avatar Jul 30 '25 16:07 Die4Ever

We don't have a universal lemmy:// protocol, so things like this aren't possible. You need to use full markdown URLs else they won't work across different services.

dessalines avatar Jul 30 '25 17:07 dessalines