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

Fix the mention autocomplete #1003

Closed
sindresorhus opened this issue Jan 17, 2018 · 10 comments · Fixed by #2556
Closed

Fix the mention autocomplete #1003

sindresorhus opened this issue Jan 17, 2018 · 10 comments · Fixed by #2556

Comments

@sindresorhus
Copy link
Member

See: https://twitter.com/jaffathecake/status/953247205200154624

Not sure what we could do, but we could at least put users that have commented on the issue first, with the author of the last comment at the top.

@hkdobrev
Copy link
Contributor

hkdobrev commented Jan 17, 2018

I don't see why the autocomplete is not offline-first. If I don't have internet connection it should still complete users from the page, then continue with owners collaborators, contributors, but only online.

I think we can show it immediately based on the page contents:

If it's a PR/issue conversation:

  1. Original poster first.
  2. Last comment author (or previous comment author in inline review thread)
  3. Everyone else.

If it's a commit page:

  1. Author(s) first (if not a bot). (GitHub could now list multiple authors)
  2. Committer second (if different than Author and not GitHub or bot)
  3. Last comment author.
  4. Everyone else.

@hkdobrev
Copy link
Contributor

hkdobrev commented Feb 2, 2018

Added an update to my suggestion since GitHub may now list multiple authors of a commit: https://github.com/blog/2496-commit-together-with-co-authors

@fregante
Copy link
Member

fregante commented Mar 5, 2018

Is this really possible? We'd have to hack their filter tool on the fly

@sindresorhus
Copy link
Member Author

@bfred-it Probably not easy, yeah, but would be nice.

@dertieran
Copy link
Contributor

dertieran commented Nov 16, 2018

I started hacking around with this here, because I noticed all possible suggestions are available as an attribute in the .suggester > ul when it is loaded.

But I noticed that Github actually has a pretty good suggestion initially
image
this is when it loads the suggestion from the api but then if you search the cached results it fails...
image
(Example is for this issue at this moment)

Maybe @lukehefson can help here or provide some information

@lukehefson
Copy link

Maybe @lukehefson can help here or provide some information

I know we're talked internally about improving the picker and even spiked out some ideas – but I'm not 100% sure myself where we're at with it right now – I'll dig in.

From what I can tell across various feedback (including tweets in that original twitter thread) there are a lot of opinions on what the algorithm should be. So I guess what I'd love to know is… what do YOU, the refined-github community feel should be the right order of results? Is it #1003 (comment)? Do you have a consensus?

@sindresorhus
Copy link
Member Author

@lukehefson #1003 (comment) is pretty good, but I would like to propose making it even more comprehensive.

The list should be prioritized/sorted as follows:

Issue:

  • The user that opened the issue.
  • Last comment author.
  • Users assigned to the issue.
  • All comment authors.
  • If the repo is in an org, members of org.
  • Collaborators.
  • Users I follow. (I often want to mention friends and co-workers!)
  • Everyone else.

PR:

  • The user that opened the PR.
  • Last comment author (or previous comment author in inline review thread).
  • Authors of the commits in the PR.
  • Users assigned to the issue.
  • Users request for review.
  • All comment authors.
  • If the repo is in an org, members of org.
  • Collaborators.
  • Users I follow.
  • Everyone else.

Commit page:

  • Authors.
  • Committer, if different than Authors and not GitHub or bot.
  • Last comment author.
  • All comment authors.
  • If the repo is in an org, members of org.
  • Collaborators.
  • Users I follow.
  • Everyone else.

@dertieran
Copy link
Contributor

dertieran commented Nov 18, 2018

I think everything that is a bit more tailored to the context then just "here is a alphabetic list of users that have ever commited to this repository".

Another question I have is if I should hack more around with it and try to get something working or will this be changed soon™ anyway.

@lukehefson
Copy link

The list should be prioritized/sorted as follows:

I think everything that is a bit more tailored to the context

This is super useful – thanks folks!

Another question I have is if I should hack more around with it and try to get something working or if this will be changed soon anyway.

@dertieran I wouldn't want you to stop you from working on refined-github! At this point I'm just doing investigatory work to understand the problem and scope a bit better – there wouldn't be any immediate changes to this on GitHub I don't think.

@fregante
Copy link
Member

News: https://twitter.com/ashtom/status/1462907830768640000?s=20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants