Spectrum: Mention typeahead

Created on 24 Mar 2018  ·  16Comments  ·  Source: withspectrum/spectrum

We need typeahead that shows suggestions of folks to mention.

Feature good first issue

Most helpful comment

Don't worry @satyarohith, I'll give it a try, good luck with your exams!

All 16 comments

Can you give a suggestion, or preference of what you would like it to function like.

Where do we want it ?

Are we planning on using -> http://twitter.github.io/typeahead.js/examples/

We should probably just use the DraftJS mention plugin, since that has everything we need out of the box.

@mxstbr How can we get users data of a specific community? so we can store them in an array and use to suggest.
I'm messing with this feature but not there yet, I will do PR once I get there. :)

I think the first version of this should just suggest any user on Spectrum, which should allow you to use the existing search query:

https://github.com/withspectrum/spectrum/blob/alpha/shared/graphql/queries/search/searchUsers.js

We can look at more specific filtering (only community members, prefer thread participants, etc) later!

In theory all the thread participant and author data is already in the cache as soon as a chat input loads - so could just prepopulate the list and append search results as a person types.

I'd love to give this a try!

@rubenmoya coordinate with @satyarohith!

@rubenmoya Please go ahead!! I failed to retrieve data from the server but I was able to integrate Draftjs mention typeahead plugin. Sorry for not updating the status, I am completely busy with my exams.
I will join you guys sooner, Once again I'm extremely sorry for not updating status.

Don't worry @satyarohith, I'll give it a try, good luck with your exams!

... can i take this issue ?

@AlexMunoz for sure ✨

i'm back ... i'm trying to get the users, but if i use the querie that @mxstbr suggest, algolia credentials are needed ... or am i wrong?

Ah...yikes. That's frustrating, not sure how to best help another dev work on this without exposing our algolia creds (which we definitely shouldn't do :P)

It's a pain to do, but a workaround here would be to just fake a search result payload in the api resolver for testing purposes.

Is anyone else working on this still? Not promising anything but would like to see where I can get but don't wanna start if it's still being worked on.

In regards to the search functionality. Doesn't seem to be something that couldn't be stubbed out well enough. Maybe a couple utilities for doing so could be part of this PR.

I've something but it needs time... @dan-weaver go for it! 👍

Shipped!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brianlovin picture brianlovin  ·  5Comments

carloslfu picture carloslfu  ·  3Comments

mattgaunt picture mattgaunt  ·  4Comments

brianlovin picture brianlovin  ·  6Comments

dmitryyankowski picture dmitryyankowski  ·  4Comments