acterglobal / a3

Community Communication and casual social organising platform (App)
http://acter.global/
Other
78 stars 21 forks source link

Find a solution for flutter_mentions #1853

Closed gnunicorn closed 2 months ago

gnunicorn commented 3 months ago

We have several issue that seem to directly come from our usage of flutter_mentions. The dependency is clearly not maintained at this point and we need to decide what we want to do about it.

Most notably it seems to cause:

gnunicorn commented 3 months ago

We are going to fork flutter tagger into our repo and start working from there replacing the existing mentions with our own implementation.

gnunicorn commented 3 months ago

so, experimented with TypeAhead as an alternative, also pretty nice. However we face a similar issue here: We have to load the entire list of userIDs and displayNames once and check for them, thus potentially being a lot slower in even displaying the first set of items. If we were to use a riverpod-ish system though, we could have first checks go to ref.watch(memberDisplayName(..)).valueOrNull and whenever the becomes available re-evaluate it. that'd actually be nicer.

gnunicorn commented 3 months ago

also as a reference point, this has some nice usage pattern: https://pub.dev/packages/multi_trigger_autocomplete

gnunicorn commented 3 months ago

but purely technically speaking, what do we need/care about at this point?

  1. we want to notice certain characters being typed (for now @ does it)
  2. if that happens, we want to have Flutter Overlay appear showing us options, matching the list to the input
  3. when a user selects any of them, we replace the content of the textfield with the corresponding match

The list in 2 should probably just be a simple widget that we can then feed a riverpod consumer into so we can live update and don't have to wait for avatar data and stuff.

nice to have, follow up after: