dronefly-garden / dronefly

Red Discord Bot V3 cogs for naturalists.
Other
16 stars 3 forks source link

map: build up map from individual taxon adds #69

Open synrg opened 4 years ago

synrg commented 4 years ago

Currently [p]map is a bit tricky in that if you typo even a single taxon, you won't get the intended map and then have to start over again. Therefore, similar to the recent observation counts support added to [p]taxon, it would be nice to add more taxa via reaction buttons.

michaelpirrello commented 4 years ago

Discussed several ideas wrt to this:

  1. Creating a maplist "bucket" that you could add/remove taxa from in order to build on previous work rather than start from scratch every time. Said maplist would allow for drafting the map first, then creating the link later, rather than having to create a link with each change
  2. Allowing the creator to own and name and perhaps grant permissions to said bucket to allow for collaborative map building
synrg commented 1 year ago

This is now weakly supported by chaining together a ,map with any prior Dronefly display for a single taxon.

With the latest support for ,related it works a little better. You still don't get a list of individual taxon IDs if you chain more than two of these together, but at least you can chain them together indefinitely and still get useful results:

  1. start with ,t red clover
  2. chain a Reply ,related yellow sweet clover results in Tribe Trifolieae
  3. chain from Tribe Trifolieae a Reply ,related bird's-foot trefoil results in Subfamily Faboidea but only by comparing that pair, not all 3

image

You can see how this is not going to give you great results with ,map. It's fine for the first pair. It can even do 3, but then you have to chain the second and third taxa together as a Reply to the first command in a single ,related command:

image

To finish this is going to take some more thought. In the ,related command output, I have put in a "Species observations" link that embeds the taxon_ids parameter in the URL, but the Reply converter doesn't know what to do with this. It will need to be modified to look for it, and pass the list of taxon ids down to the next command to use as input to build the list iteratively. In ,map output the list of id#s is already in the title URL for the embed, so the Reply converter could look for that. I'd rather standardize this so the converter doesn't have to look in two places. I'll make up my mind about which way I do it when I get back to working on this again later.