ciudadanointeligente / write-it

App to create and send messages to public persons. It's a component of POPLUS project.
poplus.org
GNU General Public License v3.0
38 stars 23 forks source link

offer a list of representatives to write to based on an address or location #336

Open mhl opened 10 years ago

mhl commented 10 years ago

... or this might be called "use MapIt in Write-It".

It would be great if Write-It supported adding an MapIt instance to a given Write-It instance, so that a workflow like that on WriteToThem could be used. For example if a Write-It instance has a MapIt instance associated with it, it would offer an alternative front page allowing you to put in an address or a location (possibly based on your current position) and then only show you representatives associated with areas that include that location.

This would need quite a few changes, including

... and probably other things I've forgotten about :)

pdaire commented 10 years ago

I believe that WriteIt shouldn't handle location logic; Location logic should be in a third app I guess. If any, maybe PopIt should handle that because what you look for is a person; the result is a list of persons and what you do next might be other action rather than write to them. I agree that the use case of write to people based in location is a very powerful one, but the approach seems a little hardcoded to me. What if we have a third app (TA) that has a front page with a map, you click a on it, it ask MapIt for the area that cover that point, MapIt respond with the Area_id, the TA looks up in PopIt which person is related to that particular area, TA takes the person_id(s) to use them as recipients to pre-fill a form that ask for from, subject, body. Once the user fills the form TA post a json containing {from, to, subject, body} to a pre-created WriteIt instance.

mhl commented 10 years ago

Hi @pdaire - I take your point. As @dracos pointed out, one might well want to get a list of representatives for a location in a PMO site, so maybe it makes sense for that part to be available independently - on the other hand, it's pretty simple to do the lookups required, so may be that bit doesn't need to be reusable.

It's probably worth saying that my suggesting that this lookup should go in Write-It may reflect a view of it being more like a standalone site than an API. As I understand it, your current use of it is more as a API - so you wouldn't add themes to Write-It for new use cases (e.g. as we do with FixMyStreet), but instead make a new site that uses Write-It as a service.

If any, maybe PopIt should handle that because what you look for is a person; the result is a list of persons and what you do next might be other action rather than write to them.

On this point, PopIt already supports searching for MapIt area URLs and returning a list of people - I don't think we'd want to add querying of MapIt or geocoding into PopIt, however.

I think my main counter-argument to what you've said, and in favour of the approach I suggested in this ticket, is just that it would be very little additional code to add to make Write-It, and that would make it much more useful as a standalone site. (Needing only 3 sites or services instead of 4 for a demonstration appeals too.)

On the other hand, I think we'd be happy to go down the "Third App" approach that you suggest as well, although I'm not sure what we'd call it, "Location-based Write-It" or something :)

Another consideration is that each country (or use-case) for a site that lets you write to people based on a location would probably need some significant local customization - e.g. to find a location, in some countries it's easiest to use postcodes, in others you would want street addresses, and in others just picking from a map. I suppose you could say that that argues for the "Third App" approach that you suggest, since each front-end would need to be customized anyway.

mhl commented 10 years ago

To put this another way, @pdaire @lfalvarez - would you reject a pull request (assuming it was minimal and reasonably written) to add this?

I'll write an email this morning to the PoPlus mailing list to canvas opinions on what people would expect - it feels to me as if we're lacking information about user requirements for the kind of questions I raised above, and the immediate users in this case are developers who might want to take advantage of the PoPlus components.

lfalvarez commented 10 years ago

Hey @mhl I think that we wouldn't have any objections on any pull requests, so please go on :wink:

tmtmtmtm commented 9 years ago

@mhl did you have any further thoughts on this?