plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

New template for location entry form

Open jywarren opened this issue 10 years ago • 9 comments

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @jywarren to get it labelled. Or, if this is not your first time, try to solve it yourself!


Geographic features are too numerous and complex for folks to make much progress on right now. Let's start with a self-contained module -- the HTML template for selecting a location. This is described and illustrated in this GIF from #650 -- so let's start there:

gif

Before we can make any of this template in HTML, we need a place to put it in our Rails application. Let's:

  1. create a new template people can visit and try out in a new file at /app/views/locations/form.html.erb which (I think?) should be accessible via https://publiclab.org/locations/form
  2. if the above isn't accessible, then if needed, add an empty controller method in /app/controllers/tag_controller.rb (for now) called def location and a config/routes.rb entry to direct requests to that action appropriately: match 'locations/form' => 'tag#location'
  3. begin constructing the form in form.html.erb based on above gif, and on the form input examples in https://getbootstrap.com/css/#forms

For step 3, we can break out a new issue -- but just start with a simple template like:

<h2>Enter a location</h2>
<p>This page does not yet work</p>

<form>
  <input type="text" class="form-control" placeholder="Begin typing a location" />
</form>

Later, we can create new issues for fleshing out that template more, and perhaps for making a new /app/controllers/location_controller.rb file instead of re-using the tag controller.

jywarren avatar Nov 30 '16 17:11 jywarren

@jywarren I would like to tackle this one.

manish310794 avatar Dec 01 '16 14:12 manish310794

Great, please do! thank you!

jywarren avatar Dec 01 '16 17:12 jywarren

Just a note -- this will be part of a series of small issues broken out of this big list: https://github.com/publiclab/plots2/issues/1070

jywarren avatar Dec 06 '16 22:12 jywarren

Hi @manish310794, just checking if you've gotten stuck on this at all, or if I could help in any way? Thanks!

ebarry avatar Dec 13 '16 21:12 ebarry

Hi @manish310794 , if you are not working with this issue I would like to give it a go

mridulnagpal avatar Dec 15 '16 06:12 mridulnagpal

Hi, all -- I think it's fair for @mridulnagpal to take a crack at this -- @manish310794, I'm happy to help you find a new issue to tackle if you're still interested, and as this progresses towards a pull request, I'm sure there are also plenty of opportunities for collaboration. Thanks!

jywarren avatar Dec 15 '16 17:12 jywarren

@jywarren I checked the files and the template already exists, please tell me what do I do next?

mridulnagpal avatar Dec 15 '16 20:12 mridulnagpal

Ah - i see it here: https://github.com/publiclab/plots2/blob/master/app/views/locations/form.html.erb

It was closed in #1044-- but we didn't link back or close this -- oops! We should remind people to do so in their PRs.

Yes, the next step is the next item in #1070. I'll break out a new issue for it, thanks!

jywarren avatar Dec 15 '16 20:12 jywarren

Great - moved next step to #1107

jywarren avatar Dec 15 '16 20:12 jywarren