Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added source_url in councillor contribution table and created a form in councillor_contribution#new #1232

Closed
wants to merge 12 commits into from

Conversation

hisayohorie
Copy link
Contributor

** please marge #1226 before this PR**

this is to fix #1221

So far, I did:

  • added source_url in councillor contribution model,
  • added source_url in the strong params in the councillor_contributions controller.
  • created a form field for the source_url in councillor_contribution#new
  • added source_url in admin/councillor_contribution#show

screen shot 2017-08-18 at 6 45 40 pm

screen shot 2017-08-18 at 6 45 24 pm

However, the admin display is planned to be look like below in #1226 for the case without contributor info
screen shot 2017-08-18 at 5 00 26 pm

And in case with contributor info
screen shot 2017-08-17 at 1 09 22 pm

So I think we should work on merging #1226, and then we can change the admin page.
@henare @equivalentideas

Copy link
Contributor

@equivalentideas equivalentideas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good to get this first pass together 👍 I've suggested some changes like making the attribute 'source' rather than 'source_url' because it might not be a url we get.

I also think we should move this out of the contribution form and onto it's own page, so the flow is a bit more conversational:

  • Tell us about the councillors -> person collects and enters the councillor information.
  • Great, where did you get that? -> they tell us where they got it.
  • Thanks, tell us your name if you like -> they do or don't.

So I recon we make a new page in between the councillor form and the thank you page, just for this question.

I also think extracting this question is a good design choice because the councillor form is already such a complex process that takes a lot of mental load to complete (particularly for new contributors). The 'Thank you' page also has a lot of information and a choice the person has to make. So I think it's better to keep those clear and make a new page for this step.

@hisayohorie what do you think?

@@ -14,6 +14,8 @@
row :contributor
row :id
row :authority
row :source_url

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray extra line here :)

@@ -5,5 +5,9 @@
- @councillor_contribution.suggested_councillors.each do |s|
= render 'contribution_form_input', f: f, suggested_councillor: s
%button{formaction: new_authority_councillor_contribution_path(@authority.short_name_encoded), class: "button"} Add another councillor
.councillor-contribtution-source
%p Where did you find this information? please include a link if possible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"please include a link if possible" should be "Please include a link if possible".

But maybe something a little more conversational? "If you found this information online, please provide the URL where we can check it." or something that hints at why we want the data?

@@ -14,6 +14,8 @@
row :contributor
row :id
row :authority
row :source_url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source information might not actually be a URL, so I recon we should just call this attribute "source".

db/schema.rb Outdated
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "source_url", limit: 255
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change this attribute name to just be 'source' we should change it here too.

Also, because people might want to tell a bit of a story here, and we welcome that, we should use the column data type 'text' rather than 'string'. Text is generally for larger blocks and defaults to having a larger limit.

.councillor-contribtution-source
%p Where did you find this information? please include a link if possible
= f.label :name, "Source URL"
= f.text_field :source_url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hisayohorie Do you recon we should make a bigger text area here to encourage people to add more information if they want?

Following on from what @henare wrote #1221 (comment) I recon that would encourage people a bit more.

This also allows for input we're not expecting, i.e. not a URL, that might be something like, "I found the information in my local newspaper".

I believe this permissive design approach is generally a good idea but especially with ideas like this that are at their early stages

If we do want to make a more spacious input for people, like our comment form, we could use text_area rather than text_field here.

screen shot 2017-08-22 at 12 43 47 pm

@hisayohorie
Copy link
Contributor Author

@equivalentideas I think there is an heated argument about clicking to make the form more conversational or saving the users from optional clicking here #1229 and there #1177 (comment) 🔥
Probably it is a good idea for us to be on the same page.

I like the idea of having interactive and conversational form. Although In this case, I think it is ok to keep the source text area in the same page as the councillor_contribution for 2 reasons:

  • source of the councillors information are optional but different from asking for user's personal information. So it still feels like it belongs to the same category of the questions on the first page.
  • As Pip was doing(and I would do that too), the user are likely copy and pasting from the council website, and it is a lot of flicking of the tab. I think having the source text area in the same page save potential one more flicking.
  • If we have the source in the same page as councillor contribution, we can use the existing route of POST. If we decide to have the source in the different page, I would think we use update (PATCH), but not sure if that's what we saved update for.

Or should we use the same method of having hidden_field in the separate page for the source? what do you think @equivalentideas ?

@equivalentideas
Copy link
Contributor

This has been superseded by #1247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ask contributors to optionally specify a source for their councillor data contributions
2 participants