-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
There was a problem hiding this 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 | |||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
…contribution table
…lor_contribution table
@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) 🔥 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:
Or should we use the same method of having hidden_field in the separate page for the source? what do you think @equivalentideas ? |
This has been superseded by #1247 |
** please marge #1226 before this PR**
this is to fix #1221
So far, I did:
source_url
in councillor contribution model,source_url
in the strong params in the councillor_contributions controller.source_url
in admin/councillor_contribution#showHowever, the admin display is planned to be look like below in #1226 for the case without contributor info
And in case with contributor info
So I think we should work on merging #1226, and then we can change the admin page.
@henare @equivalentideas