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

[#7] User can view / edit number of arrests on Rebel #91

Merged

Conversation

kvrag
Copy link
Collaborator

@kvrag kvrag commented Oct 17, 2019

Issue: #7

  • added a # of arrests column to Rebel model
  • added form field to the Rebel edit page for # of arrests
  • added the # of arrests on Rebel show page
  • added the # of arrests as a column on the Rebels index page for export

Notes

Seeds
When I was setting up the project locally, I thought it might be easier for future contributors to test front-end changes if there were a few seed records. I can remove those from this PR if desired.

Annotations
When I ran the migration to add the column, I noticed that annotate wasn't working. I searched around and it seems like perhaps that gem got updated somewhere along the way and needed a fresh install. So you'll see a bunch of annotation diffs in this PR as well.

Questions

Do we want to add any specific validations on the number of arrests column?

@begault
Copy link
Collaborator

begault commented Oct 17, 2019

Thanks ! As potential future contributor, I was looking for seeds and you provided it to me ;)

@mhulet
Copy link
Member

mhulet commented Oct 18, 2019

Thanks a lot @kvrag! I will review before Monday.

td(style="width: 10rem")
td
= rebel.number_of_arrests.presence || "-"
td(style="width: 5rem")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed the width here because the icon doesn't require 10rem of space, and the table was starting to look a little squished with the new column.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the table is becoming a real mess. We'll work on that.

@@ -42,7 +44,7 @@ div(data-controller="datatable" data-datatable-export-title="#{FFaker::Music.son
tr(id="selected-id-#{rebel.id}" data-object-id="#{rebel.id}" data-rebel-name="#{rebel.name}")
td
td
=> link_to (rebel.name.present? ? rebel.name : "-"),
=> link_to (rebel.name.presence || "-"),
Copy link
Member

Choose a reason for hiding this comment

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

Thanks @kvrag, I didn't know about this one 👍

@mhulet mhulet merged commit 07023d2 into extinctionrebellion:master Oct 23, 2019
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.

3 participants