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

All drop-down lists should be alphabetized by default #735

Closed
pdxdiaperbank opened this issue Mar 8, 2019 · 2 comments · Fixed by #1080
Closed

All drop-down lists should be alphabetized by default #735

pdxdiaperbank opened this issue Mar 8, 2019 · 2 comments · Fixed by #1080
Assignees
Labels
Diaperbank Inquiry Questions / Requests from Diaperbanks enhancement Help Wanted Groomed + open to all!

Comments

@pdxdiaperbank
Copy link
Collaborator

Hi Ruby for Gooders,

I spotted another drop-down menu that needs to be put in alphabetical order (on the "start a donation" page). It is the list with donation drop sites. Thank you! :)

Screenshot 2019-03-08 13 40 27

@armahillo armahillo changed the title Make Drop-Down List Alphabetical Order (on Donations Page) All drop-down lists should be alphabetized by default Mar 11, 2019
@armahillo
Copy link
Collaborator

armahillo commented Mar 11, 2019

NOTE
There may be crossover with the Loyola issues here. (Tagging @nihonjinrxs )

Summary

Every drop-down list we have should be alphabetized. There's really not any reason not to. The only exception might be if we're doing <optgroup> or something

Criteria for Completion

  • Anytime a collection is presented in a drop-down list, it should be alphabetized
  • The alphabetizing happens in the controller, not in the view
  • Use your judgement on where tests need to be added; we don't need full feature specs to verify alphabetizing individually, you might just add an expectation inline with an existing feature spec that the items are alphabetized, or in the model specs with a scope or something similar.

Reference

aaron@toph:~/diaper/app$ grep -lR "collection:" *
views/items/_items_quantity_and_location.html.erb
views/items/_items_and_quantity.html.erb
views/items/_item_list.html.erb
views/donations/_donation_form.html.erb
views/donations/index.html.erb
views/donations/show.html.erb
views/donations/_scale_fields.html.erb
views/donations/_barcode_modal.html.erb
views/purchases/index.html.erb
views/purchases/_purchase_form.html.erb
views/purchases/show.html.erb
views/purchases/_barcode_modal.html.erb
views/organizations/edit.html.erb
views/organizations/show.html.erb
views/dashboard/index.html.erb
views/transfers/index.html.erb
views/transfers/new.html.erb
views/donation_sites/index.html.erb
views/barcode_items/index.html.erb
views/barcode_items/_form.html.erb
views/canonical_items/_dropdown.html.erb
views/vendors/index.html.erb
views/diaper_drive_participants/index.html.erb
views/storage_locations/index.html.erb
views/storage_locations/show.html.erb
views/storage_locations/_source.html.erb
views/partners/index.html.erb
views/line_items/_line_item_fields.html.erb
views/admin/organizations/edit.html.erb
views/admin/organizations/index.html.erb
views/admin/organizations/show.html.erb
views/admin/organizations/new.html.erb
views/admin/barcode_items/index.html.erb
views/admin/barcode_items/_form.html.erb
views/admin/users/edit.html.erb
views/admin/users/new.html.erb
views/admin/canonical_items/index.html.erb
views/admin/canonical_items/_dropdown.html.erb
views/requests/index.html.erb
views/distributions/edit.html.erb
views/distributions/index.html.erb
views/distributions/show.html.erb
views/distributions/new.html.erb

aaron@toph:~/diaper/app$ grep -lR collection_select *
views/items/_header.html.erb
views/donations/index.html.erb
views/purchases/index.html.erb
views/transfers/index.html.erb
views/barcode_items/index.html.erb
views/storage_locations/index.html.erb
views/admin/barcode_items/index.html.erb
views/adjustments/index.html.erb
views/audits/index.html.erb

@armahillo armahillo added enhancement Help Wanted Groomed + open to all! Loyola Issues tagged for contributors from Loyola University and removed Help Wanted Groomed + open to all! labels Mar 11, 2019
@armahillo armahillo added Diaperbank Inquiry Questions / Requests from Diaperbanks Help Wanted Groomed + open to all! and removed Loyola Issues tagged for contributors from Loyola University labels Apr 28, 2019
@Nirvikalpa108
Copy link
Contributor

diaper aminaadewusi$ grep -lR "collection:" *
app/views/organizations/edit.html.erb
app/views/organizations/show.html.erb
app/views/donation_sites/index.html.erb
app/views/vendors/index.html.erb
app/views/purchases/index.html.erb
app/views/purchases/_purchase_form.html.erb
app/views/purchases/show.html.erb
app/views/purchases/_barcode_modal.html.erb
app/views/donations/index.html.erb
app/views/donations/_donation_form.html.erb
app/views/donations/_scale_fields.html.erb
app/views/donations/show.html.erb
app/views/donations/_barcode_modal.html.erb
app/views/admin/organizations/index.html.erb
app/views/admin/organizations/edit.html.erb
app/views/admin/organizations/show.html.erb
app/views/admin/organizations/new.html.erb
app/views/admin/base_items/index.html.erb
app/views/admin/base_items/_dropdown.html.erb
app/views/admin/users/edit.html.erb
app/views/admin/users/new.html.erb
app/views/admin/barcode_items/index.html.erb
app/views/admin/barcode_items/_form.html.erb
app/views/line_items/_line_item_fields.html.erb
app/views/transfers/index.html.erb
app/views/transfers/new.html.erb
app/views/base_items/_dropdown.html.erb
app/views/requests/index.html.erb
app/views/dashboard/index.html.erb
app/views/diaper_drive_participants/index.html.erb
app/views/partners/index.html.erb
app/views/manufacturers/index.html.erb
app/views/storage_locations/index.html.erb
app/views/storage_locations/show.html.erb
app/views/storage_locations/_source.html.erb
app/views/barcode_items/index.html.erb
app/views/barcode_items/_form.html.erb
app/views/items/_items_and_quantity.html.erb
app/views/items/_items_quantity_and_location.html.erb
app/views/items/_item_list.html.erb
app/views/distributions/index.html.erb
app/views/distributions/edit.html.erb
app/views/distributions/show.html.erb
app/views/distributions/new.html.erb

diaper aminaadewusi$ grep -lR collection_select *
app/views/purchases/index.html.erb
app/views/donations/index.html.erb
app/views/audits/index.html.erb
app/views/admin/barcode_items/index.html.erb
app/views/adjustments/index.html.erb
app/views/transfers/index.html.erb
app/views/storage_locations/index.html.erb
app/views/barcode_items/index.html.erb
app/views/items/_header.html.erb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Diaperbank Inquiry Questions / Requests from Diaperbanks enhancement Help Wanted Groomed + open to all!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants