Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Committee search from homepage doesn't work #358

Closed
noahmanger opened this issue Jul 23, 2015 · 9 comments
Closed

Committee search from homepage doesn't work #358

noahmanger opened this issue Jul 23, 2015 · 9 comments
Assignees
Labels

Comments

@noahmanger
Copy link
Contributor

From the homepage, if you change the search dropdown to "Committees" and then search, you get no results. It looks like there's a bug in the way we're building the url where it's not replacing the search_type=candidates parameter:

?search_type=candidates&search_type=committees&search=michigan

@noahmanger noahmanger added the Bug label Jul 23, 2015
@jmcarp
Copy link
Contributor

jmcarp commented Jul 23, 2015

Good catch. Looks like the issue comes up because we have two inputs for choosing search type: a select for desktop views, and a pair of radio buttons for small screens. Even though only one input is displayed at a time, both get submitted with the search form. The simplest fix would be to use the same inputs for different screen sizes, if possible. Otherwise, we can add a few change listeners to keep the two inputs in sync. Both options are simple enough--what's your preference @noahmanger?

@noahmanger
Copy link
Contributor Author

Aaaaah. So this is a little tricky because of the different places the search bar lives. I could use some help thinking through this ( @jenniferthibault ) so here's a list with explanation:

Desktop:

  • Hero: Enough space for dropdown or radios
    screen shot 2015-07-23 at 10 57 30 am
  • Header: Only enough space for dropdown
    screenshot-1
  • Search results: Enough space for dropdown or radios
    screenshot-2

Small screen: Only space for radios

  • Hero:
    screenshot-2 copy
  • Nav pop up menu (instead of header):
    screenshot-3 copy
  • Search results:
    screen shot 2015-07-23 at 10 55 25 am

@noahmanger
Copy link
Contributor Author

So I guess i could see moving to radios throughout, except with the header search on desktop it wouldn't work. Maybe that's ok to have it be different, but that seems like a potentially confusing inconsistency?

@jmcarp
Copy link
Contributor

jmcarp commented Jul 23, 2015

To be more specific, the issue is related to having multiple inputs of the same name in the same form. So it's no problem to use radio buttons in one form and selects in another. The problem comes up when a single form includes both.

@noahmanger
Copy link
Contributor Author

Oh totally. I'm just trying to think through if it makes sense to just say we're only using radio buttons all the time.

@jenniferthibault
Copy link
Contributor

@noahmanger I think it might make even more sense to move to toggle throughout instead of radios (remember the Luke W article I sent you yesterday?). That would also work to the left of the type field on the desktop version, AND we use toggles frequently elsewhere, radio buttons less so.

@noahmanger
Copy link
Contributor Author

Word. Yeah I was thinking the same thing. I still think it might be a
little tricky in the header, but I bet we can make it work.

On Thu, Jul 23, 2015 at 11:18 AM, Jennifer Thibault <
notifications@github.com> wrote:

@noahmanger https://github.com/noahmanger I think it might make even
more sense to move to toggle throughout instead of radios (remember the
Luke W article I sent you yesterday?). That would also work to the left of
the type field on the desktop version, AND we use toggles frequently
elsewhere, radio buttons less so.


Reply to this email directly or view it on GitHub
#358 (comment)
.

Noah Manger
18F http://18f.gsa.gov | Work: 415-696-6146

@noahmanger
Copy link
Contributor Author

I'll take this on.

@noahmanger
Copy link
Contributor Author

Fixed in #363

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

No branches or pull requests

3 participants