Hong-Kong-Districts-Info/dashboard-hkdistrictcouncillors

Search by District Councillor name

Closed this issue · 5 comments

It's a very common situation where people know a name, but want to figure which constituency he/she represents, and what they are up to recently. It is currently not possible to do this via the app.

A feature to let people filter / search by District Councillor name.

Linked to #25. Makes sense to resolve them both together.

Having optional and dependent search boxes aren't super easy! The below doesn't work.

selectizeInput(inputId = "input_dropdowntext",
                       label = "請選擇選區 / Please type or select a district",
                       choices = list(Region = sort(unique(data_master_raw$Region)),
                                      Constituency = sort(unique(data_master_raw$DropDownText)),
                                      DC = sort(unique(data_master_raw$DC)))
                       ), #selectizeInput

image

Made this a spike because what you want is different ways to filter, but at the same time, these filters can impact the choices in a different filter *e.g. Someone chooses Region = "Hong Kong Islands" and then the list of DCs becomes smaller.

From previous experience in my old company, this was quite difficult to achieve.

Made this a spike because what you want is different ways to filter, but at the same time, these filters can impact the choices in a different filter *e.g. Someone chooses Region = "Hong Kong Islands" and then the list of DCs becomes smaller.

From previous experience in my old company, this was quite difficult to achieve.

What if we have the region selection available as check boxes, where the default is to have all three boxes (Hong Kong Island, Kowloon, New Territories) checked? The user would expect the list of DCs to become smaller as you un-check more regions, but at the same time the user won't have to 'try' all three regions to get to the DC that they want.

Closing this as I think @martinctc implementation of the region + constituency does a good enough job.