Closed Th1nkK1D closed 9 months ago
@svnnynior Let me know if you're interested or have any questions.
@Th1nkK1D, sorry. it was a busy week.
yes, i am interested. but this month is quite packed for me, so it might need to take me a few weeks to finish it. feel free to assign it to me if that time frame is acceptable. thank you~
Our timeline is a bit tight, so I'll take a look at this now.
This is addressed in 2d960aef5657bdd5ee74cbffd47191ff8f7aede9 306670a92c1004f4a2d06711988875ace4630a0d 1d7b7b9298f1d543b1089749cd9fbd3a6925d974 5dffab206786688dce014398fe0fbc9731694fd7 f205ecbf8bc2db6f07e5c056d3909203e0fa367d cbc3cae761727258d7e8b5e38d5bcf55a7dc4ce0. (Internal issue tracking number WEV-64 was used instead of this issue number)
Consider this closed. Thanks all :)
I made some updates.
SearchResult
gives. 368653f559ddb671c02be8b90de4f6792afd286eSearchResult
instead of plain JSON in the SearchInput
doc. So others will know it is designed to be used together. 007d3c63483dba87cf05da36a9badfedc8868b15
Current situation
The search functionality was implemented in #39 for the
NavigationBar
. Our search strategy is to create aSearchIndexes
data that provides minimum data which will be filtered and shown inSearchResults
. However, it only works with 3 fixed types of categories:politicians
(นักการเมือง),bills
(กฏหมาย), andvotings
(การลงมติ) as defined in src/models/search.tsThe corresponding UI looks like this:
What we want
Search functionality must be refactored in order to be able to be used in 2 more places
bills
andproposers
(view Figma)politicians
,bills
, andvotings
only one category per input. (view Figma)I think the solution is to add support for the new category in
SearchIndexes
andSearchResults
, and make it optional so each search input doesn't need to have the same category.Starting point
src/models/search.ts
src/libs/search.ts
SearchItem
,SearchResult
,SearchResultGroup
components insrc/components
SearchInput
component (withyarn gen:component
) based on Carbon's TextInput which received flexibleSearchIndexes
props. You can just mock it as aconst
for now.yarn story:dev
Important Please feel free to raise an issue if something is not making sense, or you found a better way to do it.