Skip to content

krish-ram/search-app

Repository files navigation

search-app



Problem Statment:

You have to make a search input box which will search over a list of users.

The user object has the following fields

id: a unique id

name: user’s name

items: list of items ordered by user

address: address of the user

pincode: user address pin code

You have to implement search on all of the fields.

The search results will show up as a list of User Cards. Refer to the screenshots for how the UI would look like

  1. Placeholder (empty input)

  2. Search Result List


3. No Results Card

To Summarize

  1. On typing in the search input box, the search results list opens up. The search could be just a string matching search.

  2. The list of cards can be navigated through keyboard or mouse


    1. only one card should highlight at a time if both mouse and keyboard are used for navigation

    2. (keyboard will take preference if mouse is kept hovered on the list, similarly mouse will take preference if keyboard navigation is not used).

    3. This behaviour is similar to how youtube search works

  3. When no search results are found, an empty card is displayed

  4. The card list would be scrollable

  5. The highlighted card (via keyboard/mouse) will scroll into view


You can find the mock data here

Evaluation Criteria

  1. Modularity of code

  2. Handling of Keyboard navigation with mouse.

  3. Handling  ScrollIntoView


You are free to use any framework for the webapp.

1. No jQuery.

2. No need for fancy CSS - We know you can do it if you can code this stuff. (But the

card structure).

3. To submit the solution, please upload the entire folder on Google Drive / Dropbox, share the folder as 'anybody with link can view' & then reply back with the link to this email.

5. The assignment can be done using plain JS, or any frameworks such as AngularJS, ReactJS.

6. Do not use a library for handling ScrollIntoView.

About

React based search bar with mouse and keyboard accessibility to navigate through list

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published