Giter Club home page Giter Club logo

autocomplete's Introduction

Front-end Challenges

Autocomplete Challenge

Build a responsive web application in the framework of your choice that lets users search for a city in a provided list.

  1. Capture key presses from a text input and use the current value of the input to match items in the list (shown below).
  2. The application should output the results under the input field as soon as you type at least 3 characters.
  3. If you type less than 3 characters in the text field, it should not output any results. (It can return a prompt to type more at least 3 characters)
  4. If there are no results for the search, you should let the user know.
  5. Search through this list for approximate matches. For example, if the user enters san, it should match san, santiago, san francisco, santa rosa, etc. If they enter sant, it should only match santiago and santa rosa.
  6. When the page loads the search field should be selected automatically, so you can start typing (similar to when you go to https://www.google.com/).
  7. The application should work well on desktop and mobile.

The City List:

const cities = [
  'san', 'san jose', 'santiago', 'san francisco', 'santa rosa', 'san juan', 'sabadell', 'salamanca', 'salt lake city', 'salinas', 'salem', 'sausalito', 'taipei', 'tel aviv', 'tempe', 'termez', 'temuco', 'tiajuna', 'tieling', 'thousand oaks', 'thunder bay', 'tokyo', 'tulsa'
]

DOM Assumptions:

Work off of this HTML file and render the application into #app-autocomplete. You can add script and style tags as you want, we only care about <div id="app-autocomplete"></div> being in place.

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Autocomplete</title>
</head>

<body>
  <div id="app-autocomplete"></div>
  <script src="app.js" type="text/javascript"></script>
</body>

</html>

Requirements

  • Provide a README file and add information on how to build and/or run the project locally. This file can also include your thought process and any explanation.
  • Push the application to a public github repo and provide us with a link.

Implementation

  • If you want to, feel free to use any boilerplate projects and gulp, grunt, webpack that bootstap the project for you. But if you don't need it, you don't have to add it, they're not part of the challenge.
  • If you are using any js processors, include both source and distribution files.
  • Add some styles, make it look good.
  • Do not cheat. There are lots of autocomplete projects out there, we're not interested in those. We want to see how you think.

What we're evaluating

  • Is there enough information for us to run the project?
  • Does it work?
  • How are the components structured?
  • How clean is the code? (comments are good, explicit code is better)
  • How does using it feel overall?

Timeframe

We're expecting this will take you one or two evenings.

More Questions?

Contact [email protected].

autocomplete's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.