Giter Site home page Giter Site logo

nex's Introduction

NEX - An Autocomplete Experiment

This is a basic implementation of an autocomplete widget. This little app allows the user to select a username, by mouse click or by keyboard navigation, from a list of autocomplete options. A username is identified as a word starting with '@'.

To run it locally

Make sure you have node and npm installed! If you don't, try nodejs.org

$ git clone https://github.com/sheetaluk/nex
$ cd nex
$ npm start

Now, navigate to: localhost:8000

Example:

Hello there, @lil

To run unit tests

npm test

Tested on

  • Chrome
  • Firefox
  • Safari

For the future

At the moment a username starts with @, followed by a letter and then one or more occurances of letters and numbers and no punctuation and special characters. We should think about how to address cases like:

  • Hello.@user
  • Hello(@user)
  • "@user"

It might well be the case that we need to expand the autocomplete widget to different datasets with varying patterns of input representing autocomplete candidates. To this end, input specific behavior can be parametrized and injected into the program. That is, datasets can be paired with regex and an instance of the widget can be created on the fly .

The application would benefit from more unit tests and end to end tests.

For better UX, usernames in the UI can be highlighted.

Consolidate tasks into dev and prod tasks in Grunt

If this were a growing project, more thought could be put into directory layout.

Here is a screenshot

Alt text

nex's People

Contributors

sheetaluk avatar

Watchers

 avatar  avatar

nex's Issues

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.