Giter Site home page Giter Site logo

littlefactautocomplete-week4's Introduction

Colourcompleter ๐ŸŒˆ

What we decided to make

We decided to build a colour picker app so that developers can easily find the specific hexcode for colours they like. Our project had to meet the following criteria:

  • Dynamically give autocomplete suggestions
  • Use a large data file to search/filter from but maintain speed
  • Back-end testing using tape and basic front-end testing
  • Host our site on Heroku

Not all goals were met during the allotted time and we'll try to explain why in this readme.

Our approach

  • Modularisation: we wrote down the structure of our folders and the files that should be contained within them to get a sense of how they link together and what functions each should contain. File Architecture
  • Software Architecture: we laid out on a whiteboard what the experience of using our site should involve with the paths and connections to each aspect drawn out. Software Architecture Flowchart Software Diagram
  • Divide & Conquer: once we had an idea of how things should flow, we decided how to split up tasks and begin.

"It works! How did we do that??"

We divided up tasks into front end and back end with a pair taking on each side and us switching up roles after the first day. We had a few issues:

  1. We had problems in initial system planning as it was difficult to get our head round the flow of the system. However, after a little after hours reading, we were better able to understand how to modularise our code well. As planning time increased, time required to refactor/modularise code decreased.

  2. We initially wanted to build an app intended to help grandmothers remember the names of their grandchildren using autocomplete. However, we struggled to find a large enough file with peoples names. We then pivoted idea towards a colour picker app (for which we found a medium-size object). It would have been wiser to search for large objects before deciding on the autocomplete theme.

  3. We experienced a large API crisis. A 'mime error' kept occuring when reading the .css file which meant that the api was responding with Content-Type: text/html when it should respond with Content-Type: text/css .

  4. On the front end we kept making small mistakes like defining functions but not calling them or not having the precise syntax correct for event handlers. For example, event.target.value.

  5. To create our response object on the back end we used includes() method inside a filter() function: includes() checks whether user input is part of any of the colours names from our library and filter() creates a new array with all the objects from our library that match the user input string. To make includes() compare actual values we used toLowerCase() method.

  6. We kind of succeeded with building the function that created the response object to the XHR request, but we spent ages trying to figure out why our page didnโ€™t load plain index.html. And the lesson we learnt is that we should be attentive to our small mistakes, like typos or closing if functions with else statements.

Good links

Final shoutout to @mineshmshah for providing chocolate when we most needed it. ๐Ÿซ

littlefactautocomplete-week4's People

Contributors

ameliejyc avatar y-zaky avatar polyccon avatar azayneeva avatar

Stargazers

 avatar  avatar Yvonne avatar

Watchers

James Cloos avatar Jen Spencer avatar  avatar  avatar

littlefactautocomplete-week4's Issues

Possible css for hover over list elements

When the list elements appear it is unclear that you need to click on them. An easy fix is to add a hover property to the css list elements like the following with some highlight :

li hover: {
...
}

not a necessity but a little suggestion to make it clear :)

โœจ โœจ โœจ

I feel like I can confidently say that you guys understood the material this week and completed the main project goals. Really awesome job all around! Minor fixes here and there as well as focusing on things you might've not prioritized (accessibility and tests) would make this even better! ๐Ÿ”ฅ

Could make it more clear how to use the site

i love your site โค๏ธ ๐Ÿ‘

but it's not clear when you arrive that clicking on an item will do anything.

Even just having the cursor change to pointer when hovering would help :)

Be careful not to use ES6 in the index.js

As it's not fully supported just keep it in the backend. I think it's only a case of changing 'const' to 'var' ๐Ÿ‘

const userInput = document.getElementById("userSearch"); const colourResults = document.getElementById('results');

Delete merged branches

12 branches ๐Ÿ˜ฑ
But really, it's just good practice to delete branches once they're merged! ๐Ÿ‘

No script to run `Nodemon` in `Package.json`

I know it works using node src/server.js or nodemon src/sever.js but it might be a good idea to add the "scripts" section, like this:

  "scripts": {
    "start": "nodemon src/server.js"
  }

Unusable with keyboard

Keydown enter of a search color takes me to 404
Cannot tab through search results
Cannot select colors using key up or key down

Host on Heroku

Looking forward to seeing it hosted on Heroku! Let me know if you need any help with this part โœจ

Relates to #3

Tabbling through results

Is there a way to cycle through the results with a tab? Would be really great to see for accessibility reasons :)

Remove unused files

Should probably make an issue just once and for all. This one is in reference to the empty/completely commented-out code in the test folders: index.test.js and server.test.js

Relates to #37 and #44

No mouse hover over select

Right now it's hard for me to tell when something I'm hovering over is selectable. There are two types of mouse hover over the text and the button.

More tests please!

It's great to have three tests on one function, but let's have more tests!

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.