Code Monkey home page Code Monkey logo

webapp's People

Contributors

amaury1093 avatar beret avatar dependabot-preview[bot] avatar dependabot[bot] avatar marceloscoelho avatar marvinody avatar mdshamoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

webapp's Issues

Change logo size

oh, I forgot to mention another difference between desktop vs. mobile: the logo is slightly bigger (160px width) on desktop then mobile (128px). I think the equivalent is 10rem… do you think you could change this later?

Create Dockerfile

The dockerfile could be:

  • based off node (probably the alpine one)
  • add mongodb inside, run it
  • set the correct ENV vars
  • run yarn install, next build, and next start
  • expose the next prot

Add more tests to Cypress 🌲

We use cypress to do e2e testing. We should add more tests.

Some ideas I have:

Components:

  • Search Bar
    • #43 Type inside search bar shows results from Algolia
    • #43 Click on a result takes to /city?lat=...&lng=...
  • Ranking
    • #38 Click on city card goes to /city/{slug}
  • AdSection
    • Can scroll right
  • BlogSection
    • Can scroll
  • Footer
    • #38 Correct link to FAQ

Home page:

  • Test "Use my location" button (might be hard)

City page:

  • Shows cigarettes after some time
  • Click on weekly shows cigs * 7
  • Click on monthly shows cigs * 30

Feel free to pick some tests, or add new ones you can think of!

Web application stucks when city switched

Steps to reproduce:

  1. Open https://shootismoke.app/city
  2. Open any place and see stats there
  3. Select another city

Finally everything stucks and page stopped to respond on any actions

Chrome Version 101.0.4951.64 (Official Build) (x86_64)

I checked Safari and everything works
I wanted to find root cause of this problem, but unfortunately the project doesn't starts in web env locally

Improve algorithm to find the N closest cities to current location

Summary

The current algorithm for find the N closest cities to the current location is very naive. We could optimize it.

Problem Definition

If you go to the page of a city (example here), there's a ranking section, which shows the 6 closest cities to the current location, and their cigarettes information.

Screenshot 2020-10-25 at 19 27 48

The current algorithm to calculate these closest cities is the following:

This algorithm is not optimal (O(n^2)). It's okay for 1000 cities, but there are surely better way to find the closest N cities around the current location.

Potential Solutions

  • data structures such as r-tree, quad-tree or k-d tree

Add more unit tests!

@mdshamoon laid out the tooling around unit tests in #69 πŸ’ͺ We need to add more unit tests though.

If you are an external contributor, please free to post a message here and choose a couple of components to add unit tests too.

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.