Git Product home page Git Product logo

test-carousel's Introduction

Summary


Please make a carousel UI component which contains images by using assets provided in /assets folder. The UI component should meet the requirements included in spec section.

Spec


  1. mockup

mockup

  • There are 6 photos in this carousel
  • Two arrow buttons on the left and right hand side respectively
  • 6 bullets are placed under the image
    • Bullets have two state, default and active. For example, if the component is showing the first photo, the first bullet is in active state, and the rest stay in default state.
    • colors for bullets in different state
      • default: rgb(190, 192, 188)
      • active: white

Please note that we do not specify the detailed properties in the mockup above, for example, padding, margin...etc. You can make the call on those detailed properties.

  1. features
  • When one of the arrow buttons is clicked:
    • Photo changes with sliding animation, please check the reference.
    • The active bullet also changes corresponds to photo changes

Please note that infinite carousel is not included in requirement.

Evaluation Criteria

This assignment should be submitted including index.html, the result will be evaluated via this file.

Furthermore, the evaluation criteria contains following items:

  • Completeness: Did you include all features?
  • Correctness: Does the solution perform in a logical way?
  • Maintainability: Is the solution written in a clean, maintainable way?

How to start

  • $ yarn install
  • $ yarn start
  • (test) $ yarn test

Implementation summary

  • This demo includes:
    • A React application developed with Typescript, linter(prettier), and CSS-in-JS(styled-components)
      • $ yarn format performs beautifying the edited code
    • A Carousel component inside the application
    • Checked with functionality in browser/mobile platform
    • Simple snapshot tests for the application & carousel
      • $ yarn test can verify the components by checking whether the snapshots are the same with the edited components
    • Scripts for deploying to GCP
  • Online demo
  • Sorry the commits in codesubmit.io may not be realistic, I actually spent quite some time on adjusting the css..., the real commit history can be found here

Ability of carousel

  • The carousel component supports:
    • Basic sliding function described in spec
    • Ability to auto play of carousel
    • Available to set play speed of carousel
    • Ability to click the image to open a new tab of contents
    • Available to assign the initial slide index
    • A small improvement of dots with stronger contrast and color transition between active/inactive state

v4hlg-uoedi

TODO

  • more features like caption, decorations
  • provide docker image for deploy

Please have a look, and if there are any comments for improvement, please let me know, thank you so much!

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.