Piano-Roll-Coding-Challenge.webm
Everything is working on desktop, tablet and mobile screens. Application is logging selection start and end points to the console.
Initaial project was migrated to React Framework using Vite.js as a project creation tool.
To run this projekt localy you have to:
- Install node.js (and npm if you don't have it)
- Clone project from my git
- Run npm install
- Run npm run dev
In you inital project logic of processing data is mixed with presentaion. I've tried to seperate is at the beginnig. Goal was to have components responsible only for presentaion of SVG generated by your PianoRoll object.
Application from "user experience" perspective have two "pages" (pages are in user perspective - this is single page application):
- Main page - with piano rolls grid
- Details page - showing selected piano roll with list on the side
This allows for example send direct link to someone pointing on selected piano roll. SEO is another thing.
To build this in a proper way Backend API should have two end points:
- getPianoRollList - list of all piano rolls
- getPianoRollDetails - one selected piano roll (by ID)
Using existing API I have to pass array of piano rolls between "pages". Because of this when I hit http://localhost:5173/details/5 I don't have list of all piano rolls to extrtact fifth one. I've handled this by showing error page. You have to go thru main page to get list.
Selection is workign on desktop and mobile (different events to listen). I didn't manage to implement:
- Selection from right to left - it's more complicated because I have to dynamicly change direction of layout to draw selection box in other direction
- Handlign of getting out of piano roll box to automaticlly end selection on boarder of image.
I'm aware of this flaws but my seniority in front end development is not enough :(
Thank you for this challage! It was very informative and I've learn a lot having fun with piano rolls :) My personal opinion is this challenge was very advanced for a junior front end developer. Not impossible but demanding.