Skip to content

Commit 12b6d94

Browse files
committed
Initial commit, Candidate Decisions Started
0 parents  commit 12b6d94

24 files changed

+9335
-0
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Publicis.Sapient Front End Senior Associate Test
2+
3+
## Introduction
4+
This is a standard test where we expect the developer to respond to several aspects:
5+
6+
1. Ensure the output reflects your understanding of the best current technology
7+
2. Use of modular JavaScript patterns and/or a JS framework (e.g. Angular, Polymer, React, etc.) to build the necessary functionality
8+
3. Show how a user interface can operate in different contexts
9+
3. Demonstrate your approach to using an API to retrieve data and content
10+
4. Demonstrate your ability to deliver and enforce high code quality and maintainability
11+
5. We'd like to see how you use Git in your workflow
12+
6. Where possible to provide nice flourishes to demonstrate a flair
13+
14+
## Example of what you will be building
15+
16+
### Mobile
17+
![Carousel Test Example Mobile](./carousel-mobile.png)
18+
### Desktop
19+
![Carousel Test Example Desktop](./carousel-desktop.png)
20+
21+
## Brief
22+
Using the image above as a reference build a mobile-first carousel widget that cycles through six images via the `prev` and `next` buttons. These are styled differently depending on the viewport size.
23+
24+
To obtain the images please use our Pixabay account, details below. Once they are available to the app load them into the carousel and enable the functionality for the buttons.
25+
26+
Feel free to use whatever tools seem most appropriate for managing styles.
27+
28+
Please do not spend more than three hours on this test. **It's not important to complete the code** in the time that you have, but it is important that you are able to demonstrate your thinking via documentation and additional information.
29+
30+
We do not expect a high amount of unit test coverage for this project given the short timeframe. However, we are keen to see tests for the most important functions.
31+
32+
Keep the carousel itself quite simple in terms of how it responds; it doesn't need to snap. Concentrate on the quality of the code.
33+
34+
## Pixabay API
35+
API url `https://pixabay.com/api/`
36+
API key: `9656065-a4094594c34f9ac14c7fc4c39`
37+
Documentation: `https://pixabay.com/api/docs/`
38+
Example search: `https://pixabay.com/api/?key=9656065-a4094594c34f9ac14c7fc4c39&q=beautiful+landscape&image_type=photo`
39+
This will return an object with a `hits` property, which will be an array of images. Relevant properties in the request result are:
40+
`hits[0].imageURL`
41+
`hits[0].user`
42+
`hits[0].likes`
43+
44+
### Typeface
45+
Use `Ropa Sans` as the typeface for the text, which is available through [Google Fonts here](https://fonts.google.com/specimen/Ropa+Sans)
46+
47+
### Images
48+
Use the SVG included in this directory for the arrow icons
49+
50+
![arrow](./arrow.svg)
51+
52+
## How it should work
53+
* The 'active' carousel item is always centred in its container
54+
* When you click the `prev` button, it should centre the previous item
55+
* When you click the `next` button, it should centre the next item
56+
* As you scale up the browser window more of the carousel becomes visible
57+
* It should run in the last two versions of Chrome, Firefox, Safari and Edge
58+
59+
## Evaluation criteria
60+
We will assess your work on the following basis:
61+
62+
* Code structure, quality and consistency
63+
* Technology choices
64+
* Accessibility
65+
* Cross browser compatibility
66+
* Responsiveness
67+
* Attention to detail
68+
* Clear documentation
69+
* Dependency management
70+
* Test quality
71+
* Git commit history
72+
73+
74+
## Rules
75+
* You can install any core library you like (e.g. React, Angular, Vue, etc.) **BUT…**
76+
* Please **DO NOT** use a 3rd party carousel plugin - we want to see your JS skills
77+
78+
### Git
79+
Please initialise a new git repository and commit your changes whenever you feel necessary. We will review your git commit history log.
80+
81+
# Conclusion
82+
When you've finished, please zip up the repository and email it to your Publicis.Sapient hiring contact.

doc/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Publicis.Sapient Front End Senior Associate Test
2+
3+
## Introduction
4+
This is a standard test where we expect the developer to respond to several aspects:
5+
6+
1. Ensure the output reflects your understanding of the best current technology
7+
2. Use of modular JavaScript patterns and/or a JS framework (e.g. Angular, Polymer, React, etc.) to build the necessary functionality
8+
3. Show how a user interface can operate in different contexts
9+
3. Demonstrate your approach to using an API to retrieve data and content
10+
4. Demonstrate your ability to deliver and enforce high code quality and maintainability
11+
5. We'd like to see how you use Git in your workflow
12+
6. Where possible to provide nice flourishes to demonstrate a flair
13+
14+
## Example of what you will be building
15+
16+
### Mobile
17+
![Carousel Test Example Mobile](./carousel-mobile.png)
18+
### Desktop
19+
![Carousel Test Example Desktop](./carousel-desktop.png)
20+
21+
## Brief
22+
Using the image above as a reference build a mobile-first carousel widget that cycles through six images via the `prev` and `next` buttons. These are styled differently depending on the viewport size.
23+
24+
To obtain the images please use our Pixabay account, details below. Once they are available to the app load them into the carousel and enable the functionality for the buttons.
25+
26+
Feel free to use whatever tools seem most appropriate for managing styles.
27+
28+
Please do not spend more than three hours on this test. **It's not important to complete the code** in the time that you have, but it is important that you are able to demonstrate your thinking via documentation and additional information.
29+
30+
We do not expect a high amount of unit test coverage for this project given the short timeframe. However, we are keen to see tests for the most important functions.
31+
32+
Keep the carousel itself quite simple in terms of how it responds; it doesn't need to snap. Concentrate on the quality of the code.
33+
34+
## Pixabay API
35+
API url `https://pixabay.com/api/`
36+
API key: `9656065-a4094594c34f9ac14c7fc4c39`
37+
Documentation: `https://pixabay.com/api/docs/`
38+
Example search: `https://pixabay.com/api/?key=9656065-a4094594c34f9ac14c7fc4c39&q=beautiful+landscape&image_type=photo`
39+
This will return an object with a `hits` property, which will be an array of images. Relevant properties in the request result are:
40+
`hits[0].imageURL`
41+
`hits[0].user`
42+
`hits[0].likes`
43+
44+
### Typeface
45+
Use `Ropa Sans` as the typeface for the text, which is available through [Google Fonts here](https://fonts.google.com/specimen/Ropa+Sans)
46+
47+
### Images
48+
Use the SVG included in this directory for the arrow icons
49+
50+
![arrow](./arrow.svg)
51+
52+
## How it should work
53+
* The 'active' carousel item is always centred in its container
54+
* When you click the `prev` button, it should centre the previous item
55+
* When you click the `next` button, it should centre the next item
56+
* As you scale up the browser window more of the carousel becomes visible
57+
* It should run in the last two versions of Chrome, Firefox, Safari and Edge
58+
59+
## Evaluation criteria
60+
We will assess your work on the following basis:
61+
62+
* Code structure, quality and consistency
63+
* Technology choices
64+
* Accessibility
65+
* Cross browser compatibility
66+
* Responsiveness
67+
* Attention to detail
68+
* Clear documentation
69+
* Dependency management
70+
* Test quality
71+
* Git commit history
72+
73+
74+
## Rules
75+
* You can install any core library you like (e.g. React, Angular, Vue, etc.) **BUT…**
76+
* Please **DO NOT** use a 3rd party carousel plugin - we want to see your JS skills
77+
78+
### Git
79+
Please initialise a new git repository and commit your changes whenever you feel necessary. We will review your git commit history log.
80+
81+
# Conclusion
82+
When you've finished, please zip up the repository and email it to your Publicis.Sapient hiring contact.

doc/arrow.svg

Lines changed: 9 additions & 0 deletions
Loading

doc/candidate_decisions.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Brian Boyko
2+
## Candidate Decision Making Process Notes
3+
4+
Hello. In order to give you an idea of my thought process during this code challenge, I will be providing notes in this document.
5+
6+
This repository was created with Create-React-App, using the ts-scripts to add typescript support.
7+
8+
## Initial decisions:
9+
10+
## Libraries chosen (and why):
11+
12+
* Language: *Typescript*
13+
14+
When possible, I like to use Typescript instead of standard Javascript. There is a time tradeoff in setup, but with good tooling and linters, you can catch potential errors before you build. This is not a hard requirement but one which I think makes sense for this project.
15+
16+
* Framework: *React/Redux*
17+
18+
Because the position is primarily going to be working with React, I will be using that as my front-end framework. However, the scope of this project does not necessarily require an entire front-end framework. Nor would it require the use of Redux - however, I imagine you will want to see me make use of a state manager.
19+
20+
* Unit Testing: *Jest*
21+
22+
I've used Mocha, but Jest is really designed for mocking APIs and handling promises elegantly. I like that you can put your test files alongside your source code, as that allows you to have at-a-glance visibility into what features and functions have test coverage. 100% coverage is not always feasible (and usually neither required nor desired) but the key areas to test would be the API code and the state manager.
23+
24+
* Client-Side Ajax: *Superagent*
25+
26+
There are a number of libraries for making API calls, Superagent for me has always been simple and straightforward, although I've used others, such as fetch and axios.
27+
28+
* Package Manager: *Yarn*
29+
30+
Yarn is fundimentally the same in practice as NPM, but allows you to download packages to your hard drive, saving install time.
31+
32+
* Styles: *Sass* and *Aphrodite*
33+
34+
Through Webpack, I can easily add Sass as any other dependency to the project. But since the project requires interactivity and the CSS used will likely depend on state, as a backup, *Aphrodite* will serve as a CSS-in-JS solution.
35+
36+
## Architecture
37+
38+
Here's the architecture pattern I like to use. I like to think of the application as a ziggurat - built in layers, with these rules.
39+
40+
* A lower layer should have no dependencies upon a higher layer.
41+
* No layer should mutate the state of another layer except by calling provided exposed functions (Kind of like object-oriented encapsulation, but across a number of classes.)
42+
* Lower layers should propagate information about the application state to the higher layers, and provide callbacks that the higher level layers can call to change state.
43+
44+
For this application, I'm choosing this structure:
45+
46+
```
47+
------ Structure/Styling (HTML/CSS);
48+
----- Stateless Components (Takes props, outputs JSX)
49+
---- Containers (Local application state, interface with redux)
50+
--- State Manager (Redux)
51+
-- Framework (React base)
52+
- API Interface Library (SuperAgent)
53+
```

doc/carousel-desktop.png

32.4 KB
Loading

doc/carousel-mobile.png

13.4 KB
Loading

images.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare module '*.svg'
2+
declare module '*.png'
3+
declare module '*.jpg'
4+
declare module '*.jpeg'
5+
declare module '*.gif'
6+
declare module '*.bmp'
7+
declare module '*.tiff'

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "sapient-carousel",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"react": "^16.6.3",
7+
"react-dom": "^16.6.3",
8+
"react-scripts-ts": "3.1.0",
9+
"superagent": "^4.0.0"
10+
},
11+
"scripts": {
12+
"start": "react-scripts-ts start",
13+
"build": "react-scripts-ts build",
14+
"test": "react-scripts-ts test --env=jsdom",
15+
"eject": "react-scripts-ts eject"
16+
},
17+
"devDependencies": {
18+
"@types/jest": "^23.3.10",
19+
"@types/node": "^10.12.12",
20+
"@types/react": "^16.7.13",
21+
"@types/react-dom": "^16.0.11",
22+
"@types/superagent": "^3.8.5",
23+
"typescript": "^3.2.1"
24+
}
25+
}

public/favicon.ico

3.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)