Skip to content

Commit 85e9e18

Browse files
authored
Chore - Update to challenge v2 (#14)
Put Version 2 Live Co-authored-by: ehynds <[email protected]> Co-authored-by: Kira Pilot <[email protected]>
1 parent a4a87b6 commit 85e9e18

28 files changed

+29843
-1773
lines changed

.babelrc

-4
This file was deleted.

.gitignore

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

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

README.md

+67-50
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,101 @@
1-
# Robin Frontend Interview Challenge
1+
# Robin Front-end Interview Challenge
22

3-
Welcome!
3+
Hi there! Congrats on making it to the take-home portion of our interview process! We aim for this exercise to be enjoyable and brief, and welcome feedback. We also are happy to answer questions, so please don't be shy about reaching out to your point of contact at Robin should you find any parts of this challenge unclear or confusing.
44

5-
Here you will find a set of problems to solve when interviewing with Robin. These problems represent real-world scenarios you can expect to encounter while working at Robin.
5+
## Getting Started
66

7-
We do not expect you to spend more than an hour or two on these challenges.
7+
To get up and running:
88

9-
## Getting Started
9+
1. Install NodeJS 16+. If you have `nvm` installed, run `nvm use` from the root of the repository.
10+
2. Install dependencies:
1011

11-
### Pre-requisites
12+
```bash
13+
npm install
14+
```
1215

13-
- NodeJS version 8+ [Download here](https://nodejs.org/en/)
16+
3. Boot up the test web server & front-end application:
1417

15-
Once node is installed clone this repository. Please ensure all work is done on a new feature branch:
16-
```
17-
git checkout -b robin-challenge-solutions
18-
```
18+
```bash
19+
npm start
20+
```
1921

20-
```
21-
npm install
22-
```
22+
## Challenge
2323

24-
## Challenges
24+
You will be building a simple web app that fetches data from a remote server, transforms it, and outputs some UI. In the end, your solution should match this wireframe:
2525

26-
The challenges are broken into two groups - functional programming challenges and UI component challenges.
26+
![Wireframe](wireframe.png)
2727

28-
Challenges can be found in the `challenges/` directory. Each challenge contains three files:
28+
Specifically, we ask that you:
2929

30-
#### `challenge.js`
30+
### 1. Fetch remote data
3131

32-
This is where you will implement the function, or component, to complete the challenge. The contents of this file are entirely up to you, the only requirement is that the function signature remains the same and remains exported.
32+
Please make an HTTP request to fetch JSON from the bundled web server. This server is started automatically upon running `npm start` and is available at `http://localhost:8080/data`.
3333

34-
#### `data.json`
34+
We've also [proxied](https://create-react-app.dev/docs/proxying-api-requests-in-development/) the server for your convenience, so you may fetch data in your client-side code by simply making a `GET` request to `/data`.
3535

36-
This contains the mock data that will be used for the particular challenge. These are made up events, or multiple groups of events, depending on the challenge.
36+
See the `User data` section below for more information about the shape of the JSON.
3737

38-
### Meeting Availability Challenge
38+
### 2. Display the data in a table
3939

40-
Find the availabile time slots within a given schedule.
40+
Please render a table of events for all users, but **only include events that start and end within each user's working hours**.
4141

42-
```js
43-
findFreeTimes(start: Date, end: Date, duration: number, events: Array<Event>)
44-
```
42+
### 3. Add a user filter
4543

46-
[View the challenge](https://github.com/robinpowered/frontend-interview-challenge/tree/master/challenges/1.%20Meeting%20Availability)
44+
Please create a filter with options for each user in the dataset. When a user is selected, only show events in the table for the selected user.
4745

48-
### User Availability Challenge
46+
## Guidelines
4947

50-
Find the available time slots that are free across a set of individual schedules.
48+
When writing your solution, please:
5149

52-
```js
53-
findFreeTimesAcrossSchedules(start: Date, end: Date, duration: number, schedules: Array<Array<Event>>)
54-
```
50+
- Timebox your effort to no more than 2 hours. Even if your solution is incomplete, we'd prefer that you feel proud of the code you did write rather than accept an incomplete or buggy solution.
51+
- Use whatever tools or packages you'd like to help you write your solution. If you enjoy performing network requests with `axios` or styling tables with `styled-components`, feel free to install these libraries!
52+
- TypeScript is enabled in this project and is available for use but it is **not required**! Write your solution in whichever language you're most comfortable with. If you prefer plain JavaScript, the easiest path forward is to create `.js` or `.jsx` modules instead of `.ts` or `.tsx` (and rename the existing `App.ts` to `App.js`, too).
5553

56-
[View the challenge](https://github.com/robinpowered/frontend-interview-challenge/tree/master/challenges/2.%20User%20Availability)
54+
## User data
5755

58-
### Component Challenge
56+
The test data served by the bundled web server is array of objects where each object represents an individual user, with properties for:
5957

60-
Create a React component representing a common UI element seen across Robin.
58+
- A list of meetings the user has on their schedule (`events` property)
59+
- The hours in which the user works (`working_hours` property), and their time zone
60+
- The user's ID and name (`user_id` and `user_name` properties)
6161

62-
```jsx
63-
<AvailabilityTimePills
64-
start={startTime}
65-
end={endTime}
66-
duration={30}
67-
events={events}
68-
/>
62+
```json
63+
[
64+
{
65+
"user_id": 1,
66+
"user_name": "Alice",
67+
"working_hours": {
68+
"start": "09:00",
69+
"end": "17:00",
70+
"time_zone": "America/New_York"
71+
},
72+
"events": [
73+
{
74+
"id": 2,
75+
"title": "Meeting B",
76+
"start": "2019-01-01T09:00:00-0500",
77+
"end": "2019-01-01T10:00:00-0500"
78+
},
79+
...
80+
]
81+
},
82+
...
83+
]
6984
```
7085

71-
<img width="1000" alt="screen shot 2017-03-21 at 4 34 59 pm" src="https://cloud.githubusercontent.com/assets/656630/24169546/5e2610b6-0e54-11e7-87cd-0b70744dc269.png">
86+
## Extras
7287

88+
Optionally and only if you find yourself with extra time on your hands (we really mean it - these are not requirements), we'd love to see you show off your skills by adding any of the following:
7389

74-
[View the challenge](https://github.com/robinpowered/frontend-interview-challenge/tree/master/challenges/3.%20React%20Components)
90+
- loading and error states
91+
- accessible table considerations
92+
- offline detection for users of the application
93+
- the scaffolding to share selected user state across the application (pretend we were going to add more views to this application, and each view needed access to the filtered user - how could we achieve that? )
7594

76-
## Preparing and submitting the challenge
95+
## Submitting the Challenge
7796

78-
Please submit your response via email in the form of a git patch. Please check to make sure all your changes are committed before generating the patch file. Once generated you can attach the patch file and email it back to the person who sent you the challenge. The patch file can be generated by running the following command.
97+
If you have any notes you'd like us to review when we look over this project, please feel free to add them to the `notes.md` file at the root.
7998

80-
```
81-
git format-patch master --stdout > <yourname>-solutions.patch
82-
```
99+
After completing this challenge, please email us your zipped solution!
83100

84-
We look forward to seeing your solutions!
101+
We look forward to seeing your work and will get back to you promptly.

challenges/1. Meeting Availability/README.md

-40
This file was deleted.

challenges/1. Meeting Availability/challenge.js

-3
This file was deleted.

challenges/1. Meeting Availability/data.json

-42
This file was deleted.

challenges/2. User Availability/README.md

-94
This file was deleted.

challenges/2. User Availability/challenge.js

-3
This file was deleted.

challenges/2. User Availability/scheduleA.json

-22
This file was deleted.

0 commit comments

Comments
 (0)