Skip to content

Instantly share code, notes, and snippets.

@stormpython
Last active May 9, 2020 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stormpython/845a5fea566bcf04eb1c0d49ee2dfab3 to your computer and use it in GitHub Desktop.
Save stormpython/845a5fea566bcf04eb1c0d49ee2dfab3 to your computer and use it in GitHub Desktop.

Snippet UI Take Home Assignment

image

Overview

The Snippet UI consists of an input and output area. The input area contains a code editor which accepts javascript code. The output area needs to display the result of the evaluated code in the code editor, e.g. see below. The goal of this activity is to hook up the Run button so that the results of the evaluated code appear in the output area.

running in action

Summary

Goal

  1. Hook up the Run button so that the results of the evaluated javascript code appear in the output area of the UI.
  2. Include a separate README.md entitled SOLUTION.md explaining a bit about what you did and also how you would test your solution.

Extra Credit

  1. Make the UI your own by adding styling or improving the UX.
  2. Create a snippet history feature.

If you have extra time and want to go further, you could try your hand at hooking up the snippet history feature. The end result should be a simple list of previously run snippets identified by their snippet id. The task is as follows:

  1. Display a list of the previously run snippets in the side drawer (to get to the side drawer, see image below). You may use the snippet id as the display text for each item in the list.
  2. Make each item in the list clickable, and when clicked the UI should display both the input and output of the previously run snippet.

Hint: This requires examining the server/schema.ts file to determine which GraphQL queries are available and hooking them up utilizing Apollo Client.

Getting Started

Prerequisites

  1. Node
  2. Yarn

Install dependencies

In the project directory, you can run:

$ yarn && yarn start

Getting help

If you have questions, run into issues, or find bugs, please feel free to contact us at dsp-notebook-dl@netflix.com.

Submitting the assignment

When you are done, zip the project folder and email it to dsp-notebook-dl@netflix.com.

References

This project was bootstrapped with Create React App.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment