This repository has been archived by the owner on Mar 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
232 lines (205 loc) · 14.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="description" content="The world's best freelancer designers and developers, available for hire.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="theme-color" content="#fd6666">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1 , user-scalable=no"/>
<title>
YunoJuno - Have a conversation with us
</title>
<script>
window.YJ = {};
function buildMessageHTML() {}
function displayNewAlert() {}
function initButtonSpinners() {}
</script>
<link rel="stylesheet" media="screen" href="css/core.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
</head>
<body>
<div class="Chrome Chrome--noSidebar Chrome--light">
<div class="Wrapper Wrapper--wide">
<div class="Wrapper-inner">
<header class="Chrome-header" id="header" role="banner">
<div class="Chrome-headerInner">
<div class="Chrome-nav">
<div class="Chrome-navLogo">
<a href="/" class="YJLogo YJLogo--small icon-yj-logo-black">
YunoJuno
</a>
</div>
<ul class="Chrome-navItems">
<li class="Chrome-navItem">
<a href="http://blog.yunojuno.com">Blog</a>
</li>
<li class="Chrome-navItem">
<a href="mailto:[email protected]">Contact</a>
</li>
</ul>
</div>
</div>
</header>
</div>
</div>
<div class="Chrome-content" role="main">
<div class="Chrome-contentInner">
<div class="Container Container--signIn">
<div class="Container-body">
<h1>The front-end developer test</h1>
<p>Hi there, thanks for taking part. </p>
<p>At YunoJuno we have a conversations application which enables freelancers and employers to talk to each other, whether that be about a brief, a contract or a catch up. It all goes through conversations.</p>
<p>The platform backend runs on Django (which isn’t required for this test). The application talks to an ajax endpoint and returns HTML which we replace the contents of the conversation with (this has been replaced with a localStorage solution to negate the need for endpoints).</p>
<p>A conversation thread is made of many messages. Each message contains the message (obviously), possibly an attachment and the date/time it was sent.</p>
<p>In practice, the form is also replaced, which with it brings validation from the server. However as we are using localStorage the form isn't replaced and instead is only emptied.</p>
<p>What you will find when you checkout the source is an isolated piece of functionality from our platform.</p>
<p>On the platform, conversations take place with multiple parties. In this scenario there is only one participant. You.</p>
<p>Your browser will also need to support localStorage.</p>
<p>As with most modern front-end systems we require Node to be installed.</p>
<p>
<strong>Note:</strong> The attachment field is only simulated in this example, you can do everything you would normally with an attachment
but it isn't stored on the file system. All attachments within a conversation message are empty links with the filename stored.
</p>
<h2>Sources</h2>
<p>In the yunojuno-conversations directory you will see a package.json, run <code>npm install</code> from this directory to install the required packages.</p>
<h2>Tooling</h2>
<p>You will also need Gulp, which if you haven’t already needs to be installed via <code>npm install -g gulp-cli</code>.</p>
<p>We use karma test-runner and the jasmine test framework, you will find a starter test in <code>js/tests/</code></p>
<p>To compile the conversations component into the `dist` folder run <code>gulp scripts</code></p>
<p>To compile the CSS into the `css` folder run <code>gulp css</code></p>
<h2>Running the tests</h2>
<p>To run the tests run <code>gulp karma</code>.</p>
<p>There is also <code>gulp karma_watch</code> which will watch for your tests being updated and run run karma (it is a little faster).</p>
<h3>Test coverage</h3>
<p>Once you have run the above command once it will generate a coverage directory with your current coverage. Use this to guide your tests. Or don’t, your choice.</p>
<h2>Requirements</h2>
<p>We would like you to do four things:</p>
<ol>
<li>Add validation to the form (and associated tests)</li>
<li>Add clear button to remove attachment (and associated tests)</li>
<li>Demonstrate the ability to add a javascript trigger following the CSS animation (an alert or console.log() is enough)</li>
<li>Add commentary to our CSS to advise on best practices</li>
</ol>
<p>Submission of the test will only be accepted via pull-request.</p>
<p>Godspeed,<br> YJ Dev team.</p>
</div>
</div>
<div class="Container Container--signIn">
<div id="messages" class="Alert">
<noscript>
<div class="Alert-item Alert-item--warning">
<div class="Notification Notification--warning">
<div class="Alert-item-message">
To use YunoJuno properly, you will need to enable JavaScript. <a href="https://www.google.co.uk/search?q=enable%20javascript">(Here's how)</a>
</div>
</div>
</div>
</noscript>
</div>
<div class="Container-body">
<h1>
Conversations
</h1>
<div class="Conversation js-conversationPartial">
<!-- entity conversation form -->
<form class="Form Form--chat Conversation-form js-conversationForm" method="post" action="/conversations/availabilityrequest/28818/">
<input type="hidden" name="csrfmiddlewaretoken" value="QxnqWdU3WbHXbcm6nHeCAnGiLiKFS4bK">
<div class="Grid">
<div class="Grid-cell u-size3of12 u-md-size2of12 u-lg-size2of12">
<div class="Form-avatar">
<div class="Avatar Avatar--noImage Avatar--chatMessage ">
<div class="Avatar-inner">
<div class="Avatar-body">YOU</div>
</div>
</div>
</div>
</div>
<div class="Grid-cell u-size9of12 u-md-size10of12 u-lg-size10of12">
<div class="Form-itemGroup Form-item-section-message">
<label class="Form-label Form-label-for-message" for="id_message">
Send private message
</label>
<div class="Form-item">
<textarea class="js-activateMessage" cols="40" id="id_message" maxlength="2000" name="message" placeholder="Click here to add a message or attach a file..."></textarea>
</div>
</div>
<div class="Form-item-wrapper--controlGroup">
<div class="Form-item-wrapper">
<div class="Form-item--fileInputWrapper">
<a class="js-uploadFile-trigger" href="#">Add an attachment</a>
<input class="js-uploadFile-trigger" id="id_attachment" name="attachment" type="file">
</div>
<div class="Form-item--fileInputWrapper js-clearableFileInput Form-item--fileInputWrapper--status u-textMuted js-uploadFile-name"></div><div class="Form-item--fileInputWrapper Form-item--fileInputWrapper--status Form-item--fileInputWrapper--clear"><a href="#" class="js-clearableFileInput-trigger" style="display: none;"> Clear</a></div>
</div>
</div>
<div class="Form-button">
<button class="Button Button--primary js-spinnerButton" type="submit">
<span class="Button-inner">
Send message
</span>
</button>
</div>
</div>
</div>
</form>
<div class="Conversation-body js-conversationBody">
<div class="ChatMessage">
<div class="ChatMessage-content">
<p>There are no messages in this conversation. Add one above.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="Chrome-footer">
<footer id="footer" class="Footer Footer--noSidebar">
<div class="Footer-inner">
<div class="Grid Grid--withGutter">
<div class="Grid-cell u-md-size1of4 u-lg-size1of10 u-textCenter">
<div class="u-island u-island--vert u-island--xSmall--short">
<div class="YJLogo YJLogo--small icon-yj-logo-white">YunoJuno</div>
</div>
</div>
<div class="Footer-body Grid-cell u-lg-size3of10">
<p>Connecting the world's most innovative companies with the best freelancers in town. Minus the middleman.</p>
</div>
<div id="contact" class="Grid-cell u-md-size2of4 u-lg-size6of10">
<h2 class="Footer-title">Get in touch</h2>
<ul>
<li class="Footer-socialLink">
<a class="Footer-socialLinkInner" href="mailto:[email protected]">
Email
</a>
</li>
<li class="Footer-socialLink">
<a class="Footer-socialLinkInner" target="_blank" href="http://www.twitter.com/iheartyunojuno">
Twitter
</a>
</li>
<li class="Footer-socialLink">
<a class="Footer-socialLinkInner" target="_blank" href="https://www.linkedin.com/company/2667237">
LinkedIn
</a>
</li>
<li class="Footer-socialLink">
<a class="Footer-socialLinkInner" target="_blank" href="https://plus.google.com/100762290578701547526" rel="publisher">
Google+
</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</div>
</div>
<script src="./dist/core.browserify.js"></script>
</body>
</html>