Skip to content

Commit ff4c679

Browse files
fuzzie360claude
andcommitted
feat: invite course feedback via the pinned GitHub issue
Adds a Feedback link to the learn nav (visible on the landing page and every task) and an invitation card at the end of the learn home, both pointing to the pinned feedback issue #31. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RJujXBsBhXBbQ72tS7E7GV
1 parent d8a8e7f commit ff4c679

5 files changed

Lines changed: 96 additions & 0 deletions

File tree

‎src/Learn/components/LearnNav.jsx‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { Link } from 'react-router';
33
import { useTheme } from '../ThemeContext';
4+
import { FEEDBACK_URL } from '../feedback';
45

56
function capitalize(word) {
67
return word.charAt(0).toUpperCase() + word.slice(1);
@@ -39,6 +40,14 @@ function LearnNav() {
3940
<a href="/api/">API</a>
4041
<Link to="/examples">Examples</Link>
4142
<a href="https://github.com/gpujs/gpu.js">GitHub</a>
43+
<a
44+
className="feedback"
45+
href={FEEDBACK_URL}
46+
target="_blank"
47+
rel="noopener noreferrer"
48+
>
49+
<span aria-hidden="true">💬 </span>Feedback
50+
</a>
4251
</div>
4352
<button type="button" className="theme-btn" onClick={cycleTheme}>
4453
Theme: {capitalize(pref)}

‎src/Learn/feedback.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// The pinned course-feedback issue — linked from LearnNav and the learn home.
2+
export const FEEDBACK_URL = 'https://github.com/gpujs/gpu.rocks/issues/31';

‎src/Learn/home/LearnHome.jsx‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import LearnNav from '../components/LearnNav';
44
import KernelGrid from '../components/KernelGrid';
55
import TaskDots from '../components/TaskDots';
66
import { tracks } from '../content/index.js';
7+
import { FEEDBACK_URL } from '../feedback';
78
import { moduleProgress } from '../engine/storage.js';
89
import { learnHomeMeta } from '../../routeMeta';
910
import { setPageMeta } from '../../pageMeta';
@@ -159,6 +160,24 @@ function LearnHome() {
159160
))}
160161
</section>
161162

163+
<div className="feedback-card">
164+
<div className="txt">
165+
<b>Help shape this course</b>
166+
<p>
167+
Stuck on a task? Found a bug? Want a module that doesn't exist yet? Every task was
168+
tested, but real learners find what tests can't.
169+
</p>
170+
</div>
171+
<a
172+
className="btn-feedback"
173+
href={FEEDBACK_URL}
174+
target="_blank"
175+
rel="noopener noreferrer"
176+
>
177+
<span aria-hidden="true">💬 </span>Leave feedback on GitHub →
178+
</a>
179+
</div>
180+
162181
<footer className="pagefoot">
163182
GPU.js is MIT licensed · learn.gpu.rocks runs entirely in your browser — nothing to
164183
install, nothing uploaded.

‎src/Learn/scss/_home.scss‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,68 @@
214214
}
215215

216216
/* ============ page footer ============ */
217+
/* ---- feedback invitation (links to the pinned GitHub issue) ---- */
218+
.feedback-card {
219+
max-width: 1120px;
220+
margin: 0 auto 2.5rem;
221+
padding: 1.1rem 1.3rem;
222+
border: 1px solid var(--line);
223+
border-left: 3px solid var(--pink);
224+
border-radius: 10px;
225+
background: var(--surface);
226+
display: flex;
227+
align-items: center;
228+
gap: 1.2rem;
229+
flex-wrap: wrap;
230+
}
231+
232+
.feedback-card .txt {
233+
flex: 1;
234+
min-width: 240px;
235+
}
236+
237+
.feedback-card b {
238+
display: block;
239+
font-family: 'Montserrat', 'Avenir Next', 'Futura', 'Segoe UI', sans-serif;
240+
text-transform: uppercase;
241+
font-size: .8rem;
242+
letter-spacing: .1em;
243+
}
244+
245+
.feedback-card p {
246+
margin: .25rem 0 0;
247+
font-size: .85rem;
248+
color: var(--muted);
249+
}
250+
251+
.btn-feedback {
252+
display: inline-flex;
253+
align-items: center;
254+
gap: .5rem;
255+
background: transparent;
256+
color: var(--blue);
257+
border: 1px solid var(--blue);
258+
border-radius: 8px;
259+
padding: .55rem 1.1rem;
260+
font-weight: 700;
261+
font-size: .85rem;
262+
text-decoration: none;
263+
white-space: nowrap;
264+
}
265+
266+
.btn-feedback:hover,
267+
.btn-feedback:focus-visible {
268+
background: var(--blue);
269+
color: #fff;
270+
}
271+
272+
@media (max-width: 1160px) {
273+
.feedback-card {
274+
margin-left: 1.5rem;
275+
margin-right: 1.5rem;
276+
}
277+
}
278+
217279
.pagefoot {
218280
border-top: 1px solid var(--line);
219281
padding: 2rem 1.5rem 6rem;

‎src/Learn/scss/learn.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@
234234
padding-bottom: .2rem;
235235
}
236236

237+
.nav .links a.feedback {
238+
color: var(--blue);
239+
}
240+
237241
.theme-btn {
238242
margin-left: 1rem;
239243
background: var(--surface-2);

0 commit comments

Comments
 (0)