Skip to content

Commit 46643db

Browse files
fix: open Send Feedback in the browser (#193)
* fix: open Send Feedback in the browser Help > Send Feedback now opens https://varve.studio/feedback instead of a mailto: link that does nothing when no mail client is installed. Desktop uses tauri-plugin-opener; the /try build opens a new tab. A failed open shows a toast with the URL and a Copy button. The new website page offers GitHub issues, Discussions, or email. Real mailbox links in About and Help stay on mailto, with a copy fallback on ContactLink. * fix: use a type token for feedback page headings The website token audit rejects new raw font-size declarations. * fix: type the feedback opener toast assertions tsc rejected the Record cast on EditorToastOptions. * test: add /feedback visual baselines Capture the new Send Feedback landing page the same way /press is reviewed, for both website builds. * fix: keep the feedback page easy and not demanding Rewrite /feedback for a first-time illustrator: three short choices, no GitHub jargon, and a note that a screenshot helps and everything else is optional. * test: open File Dedupe fixtures through DocumentCodec The second-tab case was a no-op: hand-rolled schemaVersion 1 JSON fails decode, so openFile never added a session. Encode a real document the same way the other session tests do. * test: refresh /feedback visual baselines Update the mobile snapshots after the plain-language rewrite. * fix: keep Send feedback in the footer without growing it The Support column was already the tallest. An eighth item there made every full-page website snapshot taller. Connect still has room, so the link stays discoverable without a site-wide baseline rewrite. * fix: keep Send feedback in nav, not the footer An extra footer row grows every stacked mobile snapshot. The Support menu and sitemap already expose the page. * test: refresh /feedback snapshots after footer revert * fix: review must-fixes for Send Feedback opener and page Keep noopener window.open from toasting on a null return, allowlist only the feedback page and contact mailto URLs, make email the main bug path on /feedback, and replace the Support nav "reproducible" wording. * revert: drop unrelated openFileDedupe fixture from this PR The DocumentCodec rewrite belongs in its own change. This restores the master fixture so Send Feedback stays scoped to the opener and /feedback page. * test: refresh /feedback email-first mobile baselines Prefer-email and Something-broke both render the feedback mailbox, so the chooser spec counts both links. Mobile snapshots follow the new email-first copy. * fix: drop the duplicate feedback email card The GitHub follow-up now keeps a space after the question mark, and /feedback has one mailbox card plus the forum card. * test: refresh /feedback baselines for the two-card page * fix: keep Support menus above the consent banner Send feedback now says "Share an idea or a note" so it is not the same as Report an issue. The header stacks above the consent banner so Contact stays clickable, and a toast test renders the Copy action. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 30494d7 commit 46643db

26 files changed

Lines changed: 581 additions & 89 deletions

‎apps/website/public/llms.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@
4444
- License: https://varve.studio/about/license
4545
- Source: https://github.com/varvedesign/varve
4646
- Contact: https://varve.studio/contact
47+
- Feedback: https://varve.studio/feedback

‎apps/website/src/components/SiteHeader.astro‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,9 @@ function linkClass(href: string): string[] {
339339
.site-header {
340340
position: sticky;
341341
inset-block-start: 0;
342-
z-index: 100;
342+
/* Above the consent banner (z-index 1000) so an open Support or Learn
343+
menu stays clickable. Below the skip link (9999). */
344+
z-index: 1100;
343345
background: var(--surface-header);
344346
border-block-end: 1px solid var(--border-default);
345347
box-shadow: 0 1px 0 transparent;

‎apps/website/src/data/siteNavigation.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ export const navigationGroups = [
4949
{
5050
href: '/support/report-issue',
5151
label: 'Report an issue',
52-
description: 'Share a reproducible problem',
52+
description: 'Tell us what went wrong',
5353
},
54+
{ href: '/feedback', label: 'Send feedback', description: 'Share an idea or a note' },
5455
{ href: '/contact', label: 'Contact', description: 'Talk with the Varve team' },
5556
],
5657
},
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
/**
3+
* /feedback — the in-app "Send feedback" landing page.
4+
*
5+
* The desktop and /try builds open this URL in a browser instead of a
6+
* mailto: link. Email is the main path so people without a GitHub account
7+
* still have a way to write. Varve never attaches diagnostics or files here.
8+
*/
9+
import Button from '../components/Button.astro';
10+
import ContactChannel from '../components/ContactChannel.astro';
11+
import Layout from '../layouts/Layout.astro';
12+
import { CONTACTS, VARVE_URLS } from '@varve/shared';
13+
import { siteUrl } from '../lib/siteUrl';
14+
15+
const feedbackUrl = siteUrl('/feedback');
16+
17+
const feedbackSchema = {
18+
'@context': 'https://schema.org',
19+
'@type': 'WebPage',
20+
'@id': `${feedbackUrl}#webpage`,
21+
url: feedbackUrl,
22+
name: 'Send feedback to Varve',
23+
description:
24+
'Email Varve what happened, share an idea, or write to feedback@varve.studio. The app sends nothing automatically. You choose what to share.',
25+
inLanguage: 'en',
26+
mainEntity: {
27+
'@type': 'Organization',
28+
name: 'Varve',
29+
url: siteUrl('/'),
30+
email: CONTACTS.feedback,
31+
},
32+
};
33+
---
34+
35+
<Layout
36+
title="Send feedback"
37+
description="Email Varve what happened, share an idea, or write to feedback@varve.studio. The app sends nothing automatically. You choose what to share."
38+
structuredData={feedbackSchema}
39+
>
40+
<div class="container-custom">
41+
<div class="feedback-page">
42+
<h1 class="page-hero-title">Send feedback</h1>
43+
<p class="page-hero-sub">
44+
The app sends nothing automatically. You choose what to share.
45+
</p>
46+
<p class="feedback-note">
47+
You only need to say what happened. A screenshot helps. Everything else
48+
is optional.
49+
</p>
50+
51+
<ol class="feedback-choices">
52+
<li class="feedback-choice site-card site-card--surface">
53+
<h2>Something broke?</h2>
54+
<ContactChannel
55+
id="feedback"
56+
headingLevel={3}
57+
purpose="Email us what happened. A screenshot helps."
58+
/>
59+
<p class="feedback-secondary">
60+
Have a GitHub account?{' '}
61+
<a href={VARVE_URLS.newIssueChoose}>You can also post it there.</a>
62+
</p>
63+
</li>
64+
<li class="feedback-choice site-card site-card--surface">
65+
<h2>Have an idea or a question?</h2>
66+
<p>Write it in your own words.</p>
67+
<Button href={VARVE_URLS.discussions} variant="secondary">
68+
Post on the Varve forum (GitHub account needed)
69+
</Button>
70+
</li>
71+
</ol>
72+
</div>
73+
</div>
74+
</Layout>
75+
76+
<style>
77+
.feedback-page {
78+
max-width: 760px;
79+
margin: 0 auto;
80+
padding: 3rem 0 4rem;
81+
}
82+
83+
.feedback-page .page-hero-sub {
84+
margin-bottom: 0.75rem;
85+
}
86+
87+
.feedback-note {
88+
color: var(--text-secondary);
89+
line-height: 1.7;
90+
margin: 0 0 2.5rem;
91+
max-width: 56ch;
92+
}
93+
94+
.feedback-choices {
95+
list-style: none;
96+
margin: 0;
97+
padding: 0;
98+
display: grid;
99+
gap: 1.25rem;
100+
}
101+
102+
.feedback-choice {
103+
padding: 1.5rem;
104+
}
105+
106+
.feedback-choice h2 {
107+
font-size: var(--type-interface-title-size);
108+
font-weight: 700;
109+
color: var(--text-primary);
110+
margin-bottom: 0.5rem;
111+
}
112+
113+
.feedback-choice p {
114+
color: var(--text-secondary);
115+
line-height: 1.7;
116+
margin-bottom: 1rem;
117+
max-width: 56ch;
118+
}
119+
120+
.feedback-secondary {
121+
margin-top: 1rem;
122+
margin-bottom: 0;
123+
font-size: var(--type-interface-caption-size);
124+
}
125+
126+
.feedback-secondary a {
127+
color: var(--text-link);
128+
}
129+
130+
.feedback-secondary a:hover {
131+
color: var(--text-link-hover);
132+
}
133+
134+
.feedback-choice :global(.contact-channel) {
135+
padding-top: 0;
136+
padding-bottom: 0;
137+
border-top: none;
138+
}
139+
140+
.feedback-choice :global(.contact-channel-title) {
141+
position: absolute;
142+
width: 1px;
143+
height: 1px;
144+
overflow: hidden;
145+
clip-path: inset(50%);
146+
white-space: nowrap;
147+
}
148+
</style>

‎apps/website/tests/e2e/assets.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ test('known routes return 200 and unknown routes return the 404 page', async ({
9999
'/docs/touch-and-pen',
100100
'/support',
101101
'/support/troubleshooting',
102+
'/feedback',
102103
'/contribute',
103104
'/learn',
104105
'/about',

‎apps/website/tests/e2e/axe.spec.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const SCANS = [
2828
// disclosure route, so an a11y regression here blocks someone from
2929
// reporting a vulnerability or asking for help.
3030
{ route: '/contact', name: 'contact' },
31+
{ route: '/feedback', name: 'feedback' },
3132
{ route: '/support', name: 'support' },
3233
{ route: '/security', name: 'security' },
3334
{ route: '/press', name: 'press' },

‎apps/website/tests/e2e/contact.spec.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ test('mail links carry no body payload or personal data', async ({ page }) => {
6060
test('the contact page is reachable from the site header and footer', async ({ page }) => {
6161
await page.goto('/');
6262

63+
// The consent banner is a fixed overlay. Support > Contact is the last
64+
// desktop menu item and must stay clickable while the banner is showing.
65+
await page.locator('#website-analytics-consent').evaluate((el) => {
66+
el.removeAttribute('hidden');
67+
});
68+
6369
const mainNav = page.getByRole('navigation', { name: 'Main' });
6470
await mainNav.getByText('Support', { exact: true }).click();
6571
await page
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
/**
4+
* /feedback is the in-app Send Feedback landing page. These specs pin the
5+
* email and forum choices a visitor must be able to take, plus a mobile
6+
* visual baseline the same way /press is captured.
7+
*/
8+
9+
test('feedback page offers email and forum choices', async ({ page }) => {
10+
await page.goto('/feedback');
11+
12+
await expect(page.getByRole('heading', { level: 1, name: 'Send feedback' })).toBeVisible();
13+
await expect(page.getByText('The app sends nothing automatically.')).toBeVisible();
14+
await expect(page.getByText('You only need to say what happened.')).toBeVisible();
15+
await expect(page.getByText('A screenshot helps.').first()).toBeVisible();
16+
await expect(page.getByText('Everything else is optional.')).toBeVisible();
17+
18+
await expect(page.getByRole('heading', { level: 2, name: 'Something broke?' })).toBeVisible();
19+
await expect(page.getByText('Email us what happened. A screenshot helps.')).toBeVisible();
20+
const bugEmail = page.getByRole('link', { name: 'Email Varve product feedback' }).first();
21+
await expect(bugEmail).toBeVisible();
22+
await expect(bugEmail).toHaveText('feedback@varve.studio');
23+
await expect(bugEmail).toHaveAttribute('href', /^mailto:feedback@varve.studio/);
24+
await expect(page.getByText('Have a GitHub account? You can also post it there.')).toBeVisible();
25+
const github = page.getByRole('link', { name: 'You can also post it there.' });
26+
await expect(github).toBeVisible();
27+
await expect(github).toHaveAttribute(
28+
'href',
29+
'https://github.com/varvedesign/varve/issues/new/choose',
30+
);
31+
32+
await expect(
33+
page.getByRole('heading', { level: 2, name: 'Have an idea or a question?' }),
34+
).toBeVisible();
35+
const forum = page.getByRole('link', { name: 'Post on the Varve forum (GitHub account needed)' });
36+
await expect(forum).toBeVisible();
37+
await expect(forum).toHaveAttribute('href', 'https://github.com/varvedesign/varve/discussions');
38+
39+
await expect(page.getByRole('heading', { level: 2, name: 'Prefer email?' })).toHaveCount(0);
40+
41+
const emails = page.getByRole('link', { name: 'Email Varve product feedback' });
42+
await expect(emails).toHaveCount(1);
43+
});
44+
45+
test('feedback page keeps the chooser readable on a narrow viewport', async ({ page }) => {
46+
await page.setViewportSize({ width: 390, height: 844 });
47+
await page.emulateMedia({ colorScheme: 'light', reducedMotion: 'reduce' });
48+
await page.addInitScript(() => {
49+
window.localStorage.setItem('varve:website-analytics-consent', 'denied');
50+
window.localStorage.setItem('varve-theme', 'light');
51+
});
52+
53+
await page.goto('/feedback');
54+
await expect(page.getByRole('heading', { name: 'Send feedback' })).toBeVisible();
55+
await expect(page.getByText('You choose what to share.')).toBeVisible();
56+
await expect(page).toHaveScreenshot('feedback-page-mobile.png', {
57+
fullPage: true,
58+
maxDiffPixelRatio: 0.02,
59+
});
60+
});
141 KB
Loading
141 KB
Loading

0 commit comments

Comments
 (0)