+
{title}
@@ -119,10 +185,7 @@ function ContributionCard({
-
+
{secondaryAction ? {secondaryAction} : null}
@@ -150,6 +213,10 @@ function LinkFallbackBanner({ linkFallback }: { linkFallback: LinkFallback | nul
)
}
+function getCopyDiagnosticsLabel(copyState: 'idle' | 'copied' | 'failed') {
+ return copyState === 'copied' ? 'Diagnostics copied' : 'Copy sanitized diagnostics'
+}
+
function BugReportActions({
copyState,
canCopyDiagnostics,
@@ -168,12 +235,9 @@ function BugReportActions({
onClick={onCopyDiagnostics}
disabled={!canCopyDiagnostics}
>
- {copyState === 'copied' ? 'Diagnostics copied' : 'Copy diagnostics'}
+ {getCopyDiagnosticsLabel(copyState)}
{copyState === 'copied' ? : }
-
- Sanitized and optional. Paths and token-like strings are redacted by default.
-
{copyState === 'copied' ? (
Diagnostics copied.
) : null}
@@ -273,22 +337,36 @@ function ContributionGrid({
}) {
return (
- {CONTRIBUTION_PATHS.map((path, index) => (
- onOpenLink(path.label, path.url)}
- />
- ))}
+ {CONTRIBUTION_PATHS.map((path, index) => {
+ const secondaryLink = path.secondaryLink
+
+ return (
+ onOpenLink(path.label, path.url)}
+ secondaryAction={secondaryLink ? (
+ onOpenLink(secondaryLink.label, secondaryLink.url)}
+ />
+ ) : undefined}
+ />
+ )
+ })}
onOpenLink('GitHub Issues', TOLARIA_GITHUB_ISSUES_URL)}
secondaryAction={(
{ if (!next) handleClose() }}>
-
+
Contribute to Tolaria
- Pick the path that fits what you want to do. The links stay focused, the diagnostics are sanitized,
- and you can work through the whole flow with the keyboard.
+ Pick the path that fits what you want to do! Any type of help is appreciated
@@ -352,12 +429,6 @@ export function FeedbackDialog({
canCopyDiagnostics={canCopyDiagnostics}
onCopyDiagnostics={handleCopyDiagnostics}
/>
-
-
-
-
)
diff --git a/src/constants/feedback.ts b/src/constants/feedback.ts
index 20a68de7..ef667d3a 100644
--- a/src/constants/feedback.ts
+++ b/src/constants/feedback.ts
@@ -1,4 +1,5 @@
-export const TOLARIA_CANNY_URL = 'https://tolaria.canny.io/'
+export const TOLARIA_PRODUCT_BOARD_URL = 'https://tolaria.canny.io/'
export const TOLARIA_GITHUB_DISCUSSIONS_URL = 'https://github.com/refactoringhq/tolaria/discussions'
export const TOLARIA_GITHUB_CONTRIBUTING_URL = 'https://github.com/refactoringhq/tolaria/blob/main/CONTRIBUTING.md'
export const TOLARIA_GITHUB_ISSUES_URL = 'https://github.com/refactoringhq/tolaria/issues'
+export const TOLARIA_GITHUB_PULL_REQUESTS_URL = 'https://github.com/refactoringhq/tolaria/pulls'
diff --git a/tests/smoke/contribute-modal.spec.ts b/tests/smoke/contribute-modal.spec.ts
index 6683658e..70992a18 100644
--- a/tests/smoke/contribute-modal.spec.ts
+++ b/tests/smoke/contribute-modal.spec.ts
@@ -39,7 +39,7 @@ test.describe('Contribute modal', () => {
await expect(page.getByTestId('feedback-dialog')).toBeVisible()
await expect(page.getByRole('heading', { name: 'Contribute to Tolaria' })).toBeVisible()
- await expect(page.getByRole('button', { name: 'Open Canny' })).toBeFocused()
+ await expect(page.getByRole('button', { name: 'Open Product Board' })).toBeFocused()
await page.keyboard.press('Enter')
await expect.poll(async () => page.evaluate(() => (window as typeof window & { __tolariaOpenedUrls: string[] }).__tolariaOpenedUrls)).toContain('https://tolaria.canny.io/')
@@ -50,8 +50,13 @@ test.describe('Contribute modal', () => {
await expect.poll(async () => page.evaluate(() => (window as typeof window & { __tolariaOpenedUrls: string[] }).__tolariaOpenedUrls)).toContain('https://github.com/refactoringhq/tolaria/discussions')
await page.keyboard.press('Tab')
- await expect(page.getByRole('button', { name: 'Open Contributing Guide' })).toBeFocused()
+ await expect(page.getByRole('button', { name: 'Open Pull Requests' })).toBeFocused()
await page.keyboard.press('Enter')
+ await expect.poll(async () => page.evaluate(() => (window as typeof window & { __tolariaOpenedUrls: string[] }).__tolariaOpenedUrls)).toContain('https://github.com/refactoringhq/tolaria/pulls')
+
+ await page.keyboard.press('Tab')
+ await expect(page.getByRole('button', { name: 'Open Contributing Guide' })).toBeFocused()
+ await page.keyboard.press('Space')
await expect.poll(async () => page.evaluate(() => (window as typeof window & { __tolariaOpenedUrls: string[] }).__tolariaOpenedUrls)).toContain('https://github.com/refactoringhq/tolaria/blob/main/CONTRIBUTING.md')
await page.keyboard.press('Tab')
@@ -60,7 +65,7 @@ test.describe('Contribute modal', () => {
await expect.poll(async () => page.evaluate(() => (window as typeof window & { __tolariaOpenedUrls: string[] }).__tolariaOpenedUrls)).toContain('https://github.com/refactoringhq/tolaria/issues')
await page.keyboard.press('Tab')
- await expect(page.getByRole('button', { name: 'Copy diagnostics' })).toBeFocused()
+ await expect(page.getByRole('button', { name: 'Copy sanitized diagnostics' })).toBeFocused()
await page.keyboard.press('Space')
await expect.poll(async () => page.evaluate(() => (window as typeof window & { __tolariaCopiedBundles: string[] }).__tolariaCopiedBundles.length)).toBe(1)