From d3d11e413c41b1aa69b0e35d777881a7aa0767ff Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 5 Dec 2024 13:43:53 +0100 Subject: [PATCH 1/2] Include email address in support buttons --- app/components/support/crate-report-form.hbs | 2 +- app/components/support/crate-report-form.module.css | 6 ++++++ app/styles/support.module.css | 5 +++++ app/templates/support.hbs | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/components/support/crate-report-form.hbs b/app/components/support/crate-report-form.hbs index 499579d5762..363595e333d 100644 --- a/app/components/support/crate-report-form.hbs +++ b/app/components/support/crate-report-form.hbs @@ -83,7 +83,7 @@ local-class="report-button" data-test-id="report-button" > - Report + Report to help@crates.io \ No newline at end of file diff --git a/app/components/support/crate-report-form.module.css b/app/components/support/crate-report-form.module.css index 033d36ef7ca..f8abff1fb6f 100644 --- a/app/components/support/crate-report-form.module.css +++ b/app/components/support/crate-report-form.module.css @@ -67,6 +67,12 @@ composes: button; composes: button small from '../../styles/shared/buttons.module.css'; border-radius: var(--space-3xs); + font-weight: normal; + + strong { + margin-left: var(--space-3xs); + font-weight: 500; + } } .cancel-button { diff --git a/app/styles/support.module.css b/app/styles/support.module.css index 36c459242ec..7edb7eb3b09 100644 --- a/app/styles/support.module.css +++ b/app/styles/support.module.css @@ -12,4 +12,9 @@ padding: var(--space-xs) var(--space-s); height: inherit; min-height: var(--space-2xl); + + strong { + margin-left: var(--space-3xs); + font-weight: 500; + } } diff --git a/app/templates/support.hbs b/app/templates/support.hbs index 231315f5597..98773d4f658 100644 --- a/app/templates/support.hbs +++ b/app/templates/support.hbs @@ -29,7 +29,8 @@ data-test-id="link-email-support" local-class="link" > - For all other cases + For all other cases: + help@crates.io From de7f217c544b2e2dd18d054e04075eff62553c6e Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 5 Dec 2024 13:41:29 +0100 Subject: [PATCH 2/2] support/crate-report-form: Remove unused styles --- app/components/support/crate-report-form.module.css | 6 ------ app/templates/support.hbs | 3 +-- e2e/acceptance/support.spec.ts | 6 +++--- tests/acceptance/support-test.js | 6 +++--- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/app/components/support/crate-report-form.module.css b/app/components/support/crate-report-form.module.css index f8abff1fb6f..118c2406759 100644 --- a/app/components/support/crate-report-form.module.css +++ b/app/components/support/crate-report-form.module.css @@ -74,9 +74,3 @@ font-weight: 500; } } - -.cancel-button { - composes: button; - composes: tan-button small from '../../styles/shared/buttons.module.css'; - border-radius: var(--space-3xs); -} diff --git a/app/templates/support.hbs b/app/templates/support.hbs index 98773d4f658..38876a901c2 100644 --- a/app/templates/support.hbs +++ b/app/templates/support.hbs @@ -29,8 +29,7 @@ data-test-id="link-email-support" local-class="link" > - For all other cases: - help@crates.io + For all other cases: help@crates.io diff --git a/e2e/acceptance/support.spec.ts b/e2e/acceptance/support.spec.ts index 2259f75b572..fcbcec746c3 100644 --- a/e2e/acceptance/support.spec.ts +++ b/e2e/acceptance/support.spec.ts @@ -10,7 +10,7 @@ test.describe('Acceptance | support page', { tag: '@acceptance' }, () => { const inquireList = page.getByTestId('inquire-list'); await expect(inquireList).toBeVisible(); await expect(inquireList.locator(page.getByRole('listitem'))).toHaveText( - ['Report a crate that violates policies'].concat(['For all other cases']), + ['Report a crate that violates policies'].concat(['For all other cases: help@crates.io']), ); await percy.snapshot(); @@ -26,7 +26,7 @@ test.describe('Acceptance | support page', { tag: '@acceptance' }, () => { const inquireList = page.getByTestId('inquire-list'); await expect(inquireList).toBeVisible(); await expect(inquireList.locator(page.getByRole('listitem'))).toHaveText( - ['Report a crate that violates policies'].concat(['For all other cases']), + ['Report a crate that violates policies'].concat(['For all other cases: help@crates.io']), ); }); @@ -57,7 +57,7 @@ test.describe('Acceptance | support page', { tag: '@acceptance' }, () => { await expect(page.getByTestId('fieldset-crate')).toBeVisible(); await expect(page.getByTestId('fieldset-reasons')).toBeVisible(); await expect(page.getByTestId('fieldset-detail')).toBeVisible(); - await expect(page.getByTestId('report-button')).toHaveText('Report'); + await expect(page.getByTestId('report-button')).toHaveText('Report to help@crates.io'); await percy.snapshot(); await a11y.audit(); diff --git a/tests/acceptance/support-test.js b/tests/acceptance/support-test.js index 54802d91cd5..9b8c9491765 100644 --- a/tests/acceptance/support-test.js +++ b/tests/acceptance/support-test.js @@ -24,7 +24,7 @@ module('Acceptance | support', function (hooks) { const listitem = findAll('[data-test-id="inquire-list"] li'); assert.deepEqual( listitem.map(item => item.textContent.trim()), - ['Report a crate that violates policies'].concat(['For all other cases']), + ['Report a crate that violates policies'].concat(['For all other cases: help@crates.io']), ); await percySnapshot(assert); @@ -41,7 +41,7 @@ module('Acceptance | support', function (hooks) { const listitem = findAll('[data-test-id="inquire-list"] li'); assert.deepEqual( listitem.map(item => item.textContent.trim()), - ['Report a crate that violates policies'].concat(['For all other cases']), + ['Report a crate that violates policies'].concat(['For all other cases: help@crates.io']), ); }); @@ -71,7 +71,7 @@ module('Acceptance | support', function (hooks) { assert.dom('[data-test-id="fieldset-crate"]').exists(); assert.dom('[data-test-id="fieldset-reasons"]').exists(); assert.dom('[data-test-id="fieldset-detail"]').exists(); - assert.dom('[data-test-id="report-button"]').hasText('Report'); + assert.dom('[data-test-id="report-button"]').hasText('Report to help@crates.io'); await percySnapshot(assert); await a11yAudit(axeConfig);