From 80f6ed6b1979ebb07e044d89ad2bd59db34db38c Mon Sep 17 00:00:00 2001 From: Saman Ehsan Date: Tue, 21 Jan 2025 14:54:32 -0500 Subject: [PATCH 1/3] Remove articleUrl and feedback emails --- src/libs/feature-previews-config.ts | 40 +++-------------------------- src/pages/FeaturePreviews.js | 8 +++--- src/pages/FeaturePreviews.test.ts | 20 +++------------ 3 files changed, 10 insertions(+), 58 deletions(-) diff --git a/src/libs/feature-previews-config.ts b/src/libs/feature-previews-config.ts index bddea93765..2d60abd1ca 100644 --- a/src/libs/feature-previews-config.ts +++ b/src/libs/feature-previews-config.ts @@ -51,11 +51,6 @@ export type FeaturePreview = { * Optional date string for the last updated date. Shown on the feature previews page. */ readonly lastUpdated?: string; - - /** - * Optional URL for an article about the feature. Shown on the feature previews page. - */ - readonly articleUrl?: string; }; const featurePreviewsConfig: readonly FeaturePreview[] = [ @@ -64,7 +59,6 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'JupyterLab on GCP', description: 'Enabling this feature will allow you to launch notebooks using JupyterLab in GCP workspaces.', groups: ['preview-jupyterlab-gcp'], - feedbackUrl: `mailto:dsp-sue@broadinstitute.org?subject=${encodeURIComponent('Feedback on JupyterLab (GCP)')}`, lastUpdated: '12/22/2022', }, { @@ -72,7 +66,6 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Hail Batch App on Azure', description: 'Enabling this feature will allow you to launch the Hail Batch app in Azure workspaces.', groups: ['preview-hail-batch-azure'], - feedbackUrl: `mailto:dsp-sue@broadinstitute.org?subject=${encodeURIComponent('Feedback on Hail Batch (Azure)')}`, lastUpdated: '5/22/2023', }, { @@ -80,9 +73,6 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Azure PFB Import', description: 'Enabling this feature will allow PFB import into Azure workspaces.', groups: ['preview-azure-pfb-import'], - feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Azure PFB Import' - )}`, lastUpdated: '11/15/2023', }, { @@ -90,9 +80,6 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Azure TDR Import', description: 'Enabling this feature will allow importing TDR snapshots into Azure workspaces.', groups: ['preview-azure-tdr-import'], - feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Azure TDR snapshot Import' - )}`, lastUpdated: '12/1/2023', }, { @@ -100,11 +87,8 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Terra Workflow Repository Improvements', description: 'Enabling this feature will allow creating and editing workflows with the built-in Terra Workflow Repository UI. This replaces the external Broad Methods Repository. Changes made in Terra are reflected in the external Broad Methods Repository, and vice-versa.', - feedbackUrl: `mailto:dsp-analysis@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Terra Workflow Repository Improvements' - )}`, lastUpdated: '1/7/2025', - articleUrl: 'https://support.terra.bio/hc/en-us/articles/31191238873243', + feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31191238873243', }, { id: COHORT_BUILDER_CARD, @@ -112,9 +96,6 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ description: 'Enabling this feature will show the card for the demo cohort builder in the Datasets tab in the Library.', groups: ['CohortBuilderUsers'], - feedbackUrl: `mailto:dsp-data-exploration@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Cohort Builder Card' - )}`, lastUpdated: '7/25/2024', }, { @@ -122,22 +103,16 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Improved Spend Reports', description: 'Enabling this feature will show billing project owners costs associated with all workspaces in billing projects with spend reporting enabled. Additional updates to spend reports coming soon!', - feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Improved Spend Reports' - )}`, + feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31182586327323', lastUpdated: '01/17/2025', - articleUrl: 'https://support.terra.bio/hc/en-us/articles/31182586327323', }, { id: AUTO_GENERATE_DATA_TABLES, title: 'Autogenerate data table for single and paired end sequencing', description: 'Enabling this feature will show a new option in the data uploader to autogenerate a data table instead of uploading your own TSV. This feature will attempt to automatch known file patterns for single and paired end sequencing and autogenerate a data table linking to those files.', - feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Autogenerate data table for single and paired end sequencing' - )}`, + feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31258673632923', lastUpdated: '11/26/2024', - articleUrl: 'https://support.terra.bio/hc/en-us/articles/31258673632923', }, { id: PREVIEW_COST_CAPPING, @@ -145,20 +120,14 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ description: 'Enabling this feature will show a new workflow configuration option to add a user-configurable cost cap to the workflow. Workflows will be terminated once they exceed the configured value.', groups: ['preview-cost-capping'], - feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on Workflow Cost Capping' - )}`, + feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31269696049307', lastUpdated: '12/6/2024', - articleUrl: 'https://support.terra.bio/hc/en-us/articles/31269696049307', }, { id: IGV_ENHANCEMENTS, title: 'Enhancements to IGV genome browser integration', description: 'Enabling this feature will show improvements that make IGV easier to find and use with data in a workspace.', - feedbackUrl: `mailto:dsp-analysis@broadinstitute.org?subject=${encodeURIComponent( - 'Feedback on enhancements to IGV genome browser integration' - )}`, lastUpdated: '12/12/2024', }, { @@ -167,7 +136,6 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ description: 'Enabling this feature allows workflows to be processed by the GCP Batch service, rather than the former Cloud Life Sciences API. All Terra workflows will be transitioned to GCP Batch by mid-2025.', groups: ['preview-batch'], - feedbackUrl: `mailto:dsp-analysis@broadinstitute.org?subject=${encodeURIComponent('Feedback on GCP Batch')}`, lastUpdated: '12/12/2024', }, ]; diff --git a/src/pages/FeaturePreviews.js b/src/pages/FeaturePreviews.js index 08b3627ce2..d39dd2a873 100644 --- a/src/pages/FeaturePreviews.js +++ b/src/pages/FeaturePreviews.js @@ -94,7 +94,7 @@ export const FeaturePreviews = () => { field: 'description', headerRenderer: () => span({ style: { fontWeight: 'bold' } }, ['Description']), cellRenderer: ({ rowIndex }) => { - const { title, description, documentationUrl, feedbackUrl, groups, articleUrl } = featurePreviews[rowIndex]; + const { title, description, documentationUrl, feedbackUrl, groups } = featurePreviews[rowIndex]; const isPrivate = !_.isEmpty(groups); const privateText = 'This feature is in Private Preview and is only visible to you.'; const privateIcon = Icon({ @@ -111,13 +111,11 @@ export const FeaturePreviews = () => { return div([ p({ style: { fontWeight: 600, margin: '0.5rem 0 0.5rem' } }, [isPrivate && privateIcon, title]), p({ style: { margin: '0.5rem 0' } }, [description]), - !!(documentationUrl || feedbackUrl || articleUrl) && + !!(documentationUrl || feedbackUrl) && p({ style: { margin: '0.5rem 0' } }, [ documentationUrl && h(Link, { ...Utils.newTabLinkProps, href: documentationUrl }, ['Documentation']), !!(documentationUrl && feedbackUrl) && ' | ', - articleUrl - ? h(Link, { ...Utils.newTabLinkProps, href: articleUrl }, ['Learn more and provide feedback']) - : feedbackUrl && h(Link, { ...Utils.newTabLinkProps, href: feedbackUrl }, ['Submit feedback']), + feedbackUrl && h(Link, { ...Utils.newTabLinkProps, href: feedbackUrl }, ['Learn more and provide feedback']), ]), ]); }, diff --git a/src/pages/FeaturePreviews.test.ts b/src/pages/FeaturePreviews.test.ts index 8a108e25df..8d978faf1c 100644 --- a/src/pages/FeaturePreviews.test.ts +++ b/src/pages/FeaturePreviews.test.ts @@ -15,7 +15,6 @@ describe('FeaturePreviews', () => { id: 'feature1', title: 'Feature #1', description: 'A new feature', - articleUrl: 'https://example.com/article', documentationUrl: 'https://example.com/feature-1-docs', lastUpdated: '2024-11-01', }, @@ -24,7 +23,7 @@ describe('FeaturePreviews', () => { id: 'feature2', title: 'Feature #2', description: 'Another new feature', - feedbackUrl: 'mailto:feature2-feedback@example.com', + feedbackUrl: 'https://example.com/article', lastUpdated: '2024-11-02', }, ], @@ -92,22 +91,9 @@ describe('FeaturePreviews', () => { it('should render feedback link if provided', () => { const { getAllByText } = render(h(FeaturePreviews)); - const feedbackLinks = getAllByText('Submit feedback'); + const feedbackLinks = getAllByText('Learn more and provide feedback'); expect(feedbackLinks.length).toBe(1); - expect(feedbackLinks[0].getAttribute('href')).toBe('mailto:feature2-feedback@example.com'); - }); - - it('displays the correct link based on articleUrl', async () => { - const { getByRole } = render(h(FeaturePreviews)); - - const link1 = getByRole('link', { name: 'Learn more and provide feedback' }); - expect(link1).toHaveAttribute('href', 'https://example.com/article'); - - const link2 = getByRole('link', { name: 'Documentation' }); - expect(link2).toHaveAttribute('href', 'https://example.com/feature-1-docs'); - - const link3 = getByRole('link', { name: 'Submit feedback' }); - expect(link3).toHaveAttribute('href', 'mailto:feature2-feedback@example.com'); + expect(feedbackLinks[0].getAttribute('href')).toBe('https://example.com/article'); }); it('should render "Go to Workspaces List" link', () => { From 173d5492d003f3822e40fea6a5ef97287800202c Mon Sep 17 00:00:00 2001 From: Saman Ehsan Date: Mon, 27 Jan 2025 12:55:45 -0500 Subject: [PATCH 2/3] Add feedback emails back in --- src/libs/feature-previews-config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/libs/feature-previews-config.ts b/src/libs/feature-previews-config.ts index 13740d76a0..5ecb727571 100644 --- a/src/libs/feature-previews-config.ts +++ b/src/libs/feature-previews-config.ts @@ -58,6 +58,7 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'JupyterLab on GCP', description: 'Enabling this feature will allow you to launch notebooks using JupyterLab in GCP workspaces.', groups: ['preview-jupyterlab-gcp'], + feedbackUrl: `mailto:dsp-sue@broadinstitute.org?subject=${encodeURIComponent('Feedback on JupyterLab (GCP)')}`, lastUpdated: '12/22/2022', }, { @@ -65,6 +66,7 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Hail Batch App on Azure', description: 'Enabling this feature will allow you to launch the Hail Batch app in Azure workspaces.', groups: ['preview-hail-batch-azure'], + feedbackUrl: `mailto:dsp-sue@broadinstitute.org?subject=${encodeURIComponent('Feedback on Hail Batch (Azure)')}`, lastUpdated: '5/22/2023', }, { @@ -72,6 +74,9 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Azure PFB Import', description: 'Enabling this feature will allow PFB import into Azure workspaces.', groups: ['preview-azure-pfb-import'], + feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( + 'Feedback on Azure PFB Import' + )}`, lastUpdated: '11/15/2023', }, { @@ -79,6 +84,9 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Azure TDR Import', description: 'Enabling this feature will allow importing TDR snapshots into Azure workspaces.', groups: ['preview-azure-tdr-import'], + feedbackUrl: `mailto:dsp-core-services@broadinstitute.org?subject=${encodeURIComponent( + 'Feedback on Azure TDR snapshot Import' + )}`, lastUpdated: '12/1/2023', }, { @@ -86,8 +94,8 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ title: 'Terra Workflow Repository Improvements', description: 'Enabling this feature will allow creating and editing workflows with the built-in Terra Workflow Repository UI. This replaces the external Broad Methods Repository. Changes made in Terra are reflected in the external Broad Methods Repository, and vice-versa.', - lastUpdated: '1/7/2025', feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31191238873243', + lastUpdated: '1/7/2025', }, { id: COHORT_BUILDER_CARD, @@ -95,6 +103,9 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ description: 'Enabling this feature will show the card for the demo cohort builder in the Datasets tab in the Library.', groups: ['CohortBuilderUsers'], + feedbackUrl: `mailto:dsp-data-exploration@broadinstitute.org?subject=${encodeURIComponent( + 'Feedback on Cohort Builder Card' + )}`, lastUpdated: '7/25/2024', }, { @@ -128,6 +139,7 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ description: 'Enabling this feature allows workflows to be processed by the GCP Batch service, rather than the former Cloud Life Sciences API. All Terra workflows will be transitioned to GCP Batch by mid-2025.', groups: ['preview-batch'], + feedbackUrl: `mailto:dsp-analysis@broadinstitute.org?subject=${encodeURIComponent('Feedback on GCP Batch')}`, lastUpdated: '12/12/2024', }, ]; From a3c633d568609db1b6aeb1a1d8c1ee93b0195849 Mon Sep 17 00:00:00 2001 From: Saman Ehsan Date: Mon, 27 Jan 2025 15:00:46 -0500 Subject: [PATCH 3/3] Add mailto link back to test --- src/pages/FeaturePreviews.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/FeaturePreviews.test.ts b/src/pages/FeaturePreviews.test.ts index 8d978faf1c..062e3efea0 100644 --- a/src/pages/FeaturePreviews.test.ts +++ b/src/pages/FeaturePreviews.test.ts @@ -23,7 +23,7 @@ describe('FeaturePreviews', () => { id: 'feature2', title: 'Feature #2', description: 'Another new feature', - feedbackUrl: 'https://example.com/article', + feedbackUrl: 'mailto:feature2-feedback@example.com', lastUpdated: '2024-11-02', }, ], @@ -93,7 +93,7 @@ describe('FeaturePreviews', () => { const { getAllByText } = render(h(FeaturePreviews)); const feedbackLinks = getAllByText('Learn more and provide feedback'); expect(feedbackLinks.length).toBe(1); - expect(feedbackLinks[0].getAttribute('href')).toBe('https://example.com/article'); + expect(feedbackLinks[0].getAttribute('href')).toBe('mailto:feature2-feedback@example.com'); }); it('should render "Go to Workspaces List" link', () => {