From ad66002e7310effc57fb090e813777679106367c Mon Sep 17 00:00:00 2001 From: Cristina Aurrecoechea Date: Fri, 15 Nov 2024 15:19:36 -0500 Subject: [PATCH] ortho 7 banners for prod and beta --- .../src/components/Announcements.jsx | 92 ++++++++++++++----- 1 file changed, 69 insertions(+), 23 deletions(-) diff --git a/packages/libs/web-common/src/components/Announcements.jsx b/packages/libs/web-common/src/components/Announcements.jsx index f85f18de55..0d50518a1c 100644 --- a/packages/libs/web-common/src/components/Announcements.jsx +++ b/packages/libs/web-common/src/components/Announcements.jsx @@ -64,31 +64,71 @@ const siteAnnouncements = [ } }, }, - /* - { - id: 'live-beta', - renderDisplay: props => { - if ( isGenomicHomePage(props.projectId, props.location) ) { - if (props.projectId == 'VectorBase' || props.projectId == 'OrthoMCL') return ( -
- Welcome to {props.displayName} beta where you will find the newest versions of our interface, features, tools and data. - While we transition to making this beta site permanent, - legacy.{props.projectId.toLowerCase()}.org is still available. - Here is a form for sending your feedback on the beta sites. + + { + id: 'ortho-live', + renderDisplay: (props) => { + if (props.projectId == 'OrthoMCL' && props.buildNumber == '6.21') + return ( +
+ Visit the new{' '} + + OrthoMCL 7 beta + {' '} + with OrthoFinder clustering, Similar Groups, and Phylogenetic Trees! + + {' '} + Read more about the new features + + , and see a{' '} + + {' '} + full tutorial here + + .
- ) - else return ( -
- Welcome to {props.displayName} beta where you will find the newest versions of our interface, features, tools and data. - While we transition to making this beta site permanent, - legacy.{props.projectId.toLowerCase()}.org is still available (to be retired March 2nd). - Here is a form for sending your feedback on the beta sites. -
- ) - } - } + ); + }, + }, + + { + id: 'ortho-beta', + renderDisplay: (props) => { + if (props.projectId == 'OrthoMCL' && props.buildNumber == '7.0') + return ( +
+ Welcome to OrthoMCL 7 beta with OrthoFinder clustering, + Similar Groups, and Phylogenetic Trees! + + {' '} + Read more about the new features + + , and see a{' '} + + {' '} + full tutorial here + + . While we transition to making this beta site permanent,{' '} + + OrthoMCL 6_21 + {' '} + is still available. +
+ ); + }, }, -*/ /* { @@ -1269,6 +1309,12 @@ function param(name, { search = '' }) { function isGenomicSite(projectId) { return !/ClinEpiDB|MicrobiomeDB/i.test(projectId); } +function isQASite() { + return ( + param('qa', window.location) === 'true' || + /^(qa|q1|q2)/.test(window.location.hostname) + ); +} function isBetaSite() { return ( param('beta', window.location) === 'true' ||