From 471508caf4bcf1cc75523f2552422641d49cf972 Mon Sep 17 00:00:00 2001 From: Daniel Campbell Date: Tue, 12 Nov 2024 16:00:19 -0800 Subject: [PATCH 1/4] chore(ui): remove price increase announcement code --- .../ClickThroughAnnouncementHandler.tsx | 18 +--- .../ClickThroughAnnouncementOverlay.tsx | 13 --- .../PaygPriceIncreaseAnnouncement.tsx | 85 ------------------- 3 files changed, 1 insertion(+), 115 deletions(-) delete mode 100644 src/me/components/announcements/PaygPriceIncreaseAnnouncement.tsx diff --git a/src/homepageExperience/ClickThroughAnnouncementHandler.tsx b/src/homepageExperience/ClickThroughAnnouncementHandler.tsx index 95b252f248..550d41e3ac 100644 --- a/src/homepageExperience/ClickThroughAnnouncementHandler.tsx +++ b/src/homepageExperience/ClickThroughAnnouncementHandler.tsx @@ -1,11 +1,8 @@ // Libraries import {FC, useEffect} from 'react' -import {useSelector, useDispatch} from 'react-redux' +import {useDispatch} from 'react-redux' import {useLocalStorageState} from 'use-local-storage-state' -// Selectors -import {selectCurrentIdentity} from 'src/identity/selectors' - // Utils import {showOverlay, dismissOverlay} from 'src/overlays/actions/overlays' import {isFlagEnabled} from 'src/shared/utils/featureFlag' @@ -13,7 +10,6 @@ import {event} from 'src/cloud/utils/reporting' export enum AnnouncementID { MqttEol = 'mqttEolClickThroughAnnouncement', - PriceIncrease = 'pricingClickThroughAnnouncement', } enum AnnouncementState { @@ -23,7 +19,6 @@ enum AnnouncementState { export const ClickThroughAnnouncementHandler: FC = () => { const dispatch = useDispatch() - const {account} = useSelector(selectCurrentIdentity) const [announcementState, setAnnouncementState] = useLocalStorageState( 'clickThroughAnnouncement', @@ -69,23 +64,12 @@ export const ClickThroughAnnouncementHandler: FC = () => { // MQTT Audience: Cloud users with MQTT feature flag enabled const isMqttAudience = isFlagEnabled('subscriptionsUI') - // PAYG Pricing Increase Audience: Pay As You Go & Direct Signups - const isPaygAccount = account.type === 'pay_as_you_go' - const isDirectSignup = account.billingProvider === 'zuora' - const isPriceIncreaseAudience = isPaygAccount && isDirectSignup - // Sequentially display announcements in order of priority if ( isMqttAudience && announcementState[AnnouncementID.MqttEol] !== AnnouncementState.Dismissed ) { handleDisplayAnnouncement(AnnouncementID.MqttEol) - } else if ( - isPriceIncreaseAudience && - announcementState[AnnouncementID.PriceIncrease] !== - AnnouncementState.Dismissed - ) { - handleDisplayAnnouncement(AnnouncementID.PriceIncrease) } }, [announcementState]) diff --git a/src/me/components/ClickThroughAnnouncementOverlay.tsx b/src/me/components/ClickThroughAnnouncementOverlay.tsx index e564a28791..a0d80e5d0a 100644 --- a/src/me/components/ClickThroughAnnouncementOverlay.tsx +++ b/src/me/components/ClickThroughAnnouncementOverlay.tsx @@ -4,7 +4,6 @@ import {useSelector} from 'react-redux' // Components import {Overlay} from '@influxdata/clockface' -import {PaygPriceIncreaseAnnouncement} from 'src/me/components/announcements/PaygPriceIncreaseAnnouncement' import {MqttEolAnnouncement} from 'src/me/components/announcements/MqttEolAnnouncement' // Utils @@ -31,10 +30,6 @@ export const ClickThroughAnnouncementOverlay: FC< event(`${announcementID}.details.clicked`) } - const handleContactUsClick = () => { - event(`${announcementID}.contactUs.clicked`) - } - const handleAcknowledgeClick = () => { event(`${announcementID}.acknowledge.clicked`) onClose() @@ -42,14 +37,6 @@ export const ClickThroughAnnouncementOverlay: FC< const announcementContents = (): JSX.Element => { switch (announcementID) { - case AnnouncementID.PriceIncrease: - return ( - - ) case AnnouncementID.MqttEol: return ( void - handleContactUsClick: () => void - handleAcknowledgeClick: () => void -} - -export const PaygPriceIncreaseAnnouncement: FC< - PaygPriceIncreaseAnnouncementProps -> = ({handleDetailsClick, handleContactUsClick, handleAcknowledgeClick}) => { - const org = useSelector(selectCurrentOrg) - const user = useSelector(selectUser) - - const encodedSubject = encodeURI('PAYG Pricing Increase') - const encodedBody = encodeURI(`User ID: ${user.email} -Org ID: ${org.id} - -Please describe your inquiry here.`) - - return ( - <> - - -

- Starting on December 1, 2023 there will be an - increase in to your usage-based pricing. -

-

- Your monthly charges will continue to be based on your actual - consumption of the four billable usage vectors: Data In, Query Count, - Storage and Data Out. This is unchanged. However, unit pricing for two - of these vectors will be increased beginning{' '} - December 1, 2023: -

-
    -
  • Data In will increase from $0.002 to $0.0025 per MB ingested
  • -
  • - Query Count will increase from $0.01 to $0.012 per 100 executed -
  • -
-

- This increase to your total monthly charges will depend on the - specific distribution of your workload across the billable vectors. - Most customers will experience an increase between 14% - 24%. -

-

- Please feel free to{' '} - - contact us - {' '} - with questions or refer to our website for{' '} - - additional information - - . -

-
- -