diff --git a/packages/shared/src/components/Feed.tsx b/packages/shared/src/components/Feed.tsx index 00da33cb945..a8347bc1af6 100644 --- a/packages/shared/src/components/Feed.tsx +++ b/packages/shared/src/components/Feed.tsx @@ -106,7 +106,6 @@ export interface FeedProps isHorizontal?: boolean; feedContainerRef?: React.Ref; disableListFrame?: boolean; - disableBriefCard?: boolean; } interface RankVariables { @@ -210,7 +209,6 @@ export default function Feed({ isHorizontal = false, feedContainerRef, disableListFrame = false, - disableBriefCard = false, }: FeedProps): ReactElement { const origin = Origin.Feed; const { logEvent } = useLogContext(); @@ -258,8 +256,7 @@ export default function Feed({ hasNoBriefAction && !hasDismissedBriefCard && !showProfileCompletionCard && - !isProfileCompletionCardLoading && - !disableBriefCard; + !isProfileCompletionCardLoading; const { value: briefCardFeatureValue } = useConditionalFeature({ feature: briefCardFeedFeature, shouldEvaluate: shouldEvaluateBriefCard, diff --git a/packages/shared/src/components/MainFeedLayout.tsx b/packages/shared/src/components/MainFeedLayout.tsx index 7a6f0e02c2c..4ece9472027 100644 --- a/packages/shared/src/components/MainFeedLayout.tsx +++ b/packages/shared/src/components/MainFeedLayout.tsx @@ -183,8 +183,6 @@ export interface MainFeedLayoutProps navChildren?: ReactNode; isFinder?: boolean; onNavTabClick?: (tab: string) => void; - hideFeedActionButtons?: boolean; - disableBriefCard?: boolean; } const getQueryBasedOnLogin = ( @@ -224,8 +222,6 @@ export default function MainFeedLayout({ navChildren, isFinder, onNavTabClick, - hideFeedActionButtons, - disableBriefCard, }: MainFeedLayoutProps): ReactElement { useScrollRestoration(); const { sortingEnabled, loadedSettings } = useContext(SettingsContext); @@ -519,7 +515,7 @@ export default function MainFeedLayout({ feedName: SharedFeedPage.Custom, }, emptyScreen: propsByFeed[feedName]?.emptyScreen || , - actionButtons: feedWithActions && !hideFeedActionButtons && ( + actionButtons: feedWithActions && ( , - actionButtons: feedWithActions && !hideFeedActionButtons && ( + actionButtons: feedWithActions && ( { @@ -740,7 +735,6 @@ export default function MainFeedLayout({ import(/* webpackChunkName: "authDefault" */ './AuthDefault'), @@ -139,7 +137,6 @@ function AuthOptionsInner({ compact, autoTriggerProvider, socialProviderScopes, - acceptedMarketing, }: AuthOptionsProps): ReactElement { const { displayToast } = useToastNotification(); const { syncSettings } = useSettingsContext(); @@ -153,12 +150,6 @@ function AuthOptionsInner({ const router = useRouter(); const isOnboardingOrFunnel = !!router?.pathname?.startsWith('/onboarding') || isFunnel; - const { value: isOnboardingV2 } = useConditionalFeature({ - feature: featureOnboardingV2, - shouldEvaluate: trigger === AuthTriggers.Onboarding, - }); - const shouldAutoCompleteOnboarding = - trigger === AuthTriggers.Onboarding && isOnboardingV2; const [activeDisplay, setActiveDisplay] = useState(() => storage.getItem(SIGNIN_METHOD_KEY) && !forceDefaultDisplay ? AuthDisplay.SignBack @@ -355,8 +346,6 @@ function AuthOptionsInner({ } } else if (trigger === AuthTriggers.RecruiterSelfServe) { await autoCompleteProfile(user.email, user.name, false); - } else if (shouldAutoCompleteOnboarding) { - await autoCompleteProfile(user.email, user.name, acceptedMarketing); } else { onSetActiveDisplay(AuthDisplay.SocialRegistration); } @@ -465,16 +454,10 @@ function AuthOptionsInner({ return; } - if ( - trigger === AuthTriggers.RecruiterSelfServe || - shouldAutoCompleteOnboarding - ) { + if (trigger === AuthTriggers.RecruiterSelfServe) { setIsSocialAuthLoading(false); const loggedUser = boot.user as LoggedUser; - const marketing = shouldAutoCompleteOnboarding - ? acceptedMarketing - : false; - await autoCompleteProfile(loggedUser.email, loggedUser.name, marketing); + await autoCompleteProfile(loggedUser.email, loggedUser.name, false); return; } @@ -699,7 +682,6 @@ function AuthOptionsInner({ hints={hint} isLoading={isProfileUpdateLoading} onUpdateHints={onUpdateHint} - trigger={trigger} simplified={simplified} {...(user?.isPlus && { title: 'Complete your profile', diff --git a/packages/shared/src/components/auth/OnboardingRegistrationForm.tsx b/packages/shared/src/components/auth/OnboardingRegistrationForm.tsx index ce4b4d7ab9f..2a7cad999f8 100644 --- a/packages/shared/src/components/auth/OnboardingRegistrationForm.tsx +++ b/packages/shared/src/components/auth/OnboardingRegistrationForm.tsx @@ -5,7 +5,7 @@ import { providerMap } from './common'; import OrDivider from './OrDivider'; import { useLogContext } from '../../contexts/LogContext'; import type { AuthTriggersType } from '../../lib/auth'; -import { AuthEventNames, AuthTriggers } from '../../lib/auth'; +import { AuthEventNames } from '../../lib/auth'; import type { ButtonProps } from '../buttons/Button'; import { Button, ButtonSize, ButtonVariant } from '../buttons/Button'; import { isIOSNative } from '../../lib/func'; @@ -13,8 +13,6 @@ import { isIOSNative } from '../../lib/func'; import { MemberAlready } from '../onboarding/MemberAlready'; import SignupDisclaimer from './SignupDisclaimer'; import { FunnelTargetId } from '../../features/onboarding/types/funnelEvents'; -import { useConditionalFeature } from '../../hooks/useConditionalFeature'; -import { featureOnboardingV2 } from '../../lib/featureManagement'; interface ClassName { onboardingSignup?: string; @@ -112,10 +110,6 @@ export const OnboardingRegistrationForm = ({ compact, }: OnboardingRegistrationFormProps): ReactElement => { const { logEvent } = useLogContext(); - const { value: isOnboardingV2 } = useConditionalFeature({ - feature: featureOnboardingV2, - shouldEvaluate: trigger === AuthTriggers.Onboarding, - }); const trackOpenSignup = () => { logEvent({ @@ -169,9 +163,8 @@ export const OnboardingRegistrationForm = ({ onExistingEmail?.('')} className={{ - container: isOnboardingV2 - ? 'mx-auto mt-6 w-full justify-center border-t border-border-subtlest-tertiary pt-6 text-center text-text-secondary typo-callout' - : 'mx-auto mt-6 text-center text-text-secondary typo-callout', + container: + 'mx-auto mt-6 text-center text-text-secondary typo-callout', login: '!text-inherit', }} /> diff --git a/packages/shared/src/components/auth/RegistrationForm.tsx b/packages/shared/src/components/auth/RegistrationForm.tsx index 05d2200466a..b0375e32bbb 100644 --- a/packages/shared/src/components/auth/RegistrationForm.tsx +++ b/packages/shared/src/components/auth/RegistrationForm.tsx @@ -10,8 +10,6 @@ import type { RegistrationParameters, } from '../../lib/auth'; import { AuthEventNames, AuthTriggers } from '../../lib/auth'; -import { useConditionalFeature } from '../../hooks/useConditionalFeature'; -import { featureOnboardingV2 } from '../../lib/featureManagement'; import { formToJson } from '../../lib/form'; import { Button, ButtonVariant, ButtonSize } from '../buttons/Button'; import { PasswordField } from '../fields/PasswordField'; @@ -85,11 +83,7 @@ const RegistrationForm = ({ const [isSubmitted, setIsSubmitted] = useState(false); const [name, setName] = useState(''); const isRecruiterOnboarding = trigger === AuthTriggers.RecruiterSelfServe; - const { value: isOnboardingV2 } = useConditionalFeature({ - feature: featureOnboardingV2, - shouldEvaluate: trigger === AuthTriggers.Onboarding, - }); - const hideExperienceLevel = isRecruiterOnboarding || isOnboardingV2; + const hideExperienceLevel = isRecruiterOnboarding; const { username, setUsername, @@ -433,11 +427,9 @@ const RegistrationForm = ({ saveHintSpace /> )} - {!isOnboardingV2 && ( - - I don't want to receive updates and promotions via email - - )} + + I don't want to receive updates and promotions via email + ( diff --git a/packages/shared/src/components/auth/SocialRegistrationForm.tsx b/packages/shared/src/components/auth/SocialRegistrationForm.tsx index 041befb3f52..1d299fd8119 100644 --- a/packages/shared/src/components/auth/SocialRegistrationForm.tsx +++ b/packages/shared/src/components/auth/SocialRegistrationForm.tsx @@ -1,13 +1,8 @@ import classNames from 'classnames'; import type { MutableRefObject, ReactElement } from 'react'; import React, { useContext, useEffect, useState } from 'react'; -import type { - AuthTriggersType, - SocialRegistrationParameters, -} from '../../lib/auth'; -import { AuthEventNames, AuthTriggers } from '../../lib/auth'; -import { useConditionalFeature } from '../../hooks/useConditionalFeature'; -import { featureOnboardingV2 } from '../../lib/featureManagement'; +import type { SocialRegistrationParameters } from '../../lib/auth'; +import { AuthEventNames } from '../../lib/auth'; import { formToJson } from '../../lib/form'; import { Button, ButtonVariant } from '../buttons/Button'; import ImageInput from '../fields/ImageInput'; @@ -37,7 +32,6 @@ export interface SocialRegistrationFormProps extends AuthFormProps { provider?: string; formRef?: MutableRefObject; title?: string; - trigger: AuthTriggersType; hints?: ProfileFormHint; onUpdateHints?: (errors: ProfileFormHint) => void; onSignup?: (params: SocialRegistrationParameters) => void; @@ -59,15 +53,9 @@ export const SocialRegistrationForm = ({ onSignup, isLoading, simplified, - trigger, }: SocialRegistrationFormProps): ReactElement => { const { logEvent } = useLogContext(); const { user } = useContext(AuthContext); - const { value: isOnboardingV2 } = useConditionalFeature({ - feature: featureOnboardingV2, - shouldEvaluate: trigger === AuthTriggers.Onboarding, - }); - const hideExperienceLevel = isOnboardingV2; const [nameHint, setNameHint] = useState(null); const [usernameHint, setUsernameHint] = useState(null); const [experienceLevelHint, setExperienceLevelHint] = useState(null); @@ -126,7 +114,7 @@ export const SocialRegistrationForm = ({ return; } - if (!hideExperienceLevel && !values.experienceLevel?.length) { + if (!values.experienceLevel?.length) { logError('Experience level not provided'); setExperienceLevelHint('Please select your experience level'); return; @@ -237,20 +225,18 @@ export const SocialRegistrationForm = ({ } rightIcon={isLoadingUsername ? : null} /> - {!hideExperienceLevel && ( - { - if (experienceLevelHint) { - setExperienceLevelHint(null); - } - }} - valid={experienceLevelHint === null} - hint={experienceLevelHint} - saveHintSpace - /> - )} + { + if (experienceLevelHint) { + setExperienceLevelHint(null); + } + }} + valid={experienceLevelHint === null} + hint={experienceLevelHint} + saveHintSpace + /> I don’t want to receive updates and promotions via email diff --git a/packages/shared/src/components/auth/common.tsx b/packages/shared/src/components/auth/common.tsx index 61de4a738de..c29c527d399 100644 --- a/packages/shared/src/components/auth/common.tsx +++ b/packages/shared/src/components/auth/common.tsx @@ -128,5 +128,4 @@ export interface AuthOptionsProps { compact?: boolean; autoTriggerProvider?: string; socialProviderScopes?: string[]; - acceptedMarketing?: boolean; } diff --git a/packages/shared/src/components/onboarding/EditTag.tsx b/packages/shared/src/components/onboarding/EditTag.tsx index ed779eebb37..313089b398b 100644 --- a/packages/shared/src/components/onboarding/EditTag.tsx +++ b/packages/shared/src/components/onboarding/EditTag.tsx @@ -72,7 +72,7 @@ export const EditTag = ({ }, [isMobile, showPersonas]); // When the persona feature is on, override any caller-supplied headline - // (Freyja funnel JSON or OnboardingV2 modal) with the persona-tuned copy. + // (Freyja funnel JSON) with the persona-tuned copy. // TODO: drop this override once Freyja's persona-experiment variant ships // the new headline directly. const resolvedHeadline = showPersonas diff --git a/packages/shared/src/lib/featureManagement.ts b/packages/shared/src/lib/featureManagement.ts index 430d88188ca..403b59cad6e 100644 --- a/packages/shared/src/lib/featureManagement.ts +++ b/packages/shared/src/lib/featureManagement.ts @@ -170,8 +170,6 @@ export const sharedPostPreviewFeature = new Feature( false, ); -export const featureOnboardingV2 = new Feature('onboarding_v2', false); - export const featureOnboardingTagRecommender = new Feature( 'onboarding_tag_recommender', false, @@ -203,4 +201,4 @@ export const featureCompanionDemoWidget = new Feature( false, ); -export const featureFeedTagChips = new Feature('feed_tag_chips', false); +export const featureFeedTagChips = new Feature('feed_tag_chips', true); diff --git a/packages/shared/src/lib/log.ts b/packages/shared/src/lib/log.ts index 2630ca958fd..6aea0ad8fe2 100644 --- a/packages/shared/src/lib/log.ts +++ b/packages/shared/src/lib/log.ts @@ -84,8 +84,6 @@ export enum Origin { HotTakeList = 'hot take list', HotAndCold = 'hot and cold', Leaderboard = 'leaderboard', - // Onboarding v2 - OnboardingModal = 'onboarding modal', // Auth BetterAuthEmailLogin = 'betterauth email login', BetterAuthEmailLoginBoot = 'betterauth email login boot', @@ -559,16 +557,7 @@ export enum TargetType { BriefCard = 'brief card', HighlightsCard = 'highlights card', AdvertiseHereCta = 'advertise here cta', - // Onboarding v2 - SignupChooser = 'signup chooser', - SignupPrompt = 'signup prompt', - ProfileImport = 'profile import', - ExperienceLevel = 'experience level', ExtensionPromo = 'extension promo', - TagsFallback = 'tags fallback', - MarketingOptOut = 'marketing opt out', - OnboardingComplete = 'onboarding complete', - MobileAppDownload = 'mobile app download', CustomizeNewTab = 'customize new tab', } @@ -632,23 +621,9 @@ export enum TargetId { AskPage = 'ask page', AskUpsellSearch = 'ask upsell search', HackathonPage = 'hackathon page', - // Onboarding v2 - GitHub = 'github', - Google = 'google', - AI = 'ai', - Install = 'install', - Dismiss = 'dismiss', - InstallExtension = 'install extension', - MobileApp = 'mobile app', - EnableNotifications = 'enable notifications', - GoToFeed = 'go to feed', - OptOut = 'opt_out', - OptIn = 'opt_in', ReaderHeader = 'reader header', ReaderInstallPrompt = 'reader install prompt', ReaderPermissionPrompt = 'reader permission prompt', - IOS = 'ios', - Android = 'android', } export enum NotificationChannel { diff --git a/packages/webapp/components/onboarding/OnboardingChooserGrid.tsx b/packages/webapp/components/onboarding/OnboardingChooserGrid.tsx deleted file mode 100644 index c085f42e2e2..00000000000 --- a/packages/webapp/components/onboarding/OnboardingChooserGrid.tsx +++ /dev/null @@ -1,378 +0,0 @@ -import type { ReactElement } from 'react'; -import React from 'react'; -import classNames from 'classnames'; -import { GitHubIcon } from '@dailydotdev/shared/src/components/icons/GitHub'; -import { GoogleIcon } from '@dailydotdev/shared/src/components/icons/Google'; -import { MagicIcon } from '@dailydotdev/shared/src/components/icons/Magic'; -import { TerminalIcon } from '@dailydotdev/shared/src/components/icons/Terminal'; -import { NewTabIcon } from '@dailydotdev/shared/src/components/icons/NewTab'; -import { IconSize } from '@dailydotdev/shared/src/components/Icon'; -import { useLogContext } from '@dailydotdev/shared/src/contexts/LogContext'; -import { - LogEvent, - TargetType, - TargetId, -} from '@dailydotdev/shared/src/lib/log'; - -const PARTICLES = [ - { - px: '-6rem', - py: '-3.5rem', - dur: '3.0s', - delay: '0s', - color: 'bg-accent-cheese-default', - }, - { - px: '5.5rem', - py: '-4rem', - dur: '3.4s', - delay: '0.5s', - color: 'bg-accent-water-default', - }, - { - px: '-5rem', - py: '3.5rem', - dur: '3.2s', - delay: '1.0s', - color: 'bg-accent-cabbage-default', - }, - { - px: '6rem', - py: '3rem', - dur: '3.6s', - delay: '1.5s', - color: 'bg-accent-onion-default', - }, - { - px: '0.5rem', - py: '-5rem', - dur: '2.8s', - delay: '0.7s', - color: 'bg-accent-cheese-default', - }, - { - px: '-6.5rem', - py: '0.5rem', - dur: '3.1s', - delay: '1.2s', - color: 'bg-accent-water-default', - }, -]; - -const STEPS = [ - { text: 'We spot your stack from GitHub', icon: 'stack' }, - { text: 'AI matches your skills to topics', icon: 'ai' }, - { text: 'Your feed is ready in seconds', icon: 'feed' }, -] as const; - -type Props = { - aiPrompt: string; - onAiPromptChange: (value: string) => void; - canStartAiFlow: boolean; - onGithubClick: () => void; - onGoogleClick: () => void; - onAiSubmit: () => void; - origin: string; - isImporting?: boolean; -}; - -export function OnboardingChooserGrid({ - aiPrompt, - onAiPromptChange, - canStartAiFlow, - onGithubClick, - onGoogleClick, - onAiSubmit, - origin, - isImporting, -}: Props): ReactElement { - const { logEvent } = useLogContext(); - return ( -
- {/* ── Path A: GitHub ── */} -
- {/* Animated orb */} -
-
-
- - - - - - - - - - {PARTICLES.map((p) => ( - - ))} -
- -
-
- -

- One-click setup -

-

- Connect GitHub and let our AI do the rest. -

- -
- {STEPS.map(({ text, icon }) => ( -
- - {icon === 'stack' && ( - - )} - {icon === 'ai' && ( - - )} - {icon === 'feed' && ( - - )} - - - {text} - -
- ))} -
- -
- -
-
- -
-

- Read-only access · Public repos only -

-
- - {/* ── Path B: AI ── */} -
-
-
-
- -
-
- - - -
- - or describe your stack - -
- -

- Tell our AI about yourself -

-

- Describe your stack and let AI build your feed. -

- -
-