Merge pull request #22475 from overleaf/rh-student-hurdle

[web] Add friction to student plans

GitOrigin-RevId: 506f1e96a8430069ba5e9f7bfd6c709124e7857c
This commit is contained in:
M Fahru
2025-01-23 06:36:25 -07:00
committed by Copybot
parent 36c9772e0e
commit 7af423173c
7 changed files with 49 additions and 0 deletions

View File

@@ -709,6 +709,7 @@
"how_to_insert_images": "",
"how_we_use_your_data": "",
"how_we_use_your_data_explanation": "",
"i_confirm_am_student": "",
"i_want_to_stay": "",
"id": "",
"if_you_need_to_customize_your_table_further_you_can": "",
@@ -1025,6 +1026,7 @@
"normal": "",
"normally_x_price_per_month": "",
"normally_x_price_per_year": "",
"not_a_student": "",
"not_managed": "",
"not_now": "",
"notification_personal_and_group_subscriptions": "",
@@ -1567,6 +1569,7 @@
"switch_plan": "",
"switch_to_editor": "",
"switch_to_pdf": "",
"switch_to_standard": "",
"symbol_palette": "",
"sync": "",
"sync_dropbox_github": "",

View File

@@ -0,0 +1,7 @@
// window.history-related functions in a separate module so they can be mocked/stubbed in tests
export const history = {
pushState(data: any, unused: string, url?: string | URL | null) {
window.history.pushState(data, unused, url)
},
}

View File

@@ -1,6 +1,10 @@
// window location-related functions in a separate module so they can be mocked/stubbed in tests
export const location = {
get href() {
// eslint-disable-next-line no-restricted-syntax
return window.location.href
},
assign(url) {
// eslint-disable-next-line no-restricted-syntax
window.location.assign(url)

View File

@@ -344,6 +344,12 @@
margin-left: @table-4-column-width / 2;
}
.plans-new-table-student-verification {
font-weight: 600;
font-size: var(--font-size-01);
text-align: center;
}
.plans-new-table-group {
margin-top: @spacing-11 + @highlighted-heading-height;
}

View File

@@ -416,3 +416,24 @@
font-weight: 600;
}
.not-student-switch {
font-size: var(--font-size-02);
margin-left: var(--spacing-08);
label {
font-weight: normal;
}
button {
margin: 0 0 0 var(--spacing-03);
padding: 0;
color: var(--link-web);
font-size: var(--font-size-02);
vertical-align: inherit;
.button-content {
color: var(--link-web);
}
}
}

View File

@@ -932,6 +932,7 @@
"how_we_use_your_data": "How we use your data",
"how_we_use_your_data_explanation": "<0>Please help us continue to improve Overleaf by answering a few quick questions. Your answers will help us and our corporate group understand more about our user base. We may use this information to improve your Overleaf experience, for example by providing personalized onboarding, upgrade prompts, help suggestions, and tailored marketing communications (if youve opted-in to receive them).</0><1>For more details on how we use your personal data, please see our <0>Privacy Notice</0>.</1>",
"hundreds_templates_info": "Produce beautiful documents starting from our gallery of LaTeX templates for journals, conferences, theses, reports, CVs and much more.",
"i_confirm_am_student": "I confirm that I am currently a student.",
"i_want_to_stay": "I want to stay",
"id": "ID",
"if_have_existing_can_link": "If you have an existing <b>__appName__</b> account on another email, you can link it to your <b>__institutionName__</b> account by clicking <b>__clickText__</b>.",
@@ -1368,6 +1369,7 @@
"normal": "Normal",
"normally_x_price_per_month": "Normally __price__ per month",
"normally_x_price_per_year": "Normally __price__ per year",
"not_a_student": "Not a student?",
"not_found_error_from_the_supplied_url": "The link to open this content on Overleaf pointed to a file that could not be found. If this keeps happening for links on a particular site, please report this to them.",
"not_managed": "Not managed",
"not_now": "Not now",
@@ -2027,6 +2029,7 @@
"stretch_width_to_text": "Stretch width to text",
"student": "Student",
"student_disclaimer": "The educational discount applies to all students at secondary and postsecondary institutions (schools and universities). We may contact you to confirm that youre eligible for the discount.",
"student_verification_required": "Student verification required",
"students": "Students",
"subject": "Subject",
"subject_area": "Subject area",
@@ -2059,6 +2062,7 @@
"switch_plan": "Switch plan",
"switch_to_editor": "Switch to editor",
"switch_to_pdf": "Switch to PDF",
"switch_to_standard": "Switch to standard",
"symbol_palette": "Symbol palette",
"symbol_palette_highlighted": "<0>Symbol</0> palette",
"symbol_palette_info_new": "Insert math symbols into your document with the click of a button.",

View File

@@ -30,6 +30,9 @@ export type PaymentContextValue = {
>
plan: Plan
planCode: string
setPlanCode: React.Dispatch<
React.SetStateAction<PaymentContextValue['planCode']>
>
planName: string
planOffersFreeTrial: boolean
pricing: React.MutableRefObject<SubscriptionPricingInstanceCustom | undefined>
@@ -65,4 +68,5 @@ export type PaymentContextValue = {
changeCurrency: (newCurrency: CurrencyCode) => void
updateCountry: (country: PricingFormState['country']) => void
userCanNotStartRequestedTrial: boolean
showStudentConfirmation: boolean
}