Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
portico: Add new self-hosted plans.
Karl Stolleye44ba3b1f1a0
diff --git a/corporate/views/portico.py b/corporate/views/portico.pyindex 05b43ead76d..bfcbb97f4c4 100644--- a/corporate/views/portico.py+++ b/corporate/views/portico.py@@ -154,9 +154,13 @@ def remote_realm_plans_page(if context.customer_plan.tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY:# Free trial is disabled for legacy customers.context.free_trial_days = None- context.on_free_tier = context.customer_plan.tier in (- CustomerPlan.TIER_SELF_HOSTED_LEGACY,- CustomerPlan.TIER_SELF_HOSTED_BASE,+ context.on_free_tier = (+ context.customer_plan.tier+ in (+ CustomerPlan.TIER_SELF_HOSTED_LEGACY,+ CustomerPlan.TIER_SELF_HOSTED_BASE,+ )+ and not context.is_sponsored)context.on_free_trial = is_customer_on_free_trial(context.customer_plan)context.is_legacy_server_with_scheduled_upgrade = (diff --git a/templates/corporate/plans.html b/templates/corporate/plans.htmlindex 6d9f6410223..56a4a852f8a 100644--- a/templates/corporate/plans.html+++ b/templates/corporate/plans.html@@ -36,7 +36,7 @@</h3><ul><li>- <span><a href="/for/open-source/">Open source projects</a></span>+ <span><a href="/for/open-source/">Open-source projects</a></span></li><li><span><a href="/for/research/">Researchers and academics</a></span>@@ -112,32 +112,53 @@<h2>Sponsorship and discounts</h2><p>Contact <a href="mailto:[email protected]">[email protected]</a>- to discuss Enterprise pricing.+ with any questions.</p></header><div class="text-content"><div class="discounted-community-plan">- <h3>Eligible for discounts</h3>+ <h3>Community plan <a href="/help/self-hosted-billing#free-community-plan">eligibility</a></h3><ul><li>- <span><a href="/for/open-source/">Open source projects</a></span>+ <span><a href="/for/open-source/">Open-source projects</a></span></li><li>- <span><a href="/for/research/">Research groups or departments</a></span>+ <span><a href="/for/research/">Researchers and academics</a></span></li><li>- <span><a href="/for/events/">Academic conferences and most other non-profit events</a></span>+ <span><a href="/for/events/">Academic conferences and other non-profit events</a></span></li><li>- <span><a href="/for/education/">Education</a> (online or in-person)</span>+ <span><a href="/for/education/">Education</a> and non-profit organizations (up to 100 users)</span></li><li>- <span><a href="/for/communities/">Non-profits and communities</a></span>+ <span><a href="/for/communities/">Communities</a></span></li><li><span>Organizations based in the developing world</span></li></ul>+ <div class="discounted-business-plan">+ <h3>Business plan discounts <a href="/help/self-hosted-billing#business-plan-discounts">available</a></h3>+ <ul>+ <li>+ <span><a href="/help/self-hosted-billing#business-plan-discounts">Special</a> education and non-profit pricing (100+ users)</span>+ </li>+ <li>+ <span>Organizations based in the developing world</span>+ </li>+ <li>+ <span>Any organization where many users are not paid staff</span>+ </li>+ </ul>+ {% if is_self_hosted_realm %}+ <a href="{{ sponsorship_url }}" class="button sponsorship-button">Request sponsorship</a>+ {% else %}+ <a href="/help/self-hosted-billing#free-community-plan" class="button sponsorship-button">+ Log in to apply+ </a>+ {% endif %}+ </div></div></div></div>@@ -146,7 +167,8 @@<header><h2>Other questions?</h2><p>- Learn about <a href="/self-hosting">self-hosting Zulip</a>.+ See our <a href="/help/self-hosted-billing">billing help page</a> for+ additional details.</p></header><div class="text-content">@@ -157,13 +179,20 @@<li><span><a href="/help/zulip-cloud-or-self-hosting">How do I choose between Zulip Cloud and self-hosting?</a></span></li>+ <li>+ <span><a href="/help/self-hosted-billing#business-plan-details-and-upgrades">How do I upgrade to the Business plan?</a></span>+ </li>+ <li>+ <span><a+ href="/help/self-hosted-billing#free-community-plan">How do I apply for the Community plan?</a></span>+ </li><li><span><a href="/help/migrating-from-other-chat-tools">Can I import data from other chat tools?</a></span></li></ul><p>- If you have any other questions, please don’t hesitate to reach out to- <a href="mailto:[email protected]">[email protected]</a>.+ Please reach out to <a href="mailto:[email protected]">[email protected]</a> if you+ have any further questions or would like to discuss Enterprise pricing.</p></div></div>diff --git a/templates/corporate/pricing_model.html b/templates/corporate/pricing_model.htmlindex 14ee25fdf30..383374dca97 100644--- a/templates/corporate/pricing_model.html+++ b/templates/corporate/pricing_model.html@@ -103,7 +103,7 @@</a>{% elif is_cloud_realm and sponsorship_pending %}<a href="/billing/" class="button current-plan-button" type="button">- Sponsorship pending+ Sponsorship requested</a>{% else %}<a href="/upgrade/" class="button upgrade-button">@@ -160,28 +160,141 @@<div class="self-hosted-plan-pricing pricing-pane"><div class="price-box" tabindex="-1"><div class="text-content">- <h2>Free</h2>+ <h2>Self-managed</h2><ul class="feature-list">- <li><span>All Zulip Cloud features included</span></li>- <li><span>Friendly community support</span></li>- <li><span><a href="https://zulip.readthedocs.io/en/stable/production/authentication-methods.html">SAML, OIDC, Google, social SSO</a></span></li>- <li><span><a href="https://zulip.readthedocs.io/en/stable/production/authentication-methods.html#synchronizing-data">LDAP/Active Directory sync</a></span></li>- <li><span>Advanced <a href="/help/roles-and-permissions">roles</a> and <a href="/help/stream-permissions">permissions</a></span></li>- <li><span>Easy <a href="https://zulip.readthedocs.io/en/stable/production/install.html">installation</a>- and <a href="https://zulip.readthedocs.io/en/stable/production/upgrade.html">maintenance</a></span></li>+ <li><span><a href="https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html">Mobile push notifications</a> for organizations with up to 10 users</span></li>+ <li class="support-note"><span>Friendly <a href="/development-community/">community</a> support for:</span></li>+ <li><span>Tools for <a href="/why-zulip/">efficient communication</a></span></li>+ <li><span>Unlimited <a href="/help/search-for-messages">search</a> history</span></li>+ <li><span>Unlimited <a href="/help/start-a-call">voice and video calls</a></span></li>+ <li><span>Unlimited <a href="/integrations/">integrations</a></span></li>+ <li><span>Easy <a href="https://zulip.readthedocs.io/en/stable/production/install.html">installation</a> and <a href="https://zulip.readthedocs.io/en/stable/production/upgrade.html">maintenance</a></span></li>+ <li class="comparison-table-pointer"><span>And <a href="/plans/#self-hosted-plan-comparison">much more</a>!</span></li></ul></div><div class="bottom"><div class="text-content">+ <div class="standard-price-box">+ <div class="price">Free</div>+ </div>{% if is_self_hosted_realm and on_free_tier %}- <a href='{{ billing_base_url }}/billing' class="button current-plan-button" type="button">+ <span class="button current-plan-descriptor" type="button"><i class="icon current-plan-icon"></i>- Current plan- </a>+ Unlimited push notifications<br />until February 15, 2024+ </span>{% elif not is_self_hosted_realm %}<a href="/self-hosting/" class="button get-started-button">Self-host Zulip</a>+ {% else %}+ <div class="button-placeholder"></div>+ {% endif %}+ </div>+ </div>+ </div>++ <div class="price-box" tabindex="-1">+ <div class="text-content">+ <h2>Community</h2>+ <ul class="feature-list">+ <li class="unlimited-push-notifications"><span>Unlimited <a href="https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html">mobile push notifications</a></span></li>+ <li class="support-note"><span>Friendly <a href="/development-community/">community</a> support for:</span></li>+ <li><span><a href="/help/configure-authentication-methods">OAuth social login</a> (e.g., Google, GitHub)</span></li>+ <li><span><a href="/help/public-access-option">Public access option</a></span></li>+ <li><span><a href="/help/moderating-open-organizations">Advanced moderation tools</a></span></li>+ <li><span><a href="/help/format-your-message-using-markdown">Expressive formatting</a> (code, LaTeX)</span></li>+ <li class="comparison-table-pointer"><span>And <a href="/plans/#self-hosted-plan-comparison">much more</a>!</span></li>+ </ul>+ </div>+ <div class="bottom">+ <div class="text-content">+ <div class="standard-price-box">+ <div class="price">Free</div>+ </div>+ {% if is_self_hosted_realm and is_sponsored %}+ <a href='{{ billing_base_url }}/billing' class="button current-plan-button" type="button">+ <i class="icon current-plan-icon"></i>+ Current plan+ </a>+ {% elif is_self_hosted_realm and sponsorship_pending and requested_sponsorship_plan == "Community" %}+ <a href="{{ billing_base_url }}/billing/" class="button current-plan-button" type="button">+ Sponsorship requested+ </a>+ {% elif is_self_hosted_realm %}+ <a href="{{ billing_base_url }}/sponsorship/" class="button upgrade-button">+ Request sponsorship+ </a>+ {% else %}+ <a href="/help/self-hosted-billing#free-community-plan" target="_blank" rel="noopener noreferrer" class="button upgrade-button">+ Log in to apply+ </a>+ {% endif %}+ </div>+ </div>+ </div>++ <div class="price-box" tabindex="-1">+ <div class="text-content">+ <h2 class="with-fine-print">Business <small>10 users minimum</small></h2>+ <ul class="feature-list">+ <li class="unlimited-push-notifications"><span>Unlimited <a href="https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html">mobile push notifications</a></span></li>+ <li class="support-note"><span>Email and chat support for:</span></li>+ <li><span><a href="/help/saml-authentication">SSO with SAML, Azure AD</a></span></li>+ <li><span><a href="https://zulip.readthedocs.io/en/stable/production/authentication-methods.html">AD/LDAP user sync </a></span></li>+ <li><span><a href="/help/guest-users">Guests</a> with configurable access</span></li>+ <li><span><a href="/help/export-your-organization">Full</a> and <a href="https://zulip.readthedocs.io/en/stable/production/export-and-import.html#compliance-exports">compliance</a> data exports</span></li>+ <li><span><a href="/help/message-retention-policy">Data retention policies</a></span></li>+ <li class="comparison-table-pointer"><span>And <a href="/plans/#self-hosted-plan-comparison">much more</a>!</span></li>+ </ul>+ </div>+ <div class="bottom">+ <div class="text-content">+ <div class="standard-price-box">+ <div class="price"><span class="currency-symbol">$</span>6.67</div>+ <div class="details">+ <p>+ /user/month billed annually+ or <b>$8</b> billed monthly+ </p>+ </div>+ </div>+ {% if is_legacy_server_with_scheduled_upgrade and legacy_server_new_plan.tier == legacy_server_new_plan.TIER_SELF_HOSTED_BUSINESS %}+ <a href="{{ billing_base_url }}/billing/" class="button current-plan-button">+ Upgrade is scheduled+ </a>+ {% elif is_self_hosted_realm and sponsorship_pending and requested_sponsorship_plan == "Business" %}+ <a href="{{ billing_base_url }}/upgrade/" class="button current-plan-button" type="button">+ Sponsorship requested+ </a>+ {% elif is_self_hosted_realm and on_free_tier and not sponsorship_pending %}+ <a href="{{ billing_base_url }}/upgrade/" class="button upgrade-button">+ {% if free_trial_days %}+ Start {{ free_trial_days }}-day free trial+ {% else %}+ Upgrade to Business+ {% endif %}+ </a>+ {% elif is_self_hosted_realm and customer_plan and customer_plan.tier == customer_plan.TIER_SELF_HOSTED_BUSINESS %}+ <a href='{{ billing_base_url }}/billing' class="button current-plan-button" type="button">+ <i class="icon current-plan-icon"></i>+ {% if on_free_trial %}+ Current plan (free trial)+ {% else %}+ Current plan+ {% endif %}+ </a>+ {% elif is_self_hosted_realm %}+ <a href="{{ billing_base_url }}/upgrade/" class="button upgrade-button">+ {% if free_trial_days %}+ Start {{ free_trial_days }}-day free trial+ {% else %}+ Upgrade to Business+ {% endif %}+ </a>+ {% else %}+ <a href="/help/self-hosted-billing" target="_blank" rel="noopener noreferrer" class="button upgrade-button">+ Log in to upgrade+ </a>{% endif %}</div></div>@@ -191,12 +304,15 @@<div class="text-content"><h2>Enterprise</h2><ul class="feature-list">- <li><span>All Free features included</span></li>- <li><span>Professional support with SLAs</span></li>- <li><span>High availability</span></li>- <li><span>Incident collaboration</span></li>- <li><span>Advanced compliance</span></li>- <li><span>Funds the Zulip open source project</span></li>+ <li class="unlimited-push-notifications"><span>Unlimited <a href="https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html">mobile push notifications</a></span></li>+ <li class="support-note"><span>Email, chat and phone support for:</span></li>+ <li><span><a href="https://zulip.readthedocs.io/en/stable/production/authentication-methods.html#openid-connect">SSO with OpenID Connect</a></span></li>+ <li><span><a href="https://zulip.readthedocs.io/en/stable/production/authentication-methods.html">AD/LDAP group sync</a></span></li>+ <li><span><a href="/help/scim">SCIM sync</a></span></li>+ <li><span>Implementation consulting</span></li>+ <li><span>Custom feature development</span></li>+ <li><span>Advanced deployment options</span></li>+ <li class="comparison-table-pointer"><span>And <a href="/plans/#self-hosted-plan-comparison">much more!</a></span></li></ul></div><div class="bottom">diff --git a/web/src/portico/landing-page.js b/web/src/portico/landing-page.jsindex 67ecc0b1743..aad16649b7f 100644--- a/web/src/portico/landing-page.js+++ b/web/src/portico/landing-page.js@@ -138,13 +138,21 @@ $(() => {if (window.location.pathname.endsWith("/plans/")) {const tabs = ["#cloud", "#self-hosted"];- if (!tabs.includes(window.location.hash)) {+ const target_hash =+ window.location.hash === "#self-hosted-plan-comparison"+ ? "#self-hosted"+ : window.location.hash;+ if (!tabs.includes(target_hash)) {return;}- const tab_to_show = window.location.hash;+ const tab_to_show = target_hash;// Don't scroll to the target element- window.scroll({top: 0});+ if (target_hash === "#self-hosted") {+ window.scroll({top: 0});+ }+ // Display the self-hosted tabs when the URL fragment is #self-hosted+ // or #self-hosted-plan-comparisonconst $pricing_wrapper = $(".portico-pricing");$pricing_wrapper.removeClass("showing-cloud showing-self-hosted");$pricing_wrapper.addClass(`showing-${tab_to_show.slice(1)}`);diff --git a/web/styles/portico/hello.css b/web/styles/portico/hello.cssindex e7e1ea797f3..e261a8260b8 100644--- a/web/styles/portico/hello.css+++ b/web/styles/portico/hello.css@@ -20,6 +20,12 @@ body {color: hsl(0deg 0% 100%);}+body :target {+ /* Keep elements targeted by URL fragments visible below the+ floating top menu; coordinate the value here with the menu's height. */+ scroll-margin-top: 60px;+}+a {text-decoration: none;color: inherit;diff --git a/web/styles/portico/pricing_plans.css b/web/styles/portico/pricing_plans.cssindex d6ec05e4f80..8152836e74f 100644--- a/web/styles/portico/pricing_plans.css+++ b/web/styles/portico/pricing_plans.css@@ -7,6 +7,7 @@--color-plan-tab-copy: hsl(223deg 40% 25% / 70%);--color-box-header: hsl(223deg 43% 25%);--color-box-copy: hsl(223deg 43% 25%);+ --color-box-copy-fine-print: hsl(223deg 43% 55%);--color-link: hsl(210deg 94% 42%);--color-link-hover: hsl(210deg 100% 50%);--color-link-underline: hsl(210deg 94% 42% / 30%);@@ -103,6 +104,23 @@}}+ .unlimited-push-notifications {+ padding-bottom: 21px;+ }++ .support-note {+ margin-top: 15px;+ font-size: 17px;+ font-weight: 550;++ &::before {+ /* Hide the bullet on the support note,+ but still keep its width to maintain+ lefthand alignment. */+ background: transparent;+ }+ }+a {color: var(--color-link);text-decoration: underline;@@ -247,9 +265,13 @@border-radius: 16px;color: var(--color-box-copy);background: var(--color-background-box);- min-width: 850px;+ min-width: 1040px;margin: 0 16px;+ &.self-hosted-plan-pricing {+ min-width: 1220px;+ }+@media screen and (width <= 700px) {margin: 0 8px;}@@ -257,9 +279,27 @@h2 {font-weight: 550;font-size: 28px;- line-height: 1;+ line-height: 28px;padding-left: 14px;margin: 8px 0 16px;++ &.with-fine-print {+ display: flex;+ /* Keep fine-print to same distance from+ the dashed border to the right as the+ heading text is to the left. */+ padding: 0 14px;++ small {+ flex: 0 1 min-content;+ margin-left: auto;+ font-weight: 350;+ font-size: 14px;+ line-height: 14px;+ text-align: right;+ color: var(--color-box-copy-fine-print);+ }+ }}ul {@@ -283,9 +323,21 @@border-right: 0;}+ /* Make sure flexing text-content boxes+ occupy their full with, but account+ for padding with border-box sizing. */.text-content {+ box-sizing: border-box;+ width: 100%;margin: 0 auto;}++ /* Set right and left padding on the+ bottom box so that buttons align+ to the text column above. */+ .bottom {+ padding: 0 16px;+ }}.text-content {@@ -316,6 +368,7 @@.details p {margin: 2px 0 0;+ font-size: 15px;line-height: 17px;}}@@ -449,6 +502,14 @@border-radius: 4px;}+ .button-placeholder {+ /* Empty element for maintaining the+ layout on plans that otherwise have+ no button. */+ height: 37.5px;+ visibility: hidden;+ }+.get-started-button {color: hsl(0deg 0% 100%);background-color: hsl(146deg 92% 26%);@@ -469,17 +530,14 @@}}- .current-plan-button {+ .current-plan-button,+ .current-plan-descriptor {display: flex;align-items: center;justify-content: center;gap: 0.5ch;color: hsl(147deg 57% 25%);-- &:hover {- color: hsl(147deg 57% 25%);- background-color: hsl(152deg 79% 24% / 14%);- }+ background-color: hsl(152deg 79% 24% / 5%);.current-plan-icon {width: 22px;@@ -492,6 +550,20 @@}}+ .current-plan-descriptor {+ /* Pad and lead the descriptor+ to better match other buttons */+ padding: 1.75px 0;+ line-height: 16px;+ background-color: transparent;+ border: 1px solid hsl(152deg 79% 24% / 10%);+ }++ .current-plan-button:hover {+ color: hsl(147deg 57% 25%);+ background-color: hsl(152deg 79% 24% / 14%);+ }+.sponsorship-button {color: hsl(147deg 57% 25%);background-color: hsl(152deg 79% 24% / 10%);@@ -554,7 +626,7 @@&.showing-self-hosted {.pricing-container {- max-width: 960px;+ max-width: 1400px;}.cloud-scroll,@@ -600,16 +672,6 @@}}}-- .price-box {- .text-content {- max-width: 332px;- }-- .bottom .text-content {- max-width: 268px;- }- }}.is-self-hosted-realm {diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.pyindex 4a869de14bb..ab8770d4b34 100644--- a/zerver/tests/test_docs.py+++ b/zerver/tests/test_docs.py@@ -546,7 +546,7 @@ class PlansPageTest(ZulipTestCase):sign_up_now = "Create organization"upgrade_to_standard = "Upgrade to Standard"current_plan = "Current plan"- sponsorship_pending = "Sponsorship pending"+ sponsorship_pending = "Sponsorship requested"# Root domainresult = self.client_get("/plans/", subdomain="")