From 7d8d0b22844ef8e8872e9c1a56eb9566ce0cc397 Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Sat, 20 Jul 2019 17:31:24 -0700 Subject: [PATCH] settings: Update upgrade text and styling. When we add Plus, the first sentence should change to "Available on Zulip Standard and Plus". I copied the styling of .tip out of expediency, but it's also possible that long term we'll want only 1 tip-like box styling. The hover styling is a bit random, but I tried to copy other hover styles I found in settings.scss. Note that this renames .upgrade_realm_plan_type_suggestion to .upgrade-tip. --- static/styles/settings.scss | 29 ++++++++++++------- .../settings/organization_profile_admin.hbs | 8 ++--- tools/lib/capitalization.py | 1 + zerver/models.py | 2 +- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/static/styles/settings.scss b/static/styles/settings.scss index 9f85c63902..241c687095 100644 --- a/static/styles/settings.scss +++ b/static/styles/settings.scss @@ -105,15 +105,6 @@ label { margin-bottom: 10px; } -.upgrade_realm_plan_type_suggestion { - font-size: 16px; -} - -.upgrade_realm_plan_type_suggestion::after { - font-family: FontAwesome; - content: "\f135"; -} - .user-avatar-section { float: right; } @@ -312,6 +303,7 @@ td .button { margin-right: 5px; } +.settings-section .upgrade-tip, .settings-section .tip { position: relative; display: block; @@ -325,9 +317,8 @@ td .button { color: hsl(0, 0%, 40%); } +.settings-section .upgrade-tip::before, .settings-section .tip::before { - content: "\f0a2"; - display: inline; margin-right: 8px; @@ -335,6 +326,22 @@ td .button { font-weight: 600; } +.settings-section .upgrade-tip::before { + content: "\f135"; +} + +.settings-section .upgrade-tip:hover { + color: hsl(0, 0%, 20%); + border: 1px solid hsl(49, 20%, 60%); + box-shadow: 0px 0px 4px hsla(199, 79%, 56%, .2); + + text-decoration: none; +} + +.settings-section .tip::before { + content: "\f0a2"; +} + .dynamic-input { display: inline-block; padding: 5px; diff --git a/static/templates/settings/organization_profile_admin.hbs b/static/templates/settings/organization_profile_admin.hbs index cb2bc629bf..86a11c2367 100644 --- a/static/templates/settings/organization_profile_admin.hbs +++ b/static/templates/settings/organization_profile_admin.hbs @@ -58,11 +58,9 @@
{{#unless plan_includes_wide_organization_logo}} -

- - {{upgrade_text_for_wide_organization_logo}} - -

+ + {{upgrade_text_for_wide_organization_logo}} + {{/unless}}
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py index 172e735e41..0e5f87ff2d 100644 --- a/tools/lib/capitalization.py +++ b/tools/lib/capitalization.py @@ -59,6 +59,7 @@ IGNORED_PHRASES = [ r"Zulip", r"Zulip Account Security", r"Zulip Security", + r"Zulip Standard", r"Zulip Team", r"iPhone", r"iOS", diff --git a/zerver/models.py b/zerver/models.py index 2545e52ba5..51c5f315a3 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -270,6 +270,7 @@ class Realm(models.Model): COMMUNITY = 2 org_type = models.PositiveSmallIntegerField(default=CORPORATE) # type: int + UPGRADE_TEXT_STANDARD = _("Available on Zulip Standard. Upgrade to access.") # plan_type controls various features around resource/feature # limitations for a Zulip organization on multi-tenant servers # like zulipchat.com. @@ -277,7 +278,6 @@ class Realm(models.Model): LIMITED = 2 STANDARD = 3 STANDARD_FREE = 4 - UPGRADE_TEXT_STANDARD = _("Available on all paid plans. Upgrade ") plan_type = models.PositiveSmallIntegerField(default=SELF_HOSTED) # type: int # This value is also being used in static/js/settings_bots.bot_creation_policy_values.