From 4d3cc2c5a5a5858f9f2ddb0903e17a1bb62c4e2e Mon Sep 17 00:00:00 2001 From: Harsh Bansal Date: Thu, 28 Nov 2024 12:55:08 +0530 Subject: [PATCH] portico: Improve layout of /go page. Made the input field of the page consistent with the other similar pages. Here are I have done the following things: 1. Changed text 'Enter your organization's Zulip URL:'->'Organization URL'. 2. Left aligned the label and button to make it consistent. 3. Moved 'Don't know your organization URL? Find your organization.' to be just below the URL field. 4. Changed the placeholder 'your-organization-url' -> 'your-organization' Fixes #32198 --- templates/zerver/realm_redirect.html | 8 ++++---- tools/lib/capitalization.py | 2 +- web/styles/portico/portico_signin.css | 8 ++++++++ zerver/tests/test_signup.py | 4 ++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/templates/zerver/realm_redirect.html b/templates/zerver/realm_redirect.html index 0f7dafdd3e..451cacdb4d 100644 --- a/templates/zerver/realm_redirect.html +++ b/templates/zerver/realm_redirect.html @@ -19,10 +19,10 @@ {{ csrf_input }}
-

{{ _("Enter your organization's Zulip URL:") }}

+

{{ _("Organization URL") }}

.{{external_host}}
@@ -33,11 +33,11 @@ {% endfor %} {% endif %}
- -

+

{{ _("Don't know your organization URL?") }} {{ _("Find your organization.") }}

+ diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py index 6d127d3f10..7cde496006 100644 --- a/tools/lib/capitalization.py +++ b/tools/lib/capitalization.py @@ -128,7 +128,7 @@ IGNORED_PHRASES = [ # Emoji name placeholder r"leafy green vegetable", # Subdomain placeholder - r"your-organization-url", + r"your-organization", # Used in invite modal r"or", # Units diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css index 190af1fcf7..0077cf6f61 100644 --- a/web/styles/portico/portico_signin.css +++ b/web/styles/portico/portico_signin.css @@ -46,6 +46,11 @@ html { } } +.left-text { + text-align: left; + margin-top: 0; +} + #new-realm-creation { .get-started { font-size: 2rem; @@ -1210,6 +1215,9 @@ button#register_auth_button_gitlab { #realm_redirect_description { top: 15px; position: relative; + text-align: left; + font-weight: 600; + margin-bottom: -5px; } #enter-realm-button { diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 743b46c1b5..5c320fa1d2 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -4698,7 +4698,7 @@ class NameRestrictionsTest(ZulipTestCase): class RealmRedirectTest(ZulipTestCase): def test_realm_redirect_without_next_param(self) -> None: result = self.client_get("/accounts/go/") - self.assert_in_success_response(["Enter your organization's Zulip URL"], result) + self.assert_in_success_response(["Organization URL"], result) result = self.client_post("/accounts/go/", {"subdomain": "zephyr"}) self.assertEqual(result.status_code, 302) @@ -4710,7 +4710,7 @@ class RealmRedirectTest(ZulipTestCase): def test_realm_redirect_with_next_param(self) -> None: result = self.client_get("/accounts/go/", {"next": "billing"}) self.assert_in_success_response( - ["Enter your organization's Zulip URL", 'action="/accounts/go/?next=billing"'], result + ["Organization URL", 'action="/accounts/go/?next=billing"'], result ) result = self.client_post("/accounts/go/?next=billing", {"subdomain": "lear"})