internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: zulip/zulip

Issue:
"Pan and zoom" cuts off images instead of using the available space
If you have a tall image and a wide monitor (and wide browser viewport), and you try to zoom… the image stays trapped inside the same box it occupied before you even tried to zoom. If the image is super wide instead of tall, the same thing happens the other way around.

This leads to a lot of frustrating panning around, to look at the different parts of the image through this narrow keyhole, while tons of screen space next to it doesn't get used.

This is the biggest of the issues described by @vanclute in #18939. It was reported again by @alexanderglueck as #19837, and I just ran into it myself ([chat](https://chat.zulip.org/#narrow/stream/6-frontend/topic/pan.2Fzoom/near/1308717)). Here's a nice illustration from #19837: 
![image](https://user-images.githubusercontent.com/28173/149076010-0776088a-53ef-4e10-97b0-6d621692b9e2.png)

Instead, when zooming we should use the full space available. This may be bigger than the area the image occupied when it was scaled down to fit completely in the space available, because the available box may have a different aspect ratio from the image.



Discussion:
Hello @zulip/server-message-view members, this issue was labeled with the "area: message view" label, so you may want to check it out!

<!-- areaLabelAddition -->

It's also mentioned that when the pan and zoom mode is enabled the image becomes somewhat blurry.
@zulipbot claim
Hello @Fingel, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!


Resolving patch:
diff --git a/version.py b/version.py
--- a/version.py
+++ b/version.py
@@ -48,4 +48,4 @@
 #   historical commits sharing the same major version, in which case a
 #   minor version bump suffices.
 
-PROVISION_VERSION = "173.3"
+PROVISION_VERSION = "173.4"


Test patch:
diff --git a/frontend_tests/node_tests/lightbox.js b/frontend_tests/node_tests/lightbox.js
--- a/frontend_tests/node_tests/lightbox.js
+++ b/frontend_tests/node_tests/lightbox.js
@@ -54,8 +54,8 @@ test("pan_and_zoom", ({override_rewire}) => {
     };
 
     override_rewire(lightbox, "render_lightbox_list_images", () => {});
-
-    lightbox.open(img);
+    const open_image = lightbox.build_open_image_function();
+    open_image(img);
 
     assert.equal(fetched_zid, 1234);
 });
@@ -88,6 +88,7 @@ test("youtube", ({override_rewire}) => {
 
     override_rewire(lightbox, "render_lightbox_list_images", () => {});
 
-    lightbox.open(img);
+    const open_image = lightbox.build_open_image_function();
+    open_image(img);
     assert.equal($(".image-actions .open").attr("href"), href);
 });
Repository: zulip/zulip

Issue:
docs: Some of the Nginx words are not capitalized.
E.g. https://github.com/zulip/zulip/blob/fd1d4e101b5d6baaa19ae3166e568244c2582f26/docs/production/authentication-methods.md?plain=1#L768


Discussion:
Can I make changes in this
Yes, sounds good.
@mudassir1231 wait, see the discussion at https://chat.zulip.org/#narrow/stream/18-tools/topic/grammar.20checker/near/1314277.
It should be the other way around, i.e. to lowercase "nginx" whenever possible. Read the discussion above.

Resolving patch:
diff --git a/zproject/urls.py b/zproject/urls.py
--- a/zproject/urls.py
+++ b/zproject/urls.py
@@ -226,7 +226,7 @@
 #   - runtornado.py has its own URL list for Tornado views.  See the
 #     invocation of web.Application in that file.
 #
-#   - The Nginx config knows which URLs to route to Django or Tornado.
+#   - The nginx config knows which URLs to route to Django or Tornado.
 #
 #   - Likewise for the local dev server in tools/run-dev.py.
 


Test patch:
Repository: zulip/zulip

Issue:
Show proper Error Message while generating API Key
![Screenshot from 2022-01-26 19-16-20](https://user-images.githubusercontent.com/76561593/151174278-97c62be4-d70a-4134-90cd-42acb9d00688.png)
On submitting wrong password for generating API key, we're shown a error of 'Your username or password is incorrect.'

which can be made more precise by showing 'Your password entered is incorrect.'

we don't need to include 'username' as here there's no chance of username being incorrect.


Discussion:
@alya  @timabbott  letmee know whether we can go ahead with this issue.
@timabbott @alya , I have solved this issue in https://github.com/zulip/zulip/pull/20937 , can you please review and merge?

Resolving patch:
diff --git a/zerver/views/auth.py b/zerver/views/auth.py
--- a/zerver/views/auth.py
+++ b/zerver/views/auth.py
@@ -977,7 +977,7 @@ def json_fetch_api_key(
         if not authenticate(
             request=request, username=user_profile.delivery_email, password=password, realm=realm
         ):
-            raise JsonableError(_("Your username or password is incorrect."))
+            raise JsonableError(_("Password is incorrect."))
 
     api_key = get_api_key(user_profile)
     return json_success({"api_key": api_key, "email": user_profile.delivery_email})


Test patch:
diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py
--- a/zerver/tests/test_auth_backends.py
+++ b/zerver/tests/test_auth_backends.py
@@ -4345,7 +4345,7 @@ def test_wrong_password(self) -> None:
         user = self.example_user("hamlet")
         self.login_user(user)
         result = self.client_post("/json/fetch_api_key", dict(password="wrong"))
-        self.assert_json_error(result, "Your username or password is incorrect.", 400)
+        self.assert_json_error(result, "Password is incorrect.", 400)
 
     def test_invalid_subdomain(self) -> None:
         username = "hamlet"
diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.py
--- a/zerver/tests/test_decorators.py
+++ b/zerver/tests/test_decorators.py
@@ -1143,7 +1143,7 @@ def test_fetch_api_key_email_address_visibility(self) -> None:
     def test_fetch_api_key_wrong_password(self) -> None:
         self.login("cordelia")
         result = self.client_post("/json/fetch_api_key", dict(password="wrong_password"))
-        self.assert_json_error_contains(result, "password is incorrect")
+        self.assert_json_error_contains(result, "Password is incorrect")
 
 
 class InactiveUserTest(ZulipTestCase):
Repository: zulip/zulip

Issue:
Document custom expiration times for invitations
In #19680, we added the ability to set custom expiration times for invitations and invite links. This should be documented in the help center at https://zulip.com/help/invite-new-users.

Note that this feature will be further extended in #19681; we might be able to write the documentation so that it doesn't have to be updated when this happens.


Discussion:
Hello @zulip/server-user-docs members, this issue was labeled with the "area: documentation (user)" label, so you may want to check it out!

<!-- areaLabelAddition -->


Resolving patch:
diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py
--- a/zerver/lib/markdown/tabbed_sections.py
+++ b/zerver/lib/markdown/tabbed_sections.py
@@ -55,8 +55,6 @@
     "mm-default": "Default installation",
     "mm-docker": "Docker",
     "mm-gitlab-omnibus": "GitLab Omnibus",
-    "send-email-invitations": "Send email invitations",
-    "share-an-invite-link": "Share an invite link",
     "require-invitations": "Require invitations",
     "allow-anyone-to-join": "Allow anyone to join",
     "restrict-by-email-domain": "Restrict by email domain",


Test patch:
Repository: zulip/zulip

Issue:
Change wording on "Login required" modal for logged out users
Following up on #21920 (or @laurynmm 's replacement PR), whenever possible, we should use the term "public access" rather than "web-public stream" when communicating with logged out users. We should therefore change the text of the "Login required" modal.

- **Current**: Since you are not logged in, you can only view messages in [web-public streams](/help/stream-permissions).
- **New**: Since you are not logged in, you can only view messages in [publicly accessible conversations](/help/public-access-option).

@amanagr FYI


Discussion:

Resolving patch:
diff --git a/zproject/urls.py b/zproject/urls.py
--- a/zproject/urls.py
+++ b/zproject/urls.py
@@ -906,6 +906,10 @@
         "help/night-mode",
         RedirectView.as_view(url="/help/dark-theme", permanent=True),
     ),
+    path(
+        "help/web-public-streams",
+        RedirectView.as_view(url="/help/public-access-option", permanent=True),
+    ),
     path("help/", help_documentation_view),
     path("help/<path:article>", help_documentation_view),
     path("api/", api_documentation_view),


Test patch:
diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.js
--- a/frontend_tests/node_tests/narrow.js
+++ b/frontend_tests/node_tests/narrow.js
@@ -237,7 +237,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
         $(".empty_feed_notice_main").html(),
         empty_narrow_html(
             "",
-            'translated HTML: This stream does not exist or is not <a href="https://zulip.com/help/web-public-streams">web-public</a>.',
+            'translated HTML: This stream does not exist or is not <a href="/help/public-access-option">publicly accessible</a>.',
         ),
     );
 
@@ -251,7 +251,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
         $(".empty_feed_notice_main").html(),
         empty_narrow_html(
             "",
-            'translated HTML: This stream does not exist or is not <a href="https://zulip.com/help/web-public-streams">web-public</a>.',
+            'translated HTML: This stream does not exist or is not <a href="/help/public-access-option">publicly accessible</a>.',
         ),
     );
     page_params.is_spectator = false;
diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.py
--- a/zerver/lib/test_helpers.py
+++ b/zerver/lib/test_helpers.py
@@ -487,6 +487,7 @@ def find_pattern(pattern: Any, prefixes: List[str]) -> None:
             "help/disable-new-login-emails",
             "help/test-mobile-notifications",
             "help/troubleshooting-desktop-notifications",
+            "help/web-public-streams",
             "for/working-groups-and-communities/",
             "help/only-allow-admins-to-add-emoji",
             "help/night-mode",
Repository: zulip/zulip

Issue:
Upgrade banner should mention Zulip Standard sponsorship for non-business orgs
In organization settings, we show an upgrade banner next to settings that are not available on Zulip Cloud Free:

![Screen Shot 2022-05-31 at 3 27 03 PM](https://user-images.githubusercontent.com/2090066/171294351-4542fd0c-a02d-4557-8fcf-fb340614de50.png)

Non-business organizations are often eligible for sponsorship for Zulip Standard, so it would be very helpful if this banner mentioned sponsorship as an option for those categories of organizations.

* Banner change: "Upgrade to access." ->  "Upgrade to access or [request sponsorship](/accounts/go/?next=/upgrade%23sponsorship)."
* Organization types: Any type other than "Business", including unspecified.

[Related CZO thread](https://chat.zulip.org/#narrow/stream/9-issues/topic/Web-public.20streams/near/1384705)


Discussion:
Hello @zulip/server-settings members, this issue was labeled with the "area: settings (admin/org)" label, so you may want to check it out!

<!-- areaLabelAddition -->

@zulipbot claim

Resolving patch:
diff --git a/zerver/models.py b/zerver/models.py
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -514,7 +514,6 @@ class Realm(models.Model):
             "name": "Unspecified",
             "id": 0,
             "hidden": True,
-            "hidden_for_sponsorship": True,
             "display_order": 0,
         },
         "business": {


Test patch:
Repository: zulip/zulip

Issue:
Error handling for emoji-names with a slash at the end
Reported [here](https://github.com/zulip/zulip/pull/22367#issuecomment-1174087030) by @sov-j

Tested this on current Firefox. There is a bug where forward slash symbol (`/`) handling is incorrect. Details are below.

### Reproduction steps
1. Open **Custom emoji** form
2. Enter name with `/` (e.g. `test/`)
3. Press **Add emoji**  button 
 
### Expected result
"Emoji names must contain [...]" error message appears.

### Actual result
Stack trace appears with JSON parsing error. **Add emoji** button becomes inactive untill the form is reopened. See screenshots below.
![image](https://user-images.githubusercontent.com/61802932/177204702-59776782-ffae-4677-9e7b-78aaf776526b.png)
![image](https://user-images.githubusercontent.com/61802932/177204444-9e8a84bb-7778-46d1-b521-4352ea0e0505.png)


 





Discussion:
Hello @zulip/server-emoji members, this issue was labeled with the "area: emoji" label, so you may want to check it out!

<!-- areaLabelAddition -->

@ganpa3 want to pick this one up?

Resolving patch:
diff --git a/zproject/urls.py b/zproject/urls.py
--- a/zproject/urls.py
+++ b/zproject/urls.py
@@ -258,7 +258,7 @@
     # realm/emoji -> zerver.views.realm_emoji
     rest_path("realm/emoji", GET=list_emoji),
     rest_path(
-        "realm/emoji/<emoji_name>",
+        "realm/emoji/<path:emoji_name>",
         POST=upload_emoji,
         DELETE=(delete_emoji, {"intentionally_undocumented"}),
     ),


Test patch:
diff --git a/zerver/tests/test_realm_emoji.py b/zerver/tests/test_realm_emoji.py
--- a/zerver/tests/test_realm_emoji.py
+++ b/zerver/tests/test_realm_emoji.py
@@ -123,6 +123,18 @@ def test_upload_exception(self) -> None:
             "Emoji names must contain only numbers, lowercase English letters, spaces, dashes, underscores, and periods.",
         )
 
+    def test_forward_slash_exception(self) -> None:
+        self.login("iago")
+        with get_test_image_file("img.png") as fp1:
+            emoji_data = {"f1": fp1}
+            result = self.client_post(
+                "/json/realm/emoji/my/emoji/with/forward/slash/", info=emoji_data
+            )
+        self.assert_json_error(
+            result,
+            "Emoji names must contain only numbers, lowercase English letters, spaces, dashes, underscores, and periods.",
+        )
+
     def test_upload_uppercase_exception(self) -> None:
         self.login("iago")
         with get_test_image_file("img.png") as fp1:
Repository: zulip/zulip

Issue:
Clean up documentation around organization notifications language
After merging #20866, we have a bunch of follow-up cleanup needed:

* [x] We should fix the /help/configure-notification-bot article to cover all the notifications that it sends, maybe not exhaustively but at least in terms of their categories (E.g. notifications when stream settings are changed). Also, we should think about whether it's be better to make the "organization notifications language" article instead be a section within that, since 80% of what this does is configure Notification bot.
* [ ] We should rename the page from `/help/change-the-default-language-for-your-organization` to something reflecting the new name as a "notifications language", with a redirect.
* [ ] We should open an issue for changing how invitations work to allow explicitly setting a language to be used in outgoing notification emails, with this being the default (I'm not sure it's urgent, but that seems more logical). Or maybe start with a #design discussion to confirm we think this is a good idea.
* [ ] Both language articles advertise contributing `support for new languages on **[Transifex](https://www.transifex.com/zulip/zulip/)**.`; we should probably adjust that language to match the nicer language we have in the language picker itself. (In particular, it's a bad experience to start out on Transifex, since it has no instructions). (I also opened https://github.com/zulip/zulip/issues/21948 for a tangent off this).
* [ ] We should check whether there's anything I missed in updating the documentation for #20866; e.g. maybe the "pick your language" page should mention that we detect your initial language from your browser's `Accept-language` header (likely in a less technical framing).

I'll also note I started https://chat.zulip.org/#narrow/stream/101-design/topic/language.20in.20invitation.20emails/near/1375528 for a question that could result in some further tweaks to the documentation here.

@laurynmm assigned this to you, since you have a ton of context for this.

---

Update by @alya : 

Related issues, which will require additional changes to be made to the same help page(s): https://github.com/zulip/zulip/issues/22188 and https://github.com/zulip/zulip/issues/22136.


Discussion:
Hello @zulip/server-user-docs members, this issue was labeled with the "area: documentation (user)" label, so you may want to check it out!

<!-- areaLabelAddition -->


Resolving patch:
diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.py
--- a/zerver/lib/url_redirects.py
+++ b/zerver/lib/url_redirects.py
@@ -21,6 +21,10 @@ class URLRedirect:
 
 HELP_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [
     # Add URL redirects for help center documentation here:
+    URLRedirect(
+        "/help/change-the-default-language-for-your-organization",
+        "/help/configure-organization-language",
+    ),
     URLRedirect("/help/delete-a-stream", "/help/archive-a-stream"),
     URLRedirect("/help/change-the-topic-of-a-message", "/help/rename-a-topic"),
     URLRedirect("/help/configure-missed-message-emails", "/help/email-notifications"),


Test patch:
Repository: zulip/zulip

Issue:
Do not show read receipts for Notification Bot messages
As [discussed on CZO](https://chat.zulip.org/#narrow/stream/101-design/topic/read-receipts.20UI.20.2318935/near/1429360), Notification Bot messages about resolved/unresolved topics have confusing read receipts. Because those messages are immediately marked as read for all non-participants in the thread, it looks like many people have immediately read the message.

To fix this, we should disable showing read receipts for messages sent by Notification Bot. Instead, "This message has been read by X people:" should be replaced with:

> Read receipts are not available for Notification Bot messages.

No names should be shown.


Discussion:
@zulipbot claim

Resolving patch:
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py
--- a/tools/lib/capitalization.py
+++ b/tools/lib/capitalization.py
@@ -109,6 +109,8 @@
     # Use in compose box.
     r"to send",
     r"to add a new line",
+    # Used in showing Notification Bot read receipts message
+    "Notification Bot",
 ]
 
 # Sort regexes in descending order of their lengths. As a result, the


Test patch:
Repository: zulip/zulip

Issue:
Migrate "Add custom profile fields" -> "Custom profile fields"
Since the "Add custom profile fields" is not just about _adding_ fields, we should:

- [ ] Rename it to "Custom profile fields", including updating the URL accordingly.
- [ ] Update links to it, linking to #add-a-custom-profile-field where appropriate.
- [ ] Add a section on editing custom profile fields.

For simplicity, this can be done after #23169 is merged.

@drrosa I'm marking this as a release goal, but you can treat it as the lowest priority among the release goals assigned to you. Thanks!


Discussion:
Hello @zulip/server-user-docs members, this issue was labeled with the "area: documentation (user)" label, so you may want to check it out!

<!-- areaLabelAddition -->

Hey, @alya I would like to work on this issue can you please assign me this issue?
@akashthedeveloper This issue has already been assigned. See https://zulip.readthedocs.io/en/latest/overview/contributing.html for advice on picking an issue to work on.

Resolving patch:
diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.py
--- a/zerver/lib/url_redirects.py
+++ b/zerver/lib/url_redirects.py
@@ -21,6 +21,10 @@ class URLRedirect:
 
 HELP_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [
     # Add URL redirects for help center documentation here:
+    URLRedirect(
+        "/help/add-custom-profile-fields",
+        "/help/custom-profile-fields",
+    ),
     URLRedirect(
         "/help/enable-enter-to-send",
         "/help/mastering-the-compose-box#toggle-between-ctrl-enter-and-enter-to-send-a-message",


Test patch:
Repository: zulip/zulip

Issue:
Use consistent naming for user (profile) menus
As [discussed on CZO](https://chat.zulip.org/#narrow/stream/101-design/topic/terms.20for.20user.20profiles), we should develop consistent naming for the pop-up you seen when you click on a user avatar, as well as the detailed user profile.

Specifically, the naming we want to implement is:

1. "User card" for the initial user view.
![Screen-Shot-2022-11-03-at-4 03 01-PM](https://user-images.githubusercontent.com/2090066/201202788-1a7311cc-a4ce-4042-8d95-5a5b2c50339e.png)

2. "User profile" for the detailed profile.
![Screen-Shot-2022-11-03-at-4 03 09-PM](https://user-images.githubusercontent.com/2090066/201202848-cbaa4a53-759f-4de7-a92f-0ebb87877286.png)

Known places where changes need to be made:

- [ ] Tooltip on user avatar: "View user profile (u)" -> "View user card (u)"
- [ ] Menu option on user card: "View full profile" -> "View profile"
- Custom profile fields:
   - [ ] "Summary" column name -> "Card"
   - [ ] "Display in profile summary" -> "Display on user card"
  
We should also check whether any other places are affected.

Help center:

- [ ] Whenever instructions mention opening the profile card, we should name it explicitly, e.g.,:
> Click on the ellipsis () to the right of their name. -> Click on the ellipsis () to the right of their name to open their **user card**.
- [ ] Some pages known to be affected: https://zulip.com/help/view-someones-profile, https://zulip.com/help/custom-profile-fields, any pages that have "Via the user's profile" instructions.

We should do an overall audit to make sure the terminology is consistent (can be done as a follow-up).




Discussion:
@laurynmm Would you be up for taking this one? It's not *critical* for the release, but would be nice to include.
Hello @zulip/server-settings members, this issue was labeled with the "area: settings (admin/org)" label, so you may want to check it out!

<!-- areaLabelAddition -->


Resolving patch:
diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py
--- a/zerver/lib/markdown/tabbed_sections.py
+++ b/zerver/lib/markdown/tabbed_sections.py
@@ -75,7 +75,7 @@
     "public-streams": "Public streams",
     "private-streams": "Private streams",
     "web-public-streams": "Web-public streams",
-    "via-user-profile": "Via the user's profile",
+    "via-user-card": "Via user card",
     "via-organization-settings": "Via organization settings",
     "via-personal-settings": "Via personal settings",
     "default-subdomain": "Default subdomain",


Test patch: