Commit Graph

49006 Commits

Author SHA1 Message Date
Lauryn Menard 656f2c6f5f images: Move operating system screenshots to app-screenshots directory.
Moves the three images of the web-app on different operating
systems (Mac, Ubuntu and Windows) to the same directory as
the two mobile-app screenshots, `/static/images/app-screenshots/`.
All five images are referenced in `static/js/landing-page.js`.
2022-10-31 14:36:54 -07:00
Lauryn Menard 0c947985bd tests: Update tests to use example profile picture.
So that we can stop using Tim's photo for tests, adds an open
license profile picture to use instead.

Updates tests that used `tim.png` to use the new example profile
picture, which is located in `static/images/test-images/avatars/`.
2022-10-31 14:36:54 -07:00
Lauryn Menard 1eda42f509 images: Create `/authentication_backends` directory for icons.
Creates `static/images/authentication_backends` directory for icons
of backend authentication methods, which are used on the log-in page.

And updates the example documentation in the API `/server_settings`
endpoint.
2022-10-31 14:36:54 -07:00
Lauryn Menard 89713bab76 tests: Use Zulip icon for markdown test cases instead of octopus.
Updates the markdown test case that used `zulip-octopus.png` to
instead use an zulip logo that's also referenced in a frontend
puppeteer test, `static/images/logo/zulip-icon-128x128.png`.
2022-10-31 14:36:54 -07:00
Aman Agrawal 784966b3bd css: Visual fixes to message feed notice.
Fixes #23273

Removed height restriction to allow the box to grow when text wraps
to the next line.

Aligned wrapped lines to the text in the first line instead of the
icon.
2022-10-31 14:33:50 -07:00
Aman Agrawal 42ff193e29 recent: Fix alignment of unread count in PM rows.
The alignment was off in both narrow and wide screens. Added
an invisible mute icon to PM rows to keep the unread counts aligned
with topic rows.
2022-10-31 14:21:24 -07:00
Aman Agrawal d6c68ac82c css: Increase opacity of sidebar titles in dark theme.
0.5 opacity felt too light; it made these appear similar in color to
muted streams, not as the intended grey text.  This opacity reduction
is only applied in dark theme to sidebar titles.
2022-10-31 14:17:40 -07:00
Zixuan James Li ca922919f4 docs: Document handling noop migrations.
Inspired by #23377. We document a convention maneuver to avoid adding
noop migrations, which involves modifying the latest migration related
to the fields in question.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-31 14:15:00 -07:00
Sahil Batra 888e4f9bf4 custom_profile_fields: Fix query for display_in_profile_summary limit.
The query in display_in_profile_summary_limit_reached should check
realm also since there is per-realm limit of 2 fields, otherwise
this will cause issues where multiple realms are hosted on the
same server.

Fixes #23368.
2022-10-31 14:10:47 -07:00
Greg Price 28c97dd4f1 typeahead [nfc]: Dedupe query_matches_person logic a bit.
I think this makes the flow a bit clearer: we always search
`.full_name`, and if emails are real then we also search the email.
2022-10-31 10:28:03 -07:00
Greg Price 728555522b typeahead [nfc]: Use people.get_visible_email abstraction.
Best to centralize this logic -- makes the intention clearer at the
use site, and also puts us in better position to make changes to it in
the future.
2022-10-31 10:28:03 -07:00
Greg Price c746d5669f typeahead [nfc]: Dissolve `query_matches_source_attrs`.
This makes each of the call sites more straightforward and
transparent.  In `query_matches_person` it also opens up further
simplifications, which we'll make next.

Since we're now exporting `query_matches_string` from this
shared module, we write its type in the `.js.flow` file.
2022-10-31 10:28:03 -07:00
Greg Price 7400165031 typeahead [nfc]: Push toLowerCase down into query_matches_string.
This prepares us to dissolve query_matches_source_attrs in favor
of making its call sites simpler and more transparent.
2022-10-31 10:28:03 -07:00
Mateusz Mandera 760587450e retention: Remove two redundant comments.
These two identical comments don't contribute anything useful and seem
just out of place at this point.
2022-10-31 10:23:57 -07:00
Mateusz Mandera 7b13204e8f retention: Use Message.realm to simplify private message query.
We no longer need to do the inner joins to figure out the message's
realm and split up the cross-realm and regular case - now we just look
at zerver_message.realm directly.
2022-10-31 10:23:57 -07:00
Mateusz Mandera 78a325ac58 internal_send_private_message: Fix edge case of message to system bot.
I don't think this is used anywhere outside of tests, but we should have
this logic correct. If this function is used to send a message from a
user to a cross-realm bot, the message.realm should be the realm of the
user.

In the normal case, where a user send a message to a cross-realm bot
through the API is already handled correctly, this bug is unrelated.
2022-10-31 10:23:57 -07:00
Alya Abbott a674de5cf8 docs: Copy Zulip development community intro to Contributing guide. 2022-10-31 10:15:22 -07:00
Mateusz Mandera ebc144896f delete_realm: Use Message.realm column for message count. 2022-10-31 09:57:42 -07:00
Mateusz Mandera 601f0677f3 update_first_visible_message_id: Use Message.realm column.
With the Message.realm column added, this query can now be improved.
2022-10-31 09:57:42 -07:00
Aman Agrawal 925fa4ca50 left_sidebar: Make topics list header sticky.
Fixes #22911

`Back to streams`, stream name and filter topics are all sticky
now and their color changes based on which filter is active and
the currently applied theme.
2022-10-28 17:43:33 -07:00
Lauryn Menard 8ccd416e3b filter: Combine stream narrow cases in `filter.get_title`. 2022-10-28 17:41:47 -07:00
Lauryn Menard 0901ccdb47 filter: Show pm_with title with near narrow links.
Updates the `filter.get_title` logic to return the list of users
for narrows that include the pm_with and near operators. That way
the browser/tab title remains the same for these views.
2022-10-28 17:41:47 -07:00
Lauryn Menard bcd1763dca api-docs: Clarify narrow parameters in API documentation.
Clarifies most of the narrow parameter descriptions by adding
information about what a user's message history includes, about
new bot users not generally being subscribed to streams, and
about the specific `streams:public` narrow.

Updates the main descriptions for the `/get-messages` and
`/check-messages-match-narrow` endpoints.

Fixes #19477.
2022-10-28 17:32:44 -07:00
Alex Vandiver 12a5317b8c bootstrap-aws-installer: Switch to an IMDSv2-compatible URL.
We don't use the token we request for anything, but a straight GET
request would fail in an IMDSv2-only environment.
2022-10-28 16:52:54 -07:00
Alex Vandiver 721a1d7a10 bootstrap-aws-installer: Drop "credential_source" in .aws/config.
Setting `credential_source` is used when assuming role credentials --
that is, when running as one role, use the AssumeRole right to become
someone else.

The AWS command-line tools only do this if `role_arn`, the role to
assume, is also set -- if it is not set, it transparently falls
through to IAM role attached to the EC2 instance profile.  However,
with the `aws-sdk-go` package, used by Teleport, this configuration
produces an error.

Remove the `credential_source = Ec2InstanceMetadata` line, which isn't
necessary for the AWS CLI, and interferes with Teleport operation.
2022-10-28 16:52:54 -07:00
Alex Vandiver 6662a3bac4 teleport: Switch to the new apt host for Teleport.
The apt.releases.teleport.dev repository is deprecated as of the
release of Teleport 11, and has been replaced with
deb.releases.teleport.dev[1].

[1]: https://goteleport.com/docs/changelog/#deprecated-old-debrpm-repositories
2022-10-28 16:52:54 -07:00
Alex Vandiver 88fcf6862f bootstrap-aws-installer: Add ed-25519 host key. 2022-10-28 16:52:54 -07:00
Alya Abbott 7d95f5caea help center: Clearly refer to mobile apps on /help/mobile-notifications.
Addresses user confusion about whether "mobile notifications" might refer
to text messages.
2022-10-28 11:41:11 -07:00
Sahil Batra 2a8b7412ff url_encoding: Use user name instead of email in personal_narrow_url.
This commit updates the urls for personal narrow sent in email
notifications to be of form "{user_id}-{encoded_full_name}" to
make it consistent with the urls that we use for such narrows
in webapp which were recently updated in b4eddad for improving
performance. We encode the full name in the same way that we do in
webapp by replacing the url characters encoded by browser with "-".
2022-10-28 09:47:43 -07:00
Mateusz Mandera a410f6b241 do_mark_all_as_read: Split up the work into batches.
Fixes #15403.
2022-10-27 16:59:54 -07:00
Mateusz Mandera ef468322f1 test_openapi: Fix status code passed to validate_... in test_attributes.
It doesn't seem to make sense to append _{number} to the status code in
that arg, because the resulting string stops looking like a status code
and actually makes this test fail in the follow-up commit with the
confusing error message of

Unknown response http status: 2000

So this just seems like a bug.
2022-10-27 16:59:54 -07:00
aparna-bhatt 5189826f27 css: Improve the dialog_widget loading spinner visuals.
Previously, when you clicked the confirmation button in a
dialog_widget, we'd display a loading spinner on top of an ugly grey
button background.

Remove the ugly grey background color, while making sure the loading
spinner inside the button looks good and doesn't resize the button.

Fixes: #22002
2022-10-27 16:29:22 -07:00
Zixuan James Li 6f4047c679 unread: Extract old_unreads_missing.
This avoids post-initialization access to page_params inside unread.js.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-27 14:59:16 -07:00
Zixuan James Li 79b8219797 unread: Pop unread_msgs from page_params for initialization.
This change is made so that we are not accessing the global page_params
directly. Note that we also rename unread_msgs to params to match other
modules that follow this pattern.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-27 13:03:54 -07:00
Zixuan James Li b9f7edb58a unread: Stop accessing page_param.unread_msgs after init.
This adds a get_unread_message_count helper that returns the size of
unread_messages and replaces the usage of page_param.unread_msgs.count
elsewhere in the codebase.

Fixes #23334.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-27 13:03:54 -07:00
Alya Abbott 6c88ca91b1 help center: Update emoji reactions documentation.
- Document new option for toggling whether names are displayed.
- Add mobile instructions.
- Other organization and wording improvements.
2022-10-27 12:56:19 -07:00
Tim Abbott d47f29c2d6 reactions: Implement display_emoji_reaction_users setting.
This setting provides a more ergonomic experience when viewing a
message where only a small number of emoji reactions are present; you
no longer need to hover over the reaction to see who reacted, which is
often quite important to understanding what it means.

We added this setting (visible in the development environment only,
and implemented on mobile) a few months ago; so to complete this
feature, we just need to add the frontend rendering/live update logic
and publish it.

As documented in the code comments, the current rule is "messages with
3 or fewer reactions" for which messages will display the names of the
users reacting.

The previous set_reaction_count API made sense when the display of a
given reaction was a pure function of its data. However, we will soon
be making it a function of the total number of reactions on the
message.

Thus, view functions to update reaction display now need to call a
shared update_vote_text_on_message function in all code paths, even
code paths like "add the first vote for a reaction" and "remove the
sole vote of a reaction" which previously did not need to call
set_reaction_count.

Fixes #20890.
2022-10-27 12:41:51 -07:00
Tim Abbott 98c478d994 reactions: Pass full message objects to view functions.
This is not the cleanest API, but it will be necessary in the next
commit in order to update the message's rendering of other emoji.
2022-10-27 12:41:51 -07:00
Tim Abbott 02b670fa66 reactions: Use clean_reaction_object API for view functions.
This substantially reduces the complexity of parameter passing in the
reactions rendering code path.
2022-10-27 12:41:51 -07:00
Tim Abbott b346e492c8 reactions: Reorder make_clean_reaction. 2022-10-27 12:41:51 -07:00
Tim Abbott 545a31e0b1 reactions: Delete stale message.reactions after cleaning.
Also update some comments explaining the core data model and approach
for set_clean_reactions.
2022-10-27 12:41:51 -07:00
Tim Abbott 5bd074bb36 reactions: Use a better variable name for clean_reactions objects.
We may want to rename clean_reactions to something else, but the name
`r` is pretty confusing for an object that isn't a single reaction,
but instead an object detailing all the reactions on a message.
2022-10-27 12:41:51 -07:00
Raghav Luthra a8fc195402 reactions: Change color of reaction counter from blue to black.
The blue font color on the vote_text beside the reactions in
light mode made it seem like a link which it's not, so it has
been changed to regular font color.

We preserve the blue font color on hover, matching the add-reaction
button.
2022-10-27 12:41:51 -07:00
Raghav Luthra 477a1b5789 reactions: Refactor CSS to prepare for longer vote_text.
This fixes a bug where in narrow windows, long vote_text could extend
beyond the body of the reaction's allocated area.

It also provides a matching right margin around the count/name inside
the reaction pill, which looks better when we have strings inside them.
2022-10-27 12:41:51 -07:00
Raghav Luthra 1b75151a97 settings: Fix display_emoji_reaction_users org setting save/discard.
Follow-up to commit 22a5d008c1.

The new display setting introduced in above commit was not registered
properly and enabling/disabling it from Organization settings > Default
user settings did not display a "Save/Discard" widget. This has been
fixed by modifying the `settings_org.get_subsection_property_elements`
function.
2022-10-27 12:41:51 -07:00
Aman Agrawal b23931bd66 recent: Fix unread counts wrappings to next line in long topic names.
We limit the word break to only text present inside the `a` tags
so that it doesn't apply to unread count.
2022-10-26 21:34:36 -07:00
Tim Abbott 6f8476ced9 templates: Improve unsupported DevAuthBackend error page.
Previously, we didn't mention the possibility that this could have
been disabled by an organization administrator.
2022-10-26 21:16:31 -07:00
Aman Agrawal 45f35a464e stream_list: Reduce stream header's height when scrolling elt into view.
Since stream header is now sticky, we need to reduce it's height
when calculation position of the element we want to scroll into view
so that it doesn't hide under the sticky header.
2022-10-26 13:47:08 -07:00
Aman Agrawal fc70921eeb scroll_util: Add support for sticky headers.
When calculating position of an element, we now take into account
the height of the sticky headers too.
2022-10-26 13:47:08 -07:00
Aman Agrawal 470553b457 left_sidebar: Fix some PMs not being displayed when PMs are zoomed in.
We added sticky headers above the PM list but forgot to subtract
it from the max-height of the scrollable container.
2022-10-26 13:47:08 -07:00