Commit Graph

59572 Commits

Author SHA1 Message Date
Aman Agrawal 13f2e7b7be help: Fix help center loading scrolled down.
We were trying scroll the highlighted element but it also scrolls
the parent elements leading to scrolling of the help doc.

We don't need to scroll here at all actually since focused element
is scrolled to be visible by default. Tested in chrome, firefox
and safari on mac.
2024-07-11 10:01:04 -07:00
Prakhar Pratyush 909a2efb43 channel: Don't show "You subscribed to" bookend on channel creation.
Three events i.e. 'stream create', 'subscription add', and
'message' event are received by client on channel creation.

Earlier, we were narrowing to channel while processing the
'stream create' event. This was resulting in fetching messages
for that narrow even before adding subscription. This resulted
in a bug where "You subscribed to" bookend was visible in the
message feed after the "channel events" message.

This commit updates the logic to narrow ONLY after adding
subscription i.e. while processing "subscription add" event.

Note: A channel creator who is not going to subscribe to the
channel themselves is NOT narrowed to the channel view.

This fixes the incorrect behavior.
2024-07-11 09:51:55 -07:00
Shubham Padia 6c152b3adc account_settings: Make change password similar to other setting buttons.
Fixes #30691.
We've removed the pencil icon and renamed the button to `Change your
password`. We've also removed the `.small` and `.btn-link` classes.
We also changed the `Password` label to use the `.settings-field-label`
class, same as the other labels for settings.
2024-07-11 09:49:27 -07:00
Shubham Padia 73e9d9da64 account_settings: Make change email similar to other settings buttons.
We removed the pencil icon, `.btn-link` and `.small` classes.
We also changed the `Email` label to use the `.settings-field-label`
class, same as the other labels for settings.
2024-07-11 09:49:27 -07:00
Shubham Padia 6085212574 settings: Make change language button similar to other settings buttons.
We've removed the pencil icon and removed the `.small` class from the
button.
This setting button is being used in two places: Changing your personal
language and changing the org-wide language for emails. That is why
we have used the `Change the language` generic tooltip instead of
`Change your language` tooltip.
2024-07-11 09:49:27 -07:00
Shubham Padia 08ee4be121 account_settings: Remove unused id and classes for password field.
`.change_password_button` and `#pw_change_link` were unused.
I've not checked for any other unused classes in this page, only
the password field. This was noticed when trying to make a layout
change for the password field and the change was moved to a preparatory
commit for the same.
2024-07-11 09:49:27 -07:00
Sayam Samal 6b5618b9d8 stream_popover: Link to channel settings' "Personal" tab conditionally.
This commit adds a link to the "Personal" tab of the channel settings
modal from the "Channel settings" link in the channel actions popover
when the user doesn't have the permission to change the channel
permissions.

Fixes #30529.
2024-07-11 09:44:57 -07:00
Sayam Samal 15e26b9f32 stream_popover: Enable popover for spectators.
This enables the stream popover for spectators, by unhiding the triple
vertical dots button in the stream sidebar row.

In the spectators' version of the popover, we only show the
"Copy link to channel" option.

Fixes part of #30529.
2024-07-11 09:44:57 -07:00
Sayam Samal 2c604666f9 stream_popover: Add menu option to copy channel link to clipboard.
Now that the channel name in the left sidebar links to the topmost
topic, we add a new menu option that lets us copy the channel feed link
to the clipboard.

Fixes part of #30529.
2024-07-11 09:44:57 -07:00
Sayam Samal b3be4150d9 stream_popover: Reorganize the menu options in the channel popover.
This commit reorganizes the channel actions popover to group related
actions together.

As noted by Alya Abbott in CZO, the logic behind the grouping is as
follows:
* The top section is things you might do as part of your workflow for
  using Zulip.
* The second section is for managing the channel itself.
* "Change color" is kept independently in the last section because of
  how the color picker takes over a big chunk of the menu when opened.

Fixes part of #30529.
2024-07-11 09:44:57 -07:00
Sahil Batra c313a85e25 stream-settings: Fix stream privacy update event handling.
There was a bug when updating stream privacy with message list
not narrowed to a stream as 'narrow_state.stream_sub().stream_id',
added in 933195f7a5, tried to access stream_id field even when
`narrow_state.stream_sub()` returned undefined.
2024-07-11 09:27:59 -07:00
Alex Vandiver d5a4941691 django: Switch to .alias() instead .annotate() where possible.
When using the sub-expression purely for filtering, and not for
accessing the value in the resultset, .alias() is potentially faster
since it does not pull the value in as well.
2024-07-11 09:26:23 -07:00
Alex Vandiver e1a9473bd6 thumbnail: Log and revert to gravatar on migration failure.
This is preferable to leaving the user with a broken avatar image.
2024-07-11 07:31:39 -07:00
Alex Vandiver 536cf0abc8 thumbnail: Be slightly more specific about our exception catches. 2024-07-11 07:31:39 -07:00
Alex Vandiver b53a33a5bc thumbnail: Properly re-derive Content-Disposition for original uploads. 2024-07-11 07:31:39 -07:00
Alex Vandiver 1f9925b1e3 thumbnail: Skip avatars which have already been migrated. 2024-07-11 07:31:39 -07:00
Alex Vandiver a4981c13f7 thumbnail: Skip avatars whose old versions are missing. 2024-07-11 07:31:39 -07:00
Alex Vandiver 4d3d3efcf1 thumbnail: Newly-thumbnailed avatars are all image/png. 2024-07-11 07:31:39 -07:00
Alex Vandiver a9d1adadb7 thumbnail: Add or move progress earlier in loop.
This makes the counts correct and consistent.
2024-07-11 07:31:39 -07:00
Alex Vandiver 382cb5bb13 thumbnail: Lock down which formats we parse. 2024-07-11 07:31:39 -07:00
Alex Vandiver 4bc563128e thumbnail: Use a consistent set of supported image types. 2024-07-11 07:31:39 -07:00
Alex Vandiver a091b9ef81 thumbnail: Provide a more explicit hint than "Bad". 2024-07-11 07:31:39 -07:00
Alex Vandiver 5ae34dc42b slack: Store the content-type of realm icons. 2024-07-11 07:31:39 -07:00
Alex Vandiver ff90e5355f upload: Pass down content-type of realm icon/logo to backend.
This saves having to try to re-derive it from the file extension,
which may be ".original" in some cases.
2024-07-11 07:31:39 -07:00
Alex Vandiver b050c644e3 data_import: Mark downloaded png avatars as image/png.
This means that, when imported, they have the right content-type set
in S3.
2024-07-11 07:31:39 -07:00
Alex Vandiver 51766271a1 data_import: Remove a reference to removed code.
The only use of the code was removed in c685d36821, and the code
itself was removed in 4206e5f00b.
2024-07-11 07:31:39 -07:00
Tim Abbott 731391c019 i18n: Update translation data from Transifex. 2024-07-10 22:46:18 -07:00
iks1 10c15de0c6 popovers: Simplify instructions for moving topics/messages.
Modified the `Select a channel below or change topic name.`
instruction in `move topics/move messages` modal.
It's not necessary and can be confusing when user does not
have permissions to change the channel and topic name.

1) On the `Move topic` modal, dropped the line
2) On the `Move messages` modal, replaced the
   line with `Move messages to:`

Fixes #30055.
2024-07-10 20:35:40 -07:00
Vector73 a43d8159a9 exceptions: Update DM permission error string. 2024-07-10 18:43:50 -07:00
Tim Abbott e64b67525f docs: Update changelog with recently merged changes.
I also did a sweep for references to "streams" in the 9.0 release
notes.
2024-07-10 17:49:35 -07:00
evykassirer 4280524904 search pills: Expand group DM pill vertically when it overflows. 2024-07-10 17:44:04 -07:00
evykassirer 9c45e43706 search pills: Prevent overflow in the typeahead for very long pills. 2024-07-10 17:44:04 -07:00
evykassirer 7cb00d171e search pills: Prevent overflow for very long pills. 2024-07-10 17:44:04 -07:00
roanster007 dc1fb85cf0 popovers: Fix page reload on enter in move message modal.
Previously, when enter was pressed in the move messages
modal, it used to trigger page reload because the enter
event of the modal was not handled.

This commit fixes it by adding the "form_id" field while
launching the dialog_widget.

Fixes #29655
2024-07-10 16:20:25 -07:00
N-Shar-ma 9a8f1c9b5d css: Exclude lock icons in dropdowns from being unnecessarily pulled up.
This fixes the issue where the lock icon, most noticeably in the compose
recipient stream dropdown, was placed too high.
2024-07-10 15:13:08 -07:00
Sayam Samal 98c825ebfe send_later_popover: Rename "Drafts" -> "View drafts".
This makes the drafts option more consistent with the rest of the menu
options, which use the imperative mood.
2024-07-10 15:05:37 -07:00
Sayam Samal e0ec522f70 send_later_popover: Redesign popover and add accessibility improvements.
As part of the popover menu redesign, this redesigns the compose send
options popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.

Fixes #25117.
2024-07-10 15:05:37 -07:00
Aman Agrawal e5e5ba6cea css: Scale typeaheads / dropdowns with font size.
Fixes #30780

Adjusted both width and line height of typeaheads and dropdown widgets
to scale font size.
2024-07-10 12:56:58 -07:00
Aman Agrawal a5c922a99f search: Remove unintentional propagation of CSS properties.
This doesn't introduce any bugs yet but it can if left unchecked.
2024-07-10 12:56:58 -07:00
Aman Agrawal b3e0cc61e5 css: Remove old typeahead css.
We already have the behaviour for this that we want in typeahead.css.
This CSS produces problems for rendered markdown as it propagates
to it.
2024-07-10 12:56:58 -07:00
Sayam Samal 1b1f2411d8 user_group_popover: Redesign popover using the new "popover-menu" theme.
As part of the popover menu redesign, this commit redesigns the user
group info popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.

Fixes part of #28699.
2024-07-10 12:54:05 -07:00
Kislay Verma cc7df6d85b presence: Sync presence indicators across the frontend.
User circles indicating their presence are now synced across
all the places they appear, except for:
- navbar_personal_menu_popover - since the status
   there will never change.
- typeahead_ist_item - because it is short-lived.

Fixes #30536
2024-07-10 11:01:44 -07:00
Prakhar Pratyush d92eb77c98 add_subscriptions_backend: Add 'transaction.atomic' decorator.
This commit adds an 'transaction.atomic' decorator to the
'add_subscriptions_backend' view thus making the db operations
within the view atomic and helps to avoid race between events sent.

In tests where we make POST requests to this view, we have
wrapped the API calls with a transaction.atomic() context
manager. It helps us with NOT rolling back the entire test
transaction due to error responses.
2024-07-10 10:50:37 -07:00
Prakhar Pratyush 9c614531fb test_subs: Use 'common_subscribe_to_streams' helper function.
In 'test_subs' we were making POST request to add
subscrption using 'self.api_post'.

This commit updates the code to use the test helper
function 'common_subscribe_to_streams' instead.

This prep commit will also help us to avoid adding
'transaction.atomic' context manager to these API calls
individually in the case of error response in the next commit.
2024-07-10 10:50:37 -07:00
Prakhar Pratyush b0dbfc96a3 stream_settings_ui: Fix a stale comment.
In 30d15d58fb, we made the
change to redirect to the newly created stream interleaved
view instead of "stream events" topic of that stream.

The comment related to it was not updated accordingly.

This commit updates the comment.
2024-07-10 10:50:37 -07:00
evykassirer 992ae6fdaf search: Vertically center search pills in search bar. 2024-07-09 18:37:05 -07:00
Greg Price f6eed83ada docs: Update to point to #mobile-dev-help where appropriate. 2024-07-09 18:35:23 -07:00
Greg Price 5ac420e097 docs: The mobile analogue of #backend etc is #mobile-team. 2024-07-09 18:35:23 -07:00
Greg Price 5e75776f27 docs: Mobile UI design is discussed in #mobile, not #mobile-team. 2024-07-09 18:35:23 -07:00
Kislay Verma 825590dde2 copy_and_paste: Refactor `is_safe_url_paste_target`.
This commit separates the checking of whether the cursor is
at markdown link marker into its own function, which will be
used in #29136 to decide whether to format pasted urls or not.
2024-07-09 17:24:52 -07:00