Instead of relying on different functions to get error messages,
we use `validate` to get the error message for the current compose
state.
This fixes a bug where compose tooltip was not defined when
compose state was not valid.
(cherry picked from commit 01c5197dd9)
We now use `disabled-message-send-controls` class to control
the disabled status of send button. So, this is not required.
(cherry picked from commit ad0b616bbd)
This is follow-up commit for d00b4cb0bd,
which updates the padding of the banner label and banner close button
to accommodate the previous font size change.
(cherry picked from commit 836e04fac8)
This commit converts the pixel values to em instead to make the banner
scale better with the different font sizes.
(cherry picked from commit bf88426cd1)
If there were no users found for `find_team`, we need to provide
a default langauge for the email as one cannot be extracted from
`UserProfile` in this case.
(cherry picked from commit e6dd79f241)
Performance remains the same whether we're using the bulk function
underneath the function in question or not, this helps us avoid
duplication.
(cherry picked from commit 2e48293e4b)
We want this function to just use the bulk function instead underneath,
we add a query count check here so that when we do that replace in the
next commit, we can make sure that the query count has not increased.
(cherry picked from commit 0570bfa90c)
This function will be useful in finding out affected groups when
sending events for users gaining or losing metadata access when the
members of a user group change in any way.
(cherry picked from commit 139679cdb1)
This function will be useful in sending events for users gaining or
losing metadata access when the members of a user group change in any
way.
(cherry picked from commit 208ee1b8d9)
Since the strings like "Subscribed" will be translated to other
languages, they will not work correctly when compared with
these values in other languages.
Fixed by using data values that are not translated.
(cherry picked from commit 3429898dbf)
We were not using `filter_out_inactives` and `pin_to_top` when
sorting stream in the left sidebar.
These were incorrectly removed in
1aee0ef98b.
Restored the original function and the places where it was used
to bring back original functionality.
(cherry picked from commit 67ff430e45)
When initializing the app or re-rendering left sidebar to update
the `demote_inactive_streams` property, we need to update
`filter_out_inactives` property first.
(cherry picked from commit 737acb1cb1)
The Django ORM query would not work correctly for pathological
DirectMessageGroups with no Subscription rows. When the Subquery gave
empty results, the UPDATE would set group_size to null - when the point
of the migration was exactly to make sure this column is always set and
allow making the column non-nullable in 0575.
Such DirectMessageGroups can occur as a result doing .delete() on all
UserProfiles that were in the group - or by doing realm deletion via
either .delete() or `manage.py delete_realm`.
The natural choice for group_size of these objects is 0. The simple SQL
query naturally achieves this result, without needing any special
handling for this case.
(cherry picked from commit 60e166bcd0)
This prevents the venv from ending up with references to /root.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit c517e95e6b)
This refactors `parse_migration_status` to copy the algorithm of
Django's `showmigrations` command instead of parsing its output. This is
done so that the code is not susceptible to breaking changes if Django
modifies showmigrations's implementation.
The previous `parse_migration_status` logic has been repurposed into a
test utility function (`prase_showmigrations`). It is used to verify
that the new `parse_migration_status` generates output identical to the
actual `showmigrations` command.
The `test_clean_up_migration_status_json` is removed because
`test_parse_migration_status` has covered that behavior.
Earlier, when `realm_mandatory_topics` setting was getting toggled,
the topic input box in composebox was not being live-updated to
align with the correspondning setting's UX.
This commit fixes that bug by making sure that placeholder and
other UI elements are updated accordingly.
This commit replaces direct `.css("visibility", "...")` calls
with `.addClass("visible")` and `.removeClass("visible")` to
manage the `$topic_not_mandatory_placeholder` visibility.
This improves maintainability by keeping styling in CSS.
This reverts commit 9243fa3d52.
This commit appears to have caused the same issue with the compose box
borders at other size/zoom configurations that may be more common.
We'll figure out a better fix and apply that.
Fixes#34010
From version 132, Firefox now defaults to not resize the viewport
content but only the visual viewport. While this works well in
Chrome Android, it creates a buggy experience in Firefox Android
where the compose box is hidden under keyboard.
To fix it, we rollback to resizing content when keyboard is shown
on Firefox Android.