Replaces the $("textarea#compose-textarea") selector with $textarea in
the `check_overflow_text` and `validate_message_length` functions. This
change allows $textarea to be modified in future commits to also support
the edit-message UI.
Adds general class names in `compose.hbs` so that these elements can be
more easily expanded for use in the edit message UI as well. These
classes will be used in the `check_overflow_text` function of
`compose_validate.ts`, allowing this function to handle both the edit
message UI and compose box UI.
Now a failure from assert_json_success and friends shows the full
server-side traceback from the JsonableError that caused the failure,
not just the test-side traceback for `AssertionError: 400 != 200 :
{message}`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We now allow setting following settings to "Nobody" group -
- can_add_custom_emoji_group
- can_create_groups
- can_create_public_channel_group
- can_create_private_channel_group
- can_delete_any_message_group
- can_delete_own_message_group
We are fine with nobody having these permissions as there
will be no major challenges for working of the organization
with these settings and admins anyways will always have
permission to change these settings.
Fixes#32401.
id_field_name was being used only to set the initial dummy
values for realm settings. We can directly add "_id" to the
setting name instead of having an extra id_field_name field.
As we now allow anonymous groups and settings can be set to any
set of users, there is no benefit in not allowing a setting to
be set to "Owners" group.
This commit adds the redesigned button styles to the codebase along with
with a storybook-style page in `/devtools/buttons` to view and test the
redesigned button component.
The redesigned button component, uses the `action-button` class to
follow Zulip's no-abbreviation policy, and to avoid conflicts with the
pre-existing `button` and bootstrap `btn` classes.
A button using the new redesigned styles, required two classes,
- First, the base `action-button` class which defines the structure
and behavior of the button.
- Second, a modifier class like `action-button-primary-neutral` which
defines the styles for the particular action button type.
Earlier, only group name were shown in user profile groups tab.
This commit adds a remove button to each group row if current user
has permissions to remove the user from groups.
Fixes part of zulip#32487.
This is a followup to #31965 where we added
support for a new syntax for message links.
The frontend markdown processor didn't local
echo the syntax properly, resulting in a
rendering glitch in the messages.
Updates get_plan_data_for_support_view to get the latest ledger entry
directly instead of calling make_end_of_cycle_updates_if_needed so
that viewing a support page doesn't trigger any changes to the
current and scheduled plans.
Updates next_invoice_date since, as of commit caba57fe1e, we no
longer consider the plan's billing schedule (annual or monthly)
when invoicing for additional licenses.
Add a common function for webhooks to convert multipart strings to dict.
This facilitates loading a multipart/form-data fixture as a file string,
and converting it.
This will allow testing integrations that use multipart/form-data,
and generating their example screenshots using a script.
Note that this only supports text fields, accommodation for binary files
is not included at the moment.
If the user is not a direct member, but a member via a subgroup, we will
show the list of subgroups beloging to that group which the current user
is a direct member of in a tooltip. The cursor on the checkmark will be
default in this case instead of a pointer.
In `Group settings` -> `Your groups` and `User Profile Popover` -> `User
groups`, we only listed groups that a user was a direct member of. Now,
we will also list groups that a user is not a direct member of, but
associated via a subgroup.
Fixes#32486.
We would show the leave group button if user was a member either
directly or via a subgroup. But that button is only applicable for
adding/removing a direct membership, so we will show the join group
button if the user belongs to a group via subgroup and not by direct
membership.
When the current user was part of a group through both subgroup and a
direct membership, leaving the group would only remove the direct
membership. But since the user is part of the group through subgroup,
`is_user_in_group` will be true inside `handle_member_edit_event` which
should only be triggered when a user is on another group edit panel and
they join a group via the left panel plus button. In that case, the edit
panel of the newly joined group should open.
Instead of handling this on event, where we could not tell who triggered
the event, the current user or someone else, we now handle this in the
success callback of `add_or_remove_from_group`.
Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/group.20panel.20error/near/1987891
We already allow a user to join the group if they can add members
to that group in the API, but it was not allowed in the UI. This
commit fixes the UI.