These never happen in practice since util is near the
end of the alphabet, but if you had run the tests in
reverse order, you would have seen this leak.
This leak was introduced in the efb2a5a38d commit.
We re-require templates.ts before testing each
new test module during the node tests.
This makes it so that if we make mocks in two
different tests, where such mocks influence
how the Handlebars helpers work, then both
tests will have registered their own copies
of the Handlebars helpers.
In general we want to mimimize the amount of setup at the top
of a test module and just let individual tests explicitly
mock what they need to mock.
The `override` helper has the advantage that it avoids dead
code. For example, if the way we invoked the list widget
here no longer required sorting, the unit tests would complain
about the crufty override, whereas the previous code doesn't
really have that kind of future-proofing.
We now just do the following in the mocking:
- capture which items are passed into the list
widget
- simulate the call to modifier_html to exercise
the template rendering
When editing a user or bot profile via the Manage User or Manage
Bot overlay, an error was not hidden after receiving a successful
response from the server. This commit ensures the error is hidden
upon a successful response.
This commit refactors code to test group permission settings
while creating stream and changing the setting for existing
streams efficiently and avoiding duplicate code for each
setting.
Since the variable value can also be an object if setting is
set to an anonymous group, it is better to rename the variable
in user_has_permission_for_group_setting from setting_group_id
to setting_value.
Similary in is_user_in_setting_group, setting_group variable is
renamed to setting_value since value passed is not a UserGroup
object.
A small delay before showing up of the action buttons
is required so that there will be no flickering when
mouse just slides over the message headers.
Fixes part of #26852.
Added `opacity` CSS with `:focus-within` pseudo-class to
the recipient bar. This keeps the action button visibility
consistent with the action UIs - topic editing UI and notification
menu.
Fixes part of #26852.
Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
- Toggles the CSS rule `opacity: 0` on the recipient bar
controls when the bar is hovered.
- If the recipient bar is sticky, then the controls are always visible.
- In case of conversation views, the recipient actions remain visible.
Fixes part of #26852.
Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
When the current view is a conversation view, add the class
`is-conversation-view` to `div.focused-message-list`.
The check is done when `message_list_view` is rendered, which is
in the `render()` function.
Fixes part of #26852.
Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
There used to be 5px bottom padding, now removed as part of #31177.
Looking now, both the compose textarea and preview div have 5px of
margin and no bottom margin and no padding, so we don't need to
account for that in height calculations. This isn't causing bugs
on main, but once we change how preview height is adjusted, to
better support image previews, it would cause a bug where the
preview is 10px taller.
More discussion here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/compose.20preview.20image.20bugs/near/2011708
GitHub generates spurious edited events on hiding/unhiding a comment,
and on clicking "edit"/"update" without any changes, when the
comment "body" contains certain specific characters.
Instead of sending a notification message, we suppress those edge cases
by comparing the "body" content of the comment and changes in the event
payload.
Fixes#31042, #26136.