This old third party library added support
for a "mousewheel" event to detect scrolling.
However, it is not compatible with jQuery 3
and is obsolete now that there is a standard
"wheel" event that accomplishes the same thing.
Unicode emojis when rendered should display canonical short name.
Similarly, the alt text should be of the format `:<short_name>:`.
For both of these we currently display the actual unicode symbol.
As some systems don't have the fonts necessary for displaying them
properly, they are rendered as empty square blocks. This commit also
ensures that the markup generated for emoji generated by canonical
name and by an unicode emoji is same.
Fixes: #5555.
In this commit we remove a small piece of dead code from
check_stream_for_send() function and also rename it to
check_unsubscribed_stream_for_send() which makes more sense.
- Move the chevron and the message count a bit towards
left.
- Make changes in the position of message count in
global_filters to align it with of message count in
stream_filters.
This fixes the overlapping of stream popover with the
scrollbar in the stream list.
Fixes: #5552.
On receiving a `peer_add`/`peer_remove` event we were performing a
subscribers list re-rendering even when the stream settings form was
not open which was causing a traceback. This commit fixes this behavior
by first checking if the corresponding stream settings form is open and
performs a re-rendering only when it is open.
The Swagger specification indicates that all operationId values should be
unique. However, SwaggerParser doesn't complain during validation if that
doesn't happen, so this commit adds our own method to identify these
cases.
Also, the violations of this rule have been fixed.
The validations that autocomplete_checks did were already managed by
tokenize_compose_str and the main "if" statements in
compose_content_begins_typeahead.
Since util.extract_pm_recipients() won't return a recipient if it's only
composed by whitespaces, considering such recipient in the matcher is
unnecessary.
Instead of having a custom (duplicate) matching function in
search suggestion, it was refactored to use the function in
people.js. This also gets the diacritic-ignoring feature
of the function in people.js.
Fixes#5315.
On editing a multi-line message inserting an emoji or stream name,
the autocomplete was incorrectly sending the cursor to the the end
of the message.
Fixes: #5515.
Having get_full_time produce a date string non-compliant with RFC2822 or
ISO 8601 caused problems when showing edition timestamps on a message's
edit history.
Now it returns an ISO 8601 date string (1978-10-31T13:37:42Z).
We were incorrectly amending the HTML directly whenever a subscriber
was added/removed. For updating any list which is being managed by
`list_rendering.js`, instead of modifying the HTML directly we should
just update the data in list render instance and perform a re-render.
Fixes: #4812.
Flaskbotrc is a file containing config of all active
outgoing webhook bots. It is used to provide configuration
of all active outgoing webhook bots to zulip-bot-server.
For bots and users who have not logged in for a long time the presence information is not known. For the these users make the presence indicator hidden.
The code now handles undefined stream_ids for realms that
don't have a notifications stream. It also removes unneeded
translation code on the stream name.
For the pencil icon to appear, message_unhover has to be called before
message_hover (both in ui_init.js). This happens when the mouseleave
event is triggered on a row. But, when clicking the save button and
the edit box is hidden, the mouseleave event is not triggered and
hence message_unhover not called.
Fix this with a manual mouseleave event.
Fixes: #4287.
The narrowing option from_reload was only used in
conjunction with use_initial_narrow_pointer, but the
latter option already takes into account whether a
reload happened.
Added a dropdown in the organization settings page with a search-box and
required styles. Also added an element to disable it. Added a method to
populate the dropdown using list_rendering.js. Also altered response to
the event of deletion of the notifications stream on the frontend. On
selection of a new stream or on clicking 'Disable', a patch request is
made with stream-id to /json/realm.
Fixes: #3708.
A deactivated realm emoji should neither be accepted further as a
reaction nor its further occurences in a message be rendered as an
emoji. However, all the old occurences should continue to render
normally.
This involves updating filter.js, mostly. The
tests were updated appropriately for this change,
which also involved changing a caspar test for
narrowing.
This was never a feature in the old search_suggestions
version, so a new helper function for it was added.
Relevant tests were also added, maintaining 100% coverage.
The get_person_suggestions and get_group_suggestions functions
were updated to the new system. Support for negation is also
added in the new system.
Relevant tests were also updated. Also, note that the function
get_private_suggestions was removed, as it was rendered
obsolete by these updates.
Special filter was updated to work even when it is not the first
token in a search query. Furthermore, the default query was
moved around to work with the changes to come for the new
suggestion system.
A test also had to be modified to work with the new system.
Now we use a consistent approach to find the list items for
Home/Starred messages/Mentioned in the upper corner.
In particular, we get rid of the complicated
iterate_to_find() function.
Add `remove_alert_word()` function which uses the correct data flow
while removing an alert word.
`alert_words_ui.js` was structured differently from most of the other
settings. It was not using the triggers from the server for running
the success/failure handlers.
We remove the `page_params.alert_words` since `alert_words.words`
is the sole source of alert words. Use of `page_params.alert_words`
could lead to bugs when alert words are updated since it is not updated.
This fixes the faulty spacing around the various icons in
stream accessibility option under the create new stream modal. This
regression was introduced in 7e71bf.
- Remove `perfect-scrollbar` from `static/third` and fetch it from npm.
- Upgrade `perfect-scrollbar` to 0.7.1.
- Bump up the `PROVISION_VERSION` to 5.6.
Changed `wheelSpeed` in "static/js/scroll_bar.js" to 0.5, because when it
20, the scrollbar scrolls very fast.
Changed 'wheelSpeed' in "static/js/emoji_picker.js" from 25 to 0.68
(based on tabbott's testing of scrolling through the emoji list).
Part of #1709.
The file input used for attaching files and images was not being reset
after each use. This resulted in irregular behaviour (sometimes failure)
in attaching the same file consecutively.
This fixes the bug in the reset method.
Fixes#5074.
This removes the old base button style which was a blue button and
kills the unnecessary .white class which was essentially just acting as
the new button base.
This then removes all references throughout the settings/subscriptions
pages to those button styles.
This also fixes the strange button styles that changed the :hover and
:active opacity to 0.05 which led to unpredictable results on various
backgrounds.
Added a function to add styling to secondary item of typeahead. Also,
used this function to alter the style for emails in the @-mention
typeahead to match the style used for stream description in #**stream**.
This also affects typeaheads for PM recipients and adding new users in
stream settings.
Add documentation for weather update through Zapier.
Contains tests and fixtures for weather example.
With minor fixes, docs migration to Markdown, and
rebasing by Eeshan Garg.
Introduce Swagger UI and the Swagger/OpenAPI specification. Explain
the structure of zulip.yaml and show examples of different sections
of the file.
This is a new file in /docs not yet included in the Read the Docs
table of contents. Where it should go should be determined as we iterate
on the Swagger UI integration and expand REST API doc coverage using it.
For more on Swagger UI and how Zulip uses it, see:
https://github.com/zulip/zulip/issues/3474https://github.com/zulip/zulip/pull/3397
With some minor tweaks to advertise this by tabbott.
* change emoji-container to 'flex' display inorder to support ordering
of the contents (emojis).
* order emojis after each filter. The ordering is based on search string
and is similar to the ordering in emoji typeahead.
Fixes#4806.
In prefix sort, shifting of objs list to iterate through the elements
caused the 'emoji_show_list' to be emptied each time it was passed as
argument for sorting.
This modifies prefix sort to prevent it from modifying the objs list passed
as argument - changed it to normal iteration rather than popping
the elements from objs list.
Rationale: For the more off-to-the-side edit history view, changes
are easier to digest by highlighting deleted content in red followed
immediately by added and changed content in green.
TODO: Toggle for showing the edited messages without highlighting;
deleted content would not be shown in this view.
Altered message_edit.start to check for message.raw_content before
retrieving the same from the backend.
With tweaks by tabbott to update, rather than delete, on repeated
edits.
Fixes: #4404.
Add 'Type of bot' option for bots by adding dropdown option in
settings->"Your bots". For now, this allows creating incoming webhook
bots in addition to default bots.
This will enable users to add a bot as an incoming webhook
(in addition to add full-featured bots).
With various minor tweaks and cleanups by tabbott.
Fixes#2186.
Create an array of all user notification settings and loop through it
to update notification settings and display results.
Formatting tweaked by tabbott.
The function maybe_add_update_list_entry() will push objects instead
of arrays onto the list of timestamps that need updating. This
should improve readability.
The floating_recipient_bar is cloned from recipient_bar elements.
The cloning created elements in the DOM with duplicate id
attributes, specifically <span id="timerender{id}">, which
contains the date of the message stream. The timerender span
will now use class="timerender{id}" instead.
Fixes#4997.
Fixes#5128.
Force display of the top-most recipient_bar's recipient_row_date
when the floating_recipient_bar is just about to overlap and
becomes hidden while user is scrolling.
Fixes#4844.
Previously, if we had both a date and a subscribe bookend, they would
appear in one order after new messages were sent (bookend_bottom of
the top group), and another after a reload (bookend_top of the bottom
group). This makes the experience consistently a bookend_top.
Previously, this hotkey was not correctly using the use_first_unread
option, and thus would take you to the close to your pointer, not your
first unread private message.
Fixes#5238.
When receiving the first new message of a new day, we were previously
not showing a date separator line before the message.
Fixes a regression introduced
in 00c7f7d42f.
On clicking a notification, the web app was not being narrowed to the
message topic on firefox. We now narrow to the message topic if a user
clicks on a notification. It was working correctly on Google Chrome.
Fixes: #5220.
Given a stream id, we now find list items using the internal
data structures we created when we built the sidebar, rather than
using a jQuery selector.
The realm avatar icon on the login and registration pages was
being set as a background image, which could vanish in high
contrast mode in many browsers. Converted it to an img tag and
verified that it is still styled correctly. I think the empty
alt attribute (to remove it from the audio description) is
appropriate in this context, since the realm name and description
are already provided immediately afterwards in the page content.
Fixes#4889.
In pm_conversations.js, added function to make a user a PM partner and
another function to check if a user is a PM partner. A PM partner is
someone with whom the user has been in a PM with.
In recent_senders module, added a data structure to hold timestamps of
users' latest message in a topic. Also added a function to compare 2
users based on above timestamp. Added a function to process messages for
the data structure and a call in add_message_metadata. Also added node
tests for insertion of data into recent_senders.senders.
Realm emojis uploaded before the migration to store the emoji author
information was done don't have any author information. Such emojis
if listed on the settings page caused a traceback.
Fixes: #5133.
This fixes a regression where we removed a call to
unread_ops.process_visible() inside of stream_list.js. Now
we call it from within narrow.activate() in the the
maybe_select_closest() callback.
When the emoji settings page was reopened after uploading a realm
emoji without doing a page refresh, the uploaded emoji disappeared
from the emoji list. This was so because the emoji settings page uses
`page_params.realm_emoji` to render the emojis which was not updated
when a emoji was added.
Fixes: #5130.
This change should lead to clearer tracebacks when our
assumption about the stream list's list items get
violated, and we also short circuit some code in the
caller that tries to scroll to the active stream.
In stream_list.js we have some code to handle narrow activations,
and we were calling unread_ops.process_visible() only for
stream activations, not for PM-related activations, etc., so
our approach was inconsistent.
It also turns out that the call is redundant, since we call
unread_ops.process_visible() when the message pane scrolls as
part of updating the content.
Ideally, we want a more rigorous approach where we make this
call precisely when the new messages become visible to the user,
but the purpose of this fix is to de-clutter the stream_list
logic.
This makes it possible for Zulip administrators to delete messages.
This is primarily intended for use in deleting early test messages,
but it can solve other problems as well.
Later we'll want to play with the permissions model for this, but for
now, the goal is just to integrate the feature.
Note that it saves the deleted messages for some time using the same
approach as Zulip's message retention policy feature.
Fixes#135.
If a realm is configured to allow any user to upload a realm emoji
then that user should also be allowed to delete the emoji in case
he feels it doesn't look good or if he uploaded a wrong emoji file.
This commit tweaks the realm emoji settings UI to allow an user who
uploaded an emoji to delete it.
Fixes: #4761.
This moves all the code dealing with emoji_picker
navigation and click/enter events to emoji_picker.js.
Some of the code still delegates back to reactions.js
in some way.
The navigate() code really does nothing reaction-specific,
nor does filter_emojis(), nor do some of their helpers.
This was mostly moving code, but I also did some
s/reaction// or s/reaction/emoji/ in names.
We now call the function toggle_selected_emoji(), and it
is simpler in these ways:
* We get the selected emoji more directly.
* We reuse code in toggle_emoji_reaction().
This change sets us up to de-duplicate some code. It
changes behavior for the edge case situation where
you had the reaction menu open but then decide to
click on one of the existing reactions. This change
closes the emoji popover, which is probably the
correct behavior.
This commit splits out some helper methods to make it easier
to test:
get_reaction_section
find_reaction
get_add_reaction_button
update_existing_reaction
insert_new_reaction
timerender.js render_now() will always include older
years when rendering the date stamp on the recipient bar
and the date rows above messages.
Fixes#4843.