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.
The render_now() function in timerender.js will now return
an object instead of an array, which is then passed to the
functions render_date_span() and update_timestamps().
This should increase readability and extensibility.
Fixes#4820.
24cbd6113 changed the line height of katex HTML to avoid overlapping
lines in wrapped math displays. But the change also applied to inline
math, resulting in large vertical gaps in a multi-line paragraph
containing inline math elements.
This commit de-couples the PM code from Group code. It also
simplified some code related to finding parent elements by
both introducing local variables and removing unnecessary
selectors.
As the Swagger specification indicates, whether the properties inside a
model are required or not must be defined inside a separate "required"
field at the root of the model.
For fields like "parameters", that has to be specified inside each
parameter's key.
Create property_types object for realm settings. In set_up function,
iterate over property_types to find settings that were updated, send those
new values to the server, and report that the changes were made.
These ID elements in the message edit forms were never used, and were
they used, would have been broken anyway. We fix this by just
removing them.
Fixes#4913.
The error message under "Unexpected errors" was not the format we
received for any errors. We changed it to be msg and result to fit
with the results we got when for standard Zulip JSON errors.
This fixes the reactions to not break a new line by changing them from
a weird combination of “float: left” and “display: block” (inlined), to
just “display: inline-block”.
With fixes from Harshit Bansal for an issue with using the hotkeys in
a filtered popover.
Fixes: #4818.
Previously, the way the organization description textarea was
generated, there'd be a newline and ~12 spaces added each time on
reloaded the page and hit "save changes".
This change makes it so that the organization description only changes
when the user actually changes it.
This cleans up the styling of the organization and the user settings
components to be more responsive and have more consistent styling with
the rest of the overlays.
Apparently, there were not correctly disabled if you clicked on
"authentication methods" after opening the settings UI another way.
Everything worked fine if you just clicked them, already.
Due to differences between the codepoints of flag emojis in
`emoji_map.json` and iamcal's dataset, we need to patch the
css classes for the flag emojis temporarily until the migration
to iamcal's dataset is complete inorder to render them properly.
There is a difference between the images of flag emojis in our
old emoji farm and iamcal's spritesheets and since we have not
yet switched to using spritesheets for displaying emojis in
messages, there is a difference between the flag emojis as
rendered in messages and in emoji pickers.
This reverts commit c7f710b8d4.
Because the back end still stores muted topics fundamentally using
stream name as a key, trying to cut over the client to use stream
id was just making things more brittle. Mutes would work after
renaming the stream, which was progress in the change that we
revert here, but only until page load. The other problem, which
is more severe, is that the order of page loading functions would
cause no mutes to happen at page load time. This could be fixed
to some degree, but we should do a deeper fix on the back end.
Previously, the sum (capital sigma) operator would become
misaligned so that the lower and upper bounds are placed in
the wrong location. Changing the line height fixes this alignment.
Also, previously, wrapping long lines of TeX did not work, as often,
the different lines of math would overlap with each other.
Fixes#4657.
We should be able to eventually further clean this up to do nothing,
since we now don't have tabs over than the home tab. But I'm leaving
that for a future issue.
These date from long before the settings UI was restructured as an
overlay. Now, instead of ensuring that error messages are visible,
they just scroll the message feed incorrectly.
Fixes#4810.
There's no advantage to doing a small batch size towards current here,
since latency isn't an issue at this point, and performance on the
server side generally favors larger batch sizes.
This also will make it significantly harder to start getting 429 rate
limiting errors when loading when far behind current.
A formal date string will be assigned to the title attribute of the
recipient_row_date and date_row elements.
e.g. Wednesday, April 5, 2017.
Fixes#4663.
This is system unfortunately has a rather complicated calculation to
compute the offsets correctly, but the net effect here is that the top
section of the Zulip window is much more space-efficient.
Shrinking the tab bar underpadding, part of this change, fixes#4444.
We only need the underpadding to be as tall as the space above the
floating recipient bar, which is definitely less than 10px, so I don't
anticipate regressions caused by this.
When you create a stream, there was always an "Announce stream"
option that would be enabled for public streams.
We are about to make it so that we never send PMs to announce
new streams to folks, so the only mechanism will be sending a message
to the realm's notification stream. If a realm has no notifications
stream, the decision is moot, so we hide the option.
The regex we were using didn't cover all the unicode blocks
to which our emojis belong. This commit fixes the regex to
include all the unicode blocks and also updates the
corresponding JS regex in marked.js.
Fixes: #3460.