This refactor will facilitate making it possible to set CSS properties
on this controls span; in particular, we're hoping to disable user
selection of the whitespace in this region.
The main side effect of this refactor is that we need to add JS code
to also hide the icon-vector-pencil element, since it's now in a new
span.
When we were deleting a stream from the sidebar using the
stream/delete event, we were getting tracebacks due to this sequence
of operations:
* remove id from stream_list.stream_sidebar
* rebuild stream list
* remove sub from stream_data
This fixes the bug by calling stream_data.delete_sub() first.
Deletions are tricky if you do things out of order. We can probably
prevent tracebacks by having a deleted flag, but that can just cause
different problems.
Last commit tweaked by tabbott to fix a small bug in handling the case
where the user was not subscribed to the delete stream.
We continue to have page_params.realm_default_streams, but
now we do lookups on whether a stream is a default stream
by using a Dict indexed by stream_id.
We are also careful to update that during live updates.
This fixes a flaw that we weren't updating the list of realms
correctly for events that remove a default stream.
Admins need to know about private streams to delete them, even
if they are not subscribed. We send the minimal info possible
to the client to allow them to have a UI for that.
Modify `generate_sha1sum_node_modules()` such that it can calculate
the hash for a particular installation.
Tweaked by tabbott to use os.path.realpath in the setup_dir
calculation, to ensure it's consistent.
In dev always include the currently active cache in order not to break
current installation in case dependencies are updated with bumping the
provision version.
The refactor in b46af40bd3 didn't
correctly translate the code for managing request.user and
request._email, resulting in requests for the push notification
bouncer being rejected with this exception:
AttributeError: 'AnonymousUser' object has no attribute 'rate_limits'
This is an attempt to more easily debug a traceback we've seen a few
times. The issue likely has to do with local echo, which would be
confirmed if this reports a local-echo-style message ID.
This commit extends the `compute_placement()` function in
`popovers.js` to take into account height/width of popover as well as
positioning preference. If vertical positioning is desired and the
popover fits in either 'top/bottom' positions then we don't check for
`left/right' positions. Earlier the behavior was to prefer
'left/right'positions over 'top/bottom' positions, which resulted in
the emoji picker popping incorrectly to the left.
This further improves the emoji picker by introducing two new behaviors:
1: If the cursor is at the end of the input box then pressing `right_arrow`
moves the focus down into `emoji_catalog.
2: If the currently focused emoji is the first emoji in the `emoji_catalog`
then pressing `left_arrow` moves focus back to search filter.