`#tab_bar_underpadding` overlaps some with `.message_header`,
so adding `#tab_bar_underpadding.bottom + .message_header.height`
gave us a nonsense message viewport top.
Doing the calculation this way is more robust, as long as:
1) `$(".floating_recipient").offset().top` continues to give us a sensical number
and is the last element just before the top of the viewport.
2) nothing appears between the composebox and viewport.
In this commit I also removed the other couple of places where the #tab_bar_underpadding
was being used as a viewport reference, that no longer makes sense.
(imported from commit c7f35e41309900c581d5e2329c1becf161d501d3)
Now that we no longer use tables for our message list, we can
more logically group messages together.
(imported from commit 9923a092f91a45fe3ef06f2f00e23e4e3fb62a37)
This experiment has been disabled for everyone for a while: if we
bring something like this back, it is not likely to be exactly the same,
and will be different enough to require a different implementation.
As it is, the summarization code was making a few code paths (rendering
especially) more complex, and is worth removing for simplicity's sake.
(imported from commit 6ac8cdc9f7077a5a1da01ab4268aba3db0bc43f8)
If you have a lot more individual users in your realm than group
PMs in your recent history, we were squeezing out the Group PMS.
We now max out the ratio for any sub-section in the right sidebar,
as well as bumping up the min.
(imported from commit f7c44367f2a518d27406993cb6358cc96d1aae92)
Also:
* Change fixed element positioning and fix bugs
* Move settings dropdown back to the right and add left padding to left sidebar
(imported from commit fcf903b59617687f94618a01ce7544b69f408130)
This reverts commit 462a3eb5e6b83f9d8091b83e3f8dc458236938ed.
We're reverting this to see if it is the cause of our recent CSS
performance issues.
(imported from commit 6a0b041cfcb6770bbfda0d354444bad2d64459ab)
The leading theories this will test are:
1) MessageList._items becomes unsorted and the binary search starts
returning the wrong index from selected_idx.
2) MessageListView.render is not rendering the message or it is not
being inserted into the cache.
(imported from commit 926b7d7bf9df338320a8cba6241038176ce4b47d)
There are 2 uses of all_msg_list previous to this commit:
(1) The contiguous block of messages to be used for constructing the
initial state of narrows.
(2) A way to look up an arbitrary message by ID that may or may not be
in the home view to check if we have it locally.
We eliminate all applications of use case (2), replacing them with
queries on message_store, since they are in fact wrong -- any messages
that are outside the contiguous time period of all_msg_list would not
appear in all_msg_list and thus would incorrectly not be returned.
(imported from commit e2e2efe919242331bbc44abc6c50b16e3ab1336e)
When users select messages starting with stream header we should format
the text as using the custom copy handler.
(imported from commit 4f9851939484d046619c3e53c71c47ad64797670)
This is no longer required, now that we're no longer scrolling the
main body of the page.
(imported from commit c2aa0d403c8fd0679b3110fe8e7684d46a7557fa)
This got broken in the local echo refactoring -- we accidentally
switched the update_starred function to be a toggle, which meant that
the message would be marked as starred and then unmarked as starred
moments later, due to the two update_starred calls for the initiating
browser (one from when the click happens, the second from when the
event returns from the server).
(imported from commit 8f83729fe5477cf052124c1c56ed9189b85b885c)
Always render the Administration menu item from the back end, but
make it be hidden by default until the page is loaded. Then, the
client can un-hide it as needed.
(imported from commit 66e607eec430d7179b4d5ac3f5416f5be8ac26c9)
basically this tries to turn scroll-the-world into not-scroll-the-world
This is not very good--maybe Allen has a better idea. The best solution would be to
turn off scroll-the-world. Look for it after the tables->divs change happens.
(imported from commit ae0b6976bca57986f95022f2470bc7117eda7fa3)
We now use window.innerWidth to check for CUSTOMER7's skinny
mode, which empirically seems to be more consistent with
CSS's max-width @media settings.
I tested under FF, Safari, and Chrome.
(imported from commit d440998634633c11b471fe732104be252c979cd4)
It's possible for a message to be considered "long" at one point,
and then if you narrow to it later, it should be considered "short",
because either the screen's wider or taller. This commit makes
sure that we remove the "condensed" flag from short messages,
and it also fixes the "More..." click handler's assumption that
could-be-condensed will always be true for condensed messages.
(imported from commit 77e4a1ad299c09f12e5609a972d5668472bd4a81)
Cache the height of messages to speed up ui.condense_and_collapse()
to make narrows work more quickly. The height of the message
determines whether it is auto-condensed or not. We clear specific
cache entries when messages get edited, and we reset the entire
cache when the window width changes.
(imported from commit 7c12070a3eb3e2e1a2dfeb8d9109f3404a46c032)
This changes the algorithm slightly for the 2-block case, because
I simplified the logic to just divvy up the space naively based
on the relative size of the blocks.
(imported from commit 9498edd916f65e07fb64d138276691d0d5cc0e55)
This is a functional change. Before this change, the stream
list and user list were allowed to take equal space in the left
sidebar; now, we take the size of each list in deciding which
proportion each block gets.
(imported from commit febedcb0518353825e18a6ebe60d1883b98bc78d)
I don't think share-the-love is turned on for CUSTOMER7 in the
first place, but even if it is, we should hide it when they go
into narrow mode, to make room for streams and users.
(imported from commit 2e80eec0f2ddee06753f48248dca5ac4745db6f1)
Calling $('#foo') is expensive, so if you need it twice, you
should store it in a variable. I did this for stream_filters
and user_presences, and added the expectOne() call for them as
well.
(imported from commit 69e689e28b1248a93ef426a89c14033d2fb36104)
I renamed ui.process_condensing() to ui.condense_and_collapse(),
and, more importantly, it now takes a list of elements, not a single
element, which allows us to do some computations outside the loop.
(imported from commit d5984088030c2a0d4ec8b258c7fcec3e84caf2b1)
This sets us up for the next commit, where we will change
process_condensing to loop over several elements, and we will
not need to recompute height_cutoff every time.
(imported from commit 1cc5b44598b85d1e301bc84492e4dc38f41ec16e)
This doesn't actually prevent a user from making the API call into our
servers to actually go and edit a message, so this isn't a bulletproof
solution for realms where messages ABSOLUTELY MUST NOT be edited.
(imported from commit 5bf043a201e2952189b45f93b8c5ca7648f6aee7)
This is a subtle change, to make sure that list items
from stream_filters always go through click handlers, which
ensures, e.g., consistent behavior on opening the compose box.
(imported from commit cd734901def8959c8c8a29c164c7a60730ae0915)
When you upload a 2nd avatar to Zulip, the URL doesn't actually
change, so even new messages can show the old avatar, if your
browser is caching. We work against the cache by having the
"stamp" argument, which we vary at reload time and also when
we upload the new avatar. The browser still benefits from
cached images as new messages come in.
(imported from commit 84869c8d7f251c9f2498026a5e9e3b2451784879)
If you used the mousewheel in certain page sub-elements, scrolling
to the bottom would sometimes turn into scrolling the main page.
We had code to make that not happen, but it was sensitive to
integer rounding, so I added a one pixel fudge factor.
(imported from commit 5ed1f4e717e5f9ce3316383812dee27913afdd49)
When GROUP PMs are in the right sidebar, and when there are
lots of users, we set max heights so that both USERS and
GROUP PMs show up.
(imported from commit 4a5a16a8cf03d853769b3a690ac5b0338a2c8461)
When a user squishes the browser window enough to move users
to the left sidebar, we need to move user groups as well. More
importantly, when they widen again, we move both of them back
in a way that users stay on top of groups.
(imported from commit d80722b58190d42a2dfc5247bfffaa7708cde21a)
If a user types "/me runs to the store", we put "runs to the store"
in bold after their name.
(imported from commit fbc11e99244e1c8fa1c03e4753e706957fcd449e)
Show up to 10 of your recent group PM conversations in the right
sidebar. Clicking on the links narrows to the huddle and opens the
compose box for the huddle. The green circles have opacity
proportional to the number of users present in the huddle.
This is feature flagged to staging only.
Some of this code was written by Allen before commits were squashed.
Known issue: unread counts disappear on certain refresh events.
(imported from commit 3b44665150ba20594d8b0295cb30df03601c1d52)
Since ui.set_presence_list is only called from activity.js, I am
inlining the code into activity.update_users(). This also allows
us to move ui.presence_descriptions into activity.js, which
is the right home for presence-related things.
(imported from commit 0ff239275c544a86c14d517bc386d06726b81cd9)
Displays a notification above the composebox in cases where the message
is not visible (further down), or where it's outside the current narrow or search.
It also offers a link to the appropriate narrow when it makes sense, and offers
timetravel when appropriate. There is currently a bug with timetravel (and you can
see this when using the popover menu) that makes "narrow to messages around this time"
not work for muted messages.
This resolves Trac #1518.
(imported from commit 391ca0b9c07d91496f6585a4fd8e15723d1170e2)