Commit Graph

17723 Commits

Author SHA1 Message Date
Tim Abbott e3505bd5ae avatar: Fix memcached query loop fetching messages.
This fixes a major performance issue, where we would fetch
user_profile objects inside a code path that had already bulk-fetched
the necessary user objects.

Like the similar related changes we just made, the fix is to marshall
and pass the data into the avatar library directly.
2017-05-09 22:33:27 -07:00
Tim Abbott 0990246289 avatar: Fix memcached query loop fetching bots.
Similar to the related issue with users, the new avatar storage had
accidentally added database queries in a loop to this code path.
2017-05-09 22:33:27 -07:00
Tim Abbott 8e47dc73bd avatar: Fix loop doing database queries in register.
Due to the refactoring of the avatar URL codepath that added realm IDs
to the URLs, we ended up calling `get_user_profile_by_email` inside
`get_avatar_url`, which in turns was called in a loop over all users
in a realm.

Needless to say, this resulted in a significant performance problem.

We fix this issue by passing in the data needed to compute the avatar
URL, rather than looking it up by email address.
2017-05-09 22:33:27 -07:00
Tim Abbott 676d4f32fc avatar_url: Fix unnecessary database query.
If we have a user_profile object, there's no reason to fetch it again
from memcached.
2017-05-09 22:33:27 -07:00
Tim Abbott c8b0ac0a05 avatar_hash: Extract user_avatar_path_from_ids. 2017-05-09 22:31:24 -07:00
Tim Abbott e94586adb4 puppet: Fix path to events_deliver_enqueued_emails.log. 2017-05-09 22:29:58 -07:00
Tim Abbott c21d336bfe css: Use the Zulip static asset pipeline for emoji sprite sheet CSS.
This should be a nonfunctional change in most cases; the main benefit
should be preventing caching issues if/when our sprite sheets change.
2017-05-09 19:45:57 -07:00
Tim Abbott 3d5350408b css: Fix vertical alignment of global filter counts.. 2017-05-09 19:17:33 -07:00
Tim Abbott 60a81fef43 design: Restore font color in left sidebar to #333.
This fixes a major complaint with the left sidebar styling.
2017-05-09 19:00:46 -07:00
Brock Whittaker 7dbf0c8811 Normalize left and right sidebar font size.
This normalizes the left and right sidebar font size to be 0.89rem.
2017-05-09 18:54:10 -07:00
Brock Whittaker 242eb9b346 portico-sidebar: Fix sidebar logo to be current logo.
This fixes the sidebar logo to be the current zulip logo rather
than a mockup of a potential logo that was from the redesign.
2017-05-09 18:48:33 -07:00
Steve Howell 5c52495b64 Use modals.settings_open().
We now uses modals.settings_open() to check for the settings
modal being open, rather than doing a regex check on
windows.location.hash.
2017-05-09 18:44:08 -07:00
Steve Howell 37254c9031 Simplify ESC handling for modals.
Rather than checking every modal individually in hotkey.js for
handing the escape key, we now use the modals API:

    is_active: says whether any modal is open
    close_active: closes the active modal
2017-05-09 18:44:08 -07:00
Steve Howell 23b7be90c2 Fix console errors with closing settings.
We were mapping the escape key to fake-click a redundant
click handler when the settings pages were open.  This fix
lets the actual click handling work via modals.js, and it
lets keyboard handling directly calls modals.close_settings().
2017-05-09 18:44:08 -07:00
Tim Abbott bd3e338c35 templates: Fix URL coverage for new files. 2017-05-09 18:42:24 -07:00
Tim Abbott fc24a56fc5 test_docs: Fix expected text in /hello page. 2017-05-09 17:23:38 -07:00
Tim Abbott df6dba9673 test_home: Fix expected text in /hello page. 2017-05-09 16:59:33 -07:00
Brock Whittaker 3fd3ae4199 Restyle /hello/ page.
This restyles the /hello/ page to be the new portico branding.
2017-05-09 16:31:57 -07:00
Brock Whittaker a82a0d16d5 Add landing page assets.
This adds the required logos and other assets for the /hello/ page.
2017-05-09 15:26:45 -07:00
Tim Abbott 484adf1461 about: Update words of developer documentation. 2017-05-09 15:04:17 -07:00
Tim Abbott 6dd85a78ce about: Update to have slightly more current numbers. 2017-05-09 15:03:30 -07:00
Tim Abbott 937dcdde59 docs: Update which projects are marked complete in roadmap.
We need to do a more significant update soon, but this will at least
make things passable for now.
2017-05-09 14:34:53 -07:00
Tim Abbott 68be0edc67 Update changelog since the Zulip 1.5 release.
It's amazing how much we've done in the last few months.
2017-05-09 14:02:24 -07:00
Tim Abbott 2d97db3518 streams: Add endpoint for modifying properties of a single stream.
This is likely to be the more common endpoint for API clients like the
mobile apps to interact with when modifying streams.
2017-05-09 13:42:34 -07:00
kunall17 e087bc24f8 streams: Migrate stream property changes to new REST endpoint.
This is one of the last major endpoints that were still done in the
pre-REST style.

While we're at it, we change the endpoint to expect a stream ID, not a
stream name.
2017-05-09 13:39:23 -07:00
Rishi Gupta a75af36039 stats: Change sort order of client labels to match default view. 2017-05-09 11:32:35 -07:00
Rishi Gupta ee16abaf3b analytics: Fix sort function in views.sort_client_labels.
sort_client_labels sorts first by total, and then to ensure deterministic
outcomes, sorts (reverse) alphabetically by label.

Fixes regression introduced in 0c0e539.
2017-05-09 11:32:35 -07:00
Rohitt Vashishtha 0414ac6df5 bugdown: Convert GitHub image-preview urls to image urls.
This makes inline image previews work for links to image files' pages
on GitHub.

Fixes #4658.
2017-05-09 11:22:37 -07:00
Rohitt Vashishtha 5be7494ddf Remove duplicate connection-error message.
There's really no need for a separate user-visible error message for
get_messages vs. get_events.

Fixes #4703.
2017-05-09 11:13:27 -07:00
Steve Howell 94b7058743 Make local_echo an official feature.
This commit removes all references to feature_flags.local_echo.
It's been a core feature for about four years, so I think we
can safely say the experiment was successful.:)
2017-05-09 11:06:10 -07:00
Steve Howell 0a0f567aeb Split out markdown.js from echo.js.
The new module handles markdown rendering.

The code left behind in echo.js does local-echo kind of things
like reifying message ids.
2017-05-09 11:06:10 -07:00
Tomasz Kolek 61d5d41067 Add Slack importer bot. 2017-05-09 10:48:08 -07:00
Mahim Goyal 49fec57768 Add hotkey for narrowing to next unread topic.
Fixes: #4199.
2017-05-09 10:02:54 -07:00
Tim Abbott 40e43d8cba narrow: Remove unused by_conversation_and_time and by_id helpers.
Now that we just copy links to the clipboard, neither of these are
used.  (Actually, the narrow.by_id helper has been dead code for
years).
2017-05-09 09:59:37 -07:00
Mahim Goyal a2adcfd7fc popovers: Add direct copy to clipboard link feature.
Change the onClick function of copy link of
conversation to actually copy the link to clipboard.

Fixes: #4621.
2017-05-09 09:59:23 -07:00
Mahim Goyal 6fe0728afa Return absolute URL from narrow.by_conversation_and_time_uri 2017-05-09 09:55:38 -07:00
Umair Khan 4971b7ff9f testing: Add errored tests to failed tests list.
Fixes: #4716.
2017-05-09 09:36:59 -07:00
Steve Howell 70d4ac93ce Add modals.info_overlay_open().
This also removes ui_state.js, since its last function
is now replaced by modals.info_overlay_open().
2017-05-09 09:19:27 -07:00
rht 00e057bf44 install-node: bypass nvm wrapper for faster node startup.
This fixes a significant performance issue with LaTeX rendering (and
other things that invoked node) where starting up node took a few
hundred milliseconds due to nvm initialization.

Tweaked by tabbott to avoid copying the node binary itself, instead
using a tiny wrapper script.

This is important primarily because it's possible a future version of
node will expect to find libraries/dependencies/etc. installed via NVM
at some path related to the path of the node binary itself, and that's
more guaranteed with this new model.

Fixes #4618.
2017-05-09 09:17:54 -07:00
Steve Howell 86a9283471 Update JS dependency configuration. 2017-05-08 22:04:56 -07:00
Steve Howell 742c55f514 Speed up key handling by adding modals.is_active().
The function modals.is_active() can see if modals are open
without having to look at the DOM.  This should make it snappier
to type in the compose box.  Even if the speedup is pretty minor,
not having to worry about jQuery slowness should make it easier
to diagnose future compose box issues.

The new function gets used in other places, too, where performance
isn't so much an issue.
2017-05-08 22:04:56 -07:00
Steve Howell 3c0ef6295f Enforce that only one modal can be open at any time. 2017-05-08 22:04:56 -07:00
Steve Howell ddded59a6d Remove modals.set_close_handler(). 2017-05-08 22:04:56 -07:00
Steve Howell 07248ee7bd Use modal.open_overlay() for info overlays. 2017-05-08 22:04:56 -07:00
Steve Howell 4bcb4d6c15 Use modal.open_overlay() in subs.js. 2017-05-08 22:04:56 -07:00
Steve Howell 0965fc5a05 Use modal.open_overlay() in settings/admin. 2017-05-08 22:04:56 -07:00
Steve Howell b82a802c22 Use modal.open_overlay() in lightbox.js. 2017-05-08 22:04:56 -07:00
Steve Howell 02c743853c Use modal.open_overlay() in invite.js. 2017-05-08 22:04:56 -07:00
Steve Howell 6d1a6934b8 Use modal.open_overlay() in drafts.js. 2017-05-08 22:04:56 -07:00
Steve Howell 09a37ec179 Add modals.open_overlay(). 2017-05-08 22:04:56 -07:00