Commit Graph

17723 Commits

Author SHA1 Message Date
Harshit Bansal d827cc878b emoji.js: Remove unnecessary indirection.
Remove unnecessary function `emoji_name_to_css_class()` called while
populating `emojis_name_to_css_class` dict.
2017-05-17 08:09:50 -07:00
Harshit Bansal bf97734c57 reactions: Fix broken rendering of flag emojis in reactions.
Use the patched css classes for rendering flag emojis in reactions.
2017-05-17 08:09:50 -07:00
Harshit Bansal a549013c50 emoji_pickers: Fix broken flag emojis.
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.
2017-05-17 08:09:50 -07:00
Umair Khan 7e8f4ca4e8 push_notifications: Include GCM in end-to-end test. 2017-05-17 08:09:19 -07:00
Steve Howell 7d153c9f8a Revert "muting.js: Track muted streams using stream id."
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.
2017-05-17 07:06:32 -07:00
Tim Abbott 11adbf5783 generate_secrets: Fix placement of mypy type: ignore. 2017-05-17 00:05:57 -07:00
Tim Abbott a6af57e90d css: Fix floating recipient bar border appearing when bar hidden.
It's the .recipient_row, not the .floating_recipient element, that
gets `display: none` added when the floating recipient bar is hidden.
2017-05-16 23:50:38 -07:00
Rishi Gupta 8b9929e771 alerts: Restyle alert banners.
Changes the background to be white, among other things.
2017-05-16 23:34:45 -07:00
Cory Lynch 24cbd61131 css: Fix KaTeX summation alignment and line wrapping.
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.
2017-05-16 23:29:36 -07:00
Tim Abbott b01ba5f389 generate_secrets: Fix mypy errors.
I'm pretty sure these errors reflect a problem with Typeshed, but
don't have time to investigate.
2017-05-16 23:28:44 -07:00
Tim Abbott 45a4aeac64 scripts: Run generate_secrets.py during the upgrade process.
Now that generate_secrets.py is idempotent, this allows us to
conveniently add new secrets whenever they are required.
2017-05-16 22:15:26 -07:00
Tim Abbott 2c6a91e24a scripts: Make generate_secrets.py idempotent.
Now, generate_secrets.py will never overwrite existing secrets.  In
addition to being a safer model in generate, this fixes 2 significant
issues:

(1) It makes it much easier to preserve secrets like Oauth tokens in a
development environment (previously, provision would destroy them).
(2) It makes it possible to automatically add new secrets as part of
the upgrade process.  In particular, this is useful for the
zulip_org_id settings.

Fixes #4797.
2017-05-16 22:15:25 -07:00
Tim Abbott 03b5200d8b generate_secrets: Reformat list of autogenerated secrets. 2017-05-16 22:15:25 -07:00
Tim Abbott f970ea935b docs: Update changelog. 2017-05-16 21:39:11 -07:00
Tim Abbott be3dc12a98 models: Move several __unicode__ methods to abstract classes.
This makes it possible to print ArchivedMessage, ArchivedUserMessage,
and ArchivedAttachment objects.
2017-05-16 21:04:58 -07:00
Tim Abbott 34a8e6c3a2 gear_menu: Eliminate scrollTop for non-home tabs.
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.
2017-05-16 20:37:00 -07:00
Tim Abbott 72720fcf2e settings: Remove obsolete message_viewport.scrollTop() calls.
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.
2017-05-16 20:33:52 -07:00
Tim Abbott 850519b314 api: Move cross_realm_bots into the register_ret response.
This is probably not the right long-term solution to the cross-realm
bots problem (that solution is probably to eliminate cross-realm bots
and replace them with per-realm bots).  But in the short term, this
will at least make it possible for mobile apps to interact with these
cross-realm bots using the `realm_user` data set.
2017-05-16 20:23:13 -07:00
Eeshan Garg 4f358f4034 webhooks/gitlab: Support pushing a local branch without commits.
This mostly just adds a test for GitLab related to the last commit.
2017-05-16 19:33:43 -07:00
Eeshan Garg 5687b2cdc5 webhooks/github*: Support pushing a local branch without commits.
Changes made to get_push_commits_event_message in
zerver/lib/webhooks/git.py are common to all Git integrations
that use get_push_commits_event_message. These include github,
github_webhook, gitlab, gogs, bitbucket, bitbucket2. In some
cases (for instance, gitlab), no further changes to gitlab/view.py
will be required to support pushing a local branch without commits;
adding a fixture and tests should suffice.
2017-05-16 23:51:19 -02:30
Tim Abbott 7a545eeb13 docs: Update copyright notices for 2017.
Also record Kandra Labs, Inc., as a major copyright holder.
2017-05-16 19:04:59 -07:00
Tim Abbott cab908b664 api: Move notifications_stream into the register_ret API.
While we're at it, we at least fix the API to use a stream ID, not a
stream name, to refer to the notifications stream.
2017-05-16 18:57:14 -07:00
Tim Abbott 8c172063e0 message_fetch: Increase batch size for message backfill to 1000.
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.
2017-05-16 18:32:48 -07:00
Tim Abbott b64a4f9291 minify-js: Fix failure to update JS files on Git deploys.
This fixes a significant static asset pipeline bug, which mean that
when we added `moment.js` to the Zulip npm dependencies, it wasn't
properly included in common.js; caching prevented common.js from ever
being rebuilt.
2017-05-16 17:57:20 -07:00
David 942520123c message view: Render formal date string as tooltip on recipient row
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.
2017-05-16 16:58:22 -07:00
Tim Abbott 7bee733565 requirements: Upgrade to the latest Django release. 2017-05-16 15:56:16 -07:00
Tim Abbott feda8cd012 css: Fix missing top border in PM recipient bars.
Technically, they were also missing on stream message recipient bars,
but the difference was invisible.
2017-05-16 14:48:37 -07:00
Tim Abbott d1fb4aa130 css: Fix missing right border in PM recipient bars. 2017-05-16 14:48:37 -07:00
Tim Abbott 5048edc25c css: Decrease vertical space at top of feed.
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.
2017-05-16 14:48:34 -07:00
Tim Abbott 00c7f7d42f Remove date separators from the top of the message feed.
Now that we have the date visible in the recipient rows, we no longer
need a top-of-feed date separator.

Fixes #4581.
2017-05-16 14:47:04 -07:00
Tim Abbott 575dde3881 help: Add link to new organization getting-started guide. 2017-05-16 13:52:58 -07:00
Tim Abbott f15e134bb0 apps: Update link to point to future Zulip iOS app ID.
Previously, this was linked to the now-removed old Dropbox iOS app for
Zulip.  The link won't work for a few more days, but we're just
waiting on app store approval and know the ID, at least.

Fixes #3267.
2017-05-16 13:45:02 -07:00
Harshit Bansal 0d28d5d808 build_emoji: Fix the spritesheet CSS generation code.
Modify the spritesheet generation code to account for the differences
between emoji_map.json and iamcal's dataset. Due to the differences
between the two mappings, some emojis like 1️⃣, 2️⃣ etc were not
getting rendered properly in the two emoji pickers where we are using
the iamcal's spritesheets for rendering them. This was so because there
was no CSS class corresponding to the codepoints of these emojis(as
mapped using emoji_map.json) in our spritesheet CSS(generated using
iamcal's dataset).

Fixes: #4775.
2017-05-16 13:06:12 -07:00
Harshit Bansal 0667297c6e build_emoji: Fix the coloring of the white emojis.
Fix the coloring of the white emojis to match that of the images
in the iamcal's spritesheets.
2017-05-16 13:06:12 -07:00
Tim Abbott 0b2388bda9 push_notifications: Remove DeviceTokenType logic.
The syntax wasn't valid on Python 3.5, and the new code is somewhat
more readable anyway.
2017-05-16 12:26:55 -07:00
Tim Abbott 9d63a5ab3a push_notification: Delete obsolete DBX_IOS_APP_ID code.
I'm not sure that this was ever actually used, but it's definitely
just clutter for Zulip today.
2017-05-16 12:26:55 -07:00
Umair Khan 286f9a40e7 push_notifications: Bring file to 100% coverage. 2017-05-16 12:26:55 -07:00
Umair Khan fa5c66c439 push_notifications: Add num_push_devices_for_user tests. 2017-05-16 12:26:55 -07:00
Umair Khan 88f5d29e19 push_notifications: Add send_to_push_bouncer tests. 2017-05-16 12:26:55 -07:00
Umair Khan af27ad607a push_notifications: Add handle_push_notification tests. 2017-05-16 12:26:55 -07:00
Umair Khan 8a6498f55d push_notifications: Create BouncerTestCase.
Adds bounce_request method to simulate a bounce.
2017-05-16 12:26:55 -07:00
Umair Khan 5907877038 push_notifications: Add test for send_notifications_to_bouncer. 2017-05-16 12:26:55 -07:00
Umair Khan fab4249893 push_notifications: Add get_gcm_payload tests. 2017-05-16 12:26:55 -07:00
Umair Khan 136a950041 push_notifications: Add test for APNs payload. 2017-05-16 12:26:55 -07:00
Umair Khan 47d0f7d996 push_notifications: Add tests for get_alert_from_message. 2017-05-16 12:26:55 -07:00
Umair Khan df0d29aaff push_notifications: Add response_listener tests. 2017-05-16 12:26:55 -07:00
Umair Khan fc0b9358e7 handle_push_notification: Remove the if condition.
'if apple_devices or android_devices' doesn't servce any purpose.
2017-05-16 12:26:55 -07:00
Umair Khan c4e5b75ead push_notification: Push data from Zilencer. 2017-05-16 12:26:55 -07:00
Umair Khan ab411ab7b3 push_notifications: Delete remote server tokens in APNs response. 2017-05-16 12:26:55 -07:00
Umair Khan 33332539df send_android_push_notification: Delete correct tokens.
Now this function will delete tokens from RemotePushDeviceToken if it
is running on notification bouncer or PushDeviceToken if it is running
on a server which doesn't use notification bouncer.
2017-05-16 12:26:55 -07:00