Commit Graph

5896 Commits

Author SHA1 Message Date
Steve Howell 0a22094e24 Change operator canonicalizations.
Streams are converted to their "official" names now.
Topics are not canonicalized at all.
All other operands continue to be lowercased.

Since we don't lowercase stream/topic at the parsing stage,
we have to modify the predicate function to do the lowercasing
of stream/topic to enable case-insensitive comparisons.  This
is slightly more expensive.  The server-side predicate
functions are already case-insensitive.

(imported from commit 286f118c6c3ff9d23b37c7f958cab4c0eacd5feb)
2013-08-20 14:27:43 -04:00
Steve Howell 767a8ae400 Add test_predicates() to filter.js tests
(imported from commit 551f396b4458ac529858f91f693b424bc7d06b8c)
2013-08-20 14:27:43 -04:00
Steve Howell 269f3670cd Extract local vars in Filter.canonicalize_tuple().
This can be squashed with the prior commit or subsequent commit,
or it can just stand on its own, but it's part of transitioning
to a functional change in the next commit.

(imported from commit 155a0cdd28f851810fbedfef1a306e3190bf1c34)
2013-08-20 14:27:43 -04:00
Steve Howell 33c70f0f69 Extract Filter.canonicalize_tuple().
(imported from commit 96b8dc8c27c07d6d13f1e02c88a164abcab5a5c2)
2013-08-20 14:27:43 -04:00
Steve Howell d5f997eb58 Use the correct stream name in compose defaults.
If we have a stream named "Denmark" and we're narrowed to it,
then use "Denmark" as the default stream name in the compose box
even if the narrow operators are lowercase.

(imported from commit e9f06b7307c73231aa887dc95849e0307984e6f0)
2013-08-20 14:27:42 -04:00
Steve Howell 18857f6601 Added stream_data.get_name().
This function returns the stream's actual name, if we can get it;
otherwise, it's the identity function.

(imported from commit 7a981adba9632d6c6eba54cb6514a9226d1e83e8)
2013-08-20 14:27:42 -04:00
Steve Howell eccd7e90ab Add unit tests for stream_data.js.
(imported from commit 9a91aea1db3afc7936b1dbaeb4c014a3df6cd633)
2013-08-20 14:27:42 -04:00
Steve Howell 579f53845e Have search_suggestion clean up after itself
(imported from commit def5797f02868ecdb7dc3ffcc25caf1e532e2764)
2013-08-20 14:27:42 -04:00
Steve Howell 3d20f6478c Add unit test for narrow.set_compose_defaults().
(imported from commit 819b326bb10b4126438c9336d41e4aadce94d381)
2013-08-20 14:27:42 -04:00
Steve Howell f593c551da Add tests for Filter canonicalizations
(imported from commit def24dda1f178b658f6e49f3d2c67db779059c89)
2013-08-20 14:27:42 -04:00
Steve Howell 2491a80aa6 Fixed comment in in index.js
(imported from commit d28abf87d80f53038f1273529fcfe758fe7db2af)
2013-08-20 14:27:41 -04:00
Kevin Mehall d29484daa7 Casper tests for message editing
(imported from commit 4a62267241099432b40ef2cd592e0d5c20384f75)
2013-08-20 14:07:49 -04:00
Zev Benjamin 237746f3e2 Handle force pushes in Bitbucket integration
(imported from commit 6663934788b5cea13f9cf1344c45d2a568a0f287)
2013-08-20 12:28:04 -04:00
Kevin Mehall d529013b9a Fix browser error in editing PMs.
PMs do not have a "topic" field.

(imported from commit 023d283ad94147e8bb9a2c7f6959c0a636d825cd)
2013-08-20 12:00:11 -04:00
Jessica McKellar 485de6a5bc Correctly compute home unread counts on page load.
We had a duplicate and incorrect check on if a stream was in your home
view, which caused us to not display Home unread counts in the sidebar
/ notification bar / Dock on page load.

(imported from commit db27cf9091f8b47200b025f03a26c4fe82701882)
2013-08-20 11:10:18 -04:00
Scott Feeney 5f2517bddc Add support for analyzing test coverage with Istanbul
To use, make sure your Node installation is up to date and install
istanbul with npm:

  sudo npm install -g istanbul      # 'sudo' may be optional on OSX

Then run

  tools/test-js-with-node cover

and navigate to coverage/lcov-report/js/index.html in a browser.

(imported from commit 2da4894d1725e2f9540b3895304246e3cd138f6c)
2013-08-20 10:46:45 -04:00
Scott Feeney 69efe2a695 Add a Node.js-based test runner
There are no functional changes; you can still use the shell script
tools/test-js-with-node. It just delegates now to the new index.js to
iterate through all the other .js files in the test directory and run
them. This sets the stage for Istanbul to correctly compute test
coverage.

(imported from commit 6f521c78b7a314d010fa113f9c2c971ab999b637)
2013-08-20 10:46:22 -04:00
Jessica McKellar b32219c8eb Don't display unread counts until after making a bankruptcy decision.
Users were getting confused about why the unread count in the sidebar
/ notification bar / Dock was different from what the bankruptcy modal
said, so only show them the true server count until they've made a
decision.

(imported from commit 71d376cd4a85749ccf49936b251e6b8ac21361b7)
2013-08-20 10:26:52 -04:00
Zev Benjamin 8010b49067 Add support for issues events for Github integration
(imported from commit 6ae1013948626acdd161bd6f2648351201842658)
2013-08-19 17:13:37 -04:00
Kevin Mehall 8a741ed3d4 Ensure that the pointer is valid before saving it.
Trac #1716

Fix the tests to use real message IDs for the pointer. One helper didn't
use the pointer ID it was passed at all, so the test didn't actually test
what it was supposed to before.

(imported from commit 457bcdb04a6c3873e224b68cd9d79c9a26612010)
2013-08-19 16:46:52 -04:00
Kevin Mehall 054ccabf16 Don't fail to load the home page if the pointer is invalid.
Trac #1716

(imported from commit 089093aaa2e5466c9f8fb89f795b44c648e8a6e8)
2013-08-19 16:46:43 -04:00
acrefoot 395aaae994 Allow anyone to edit a "no topic" message
This change would allow anyone in the realm to set a topic for a "no topic"
message. As soon as the message topic is set, only the sender can change it again.

(imported from commit 0a91a93b8fd14549965cedc79f45ffd869d82307)
2013-08-19 16:29:30 -04:00
acrefoot e8e5cc37b7 No longer require topics for zulip.com.
This will allow us to try the "write-once" topics

(imported from commit ffd074baa94fbbe375b7b1b436a2e19fe44f42e4)
2013-08-19 16:29:30 -04:00
Luke Faraone d3e1d0301d Remove dummy 10.0.0.0/8 routes on interface configure.
(imported from commit 8a01137550b668a71871d20b1ebc1e62f0fdbaf4)
2013-08-19 16:19:47 -04:00
Luke Faraone 91ff010853 Configuration to create schroots.
(imported from commit 27288bfdc5b39aa5c8804ac9628dc960b621ca7f)
2013-08-19 16:19:45 -04:00
Luke Faraone 428148c67f Install Mosh on our servers.
This makes me happy when I'm working on an airplane.

(imported from commit adda8c3355cd5e54210c9706df72fb02697db1f6)
2013-08-19 16:19:26 -04:00
Luke Faraone da2cec6db8 Update ssh key for git.zulip.net used in install-server
For some reason the one already there didn't match. Hm.

(imported from commit 35e884fe1aa67fe6730dade24abc0565d2627608)
2013-08-19 16:19:26 -04:00
Luke Faraone 04174d8d93 Delete root's password in install-server if set.
Digital Ocean emails you the VM's password in plain text. We shouldn't
have this work for longer than we have to.

(imported from commit 2310cac9a9aa085149b9438941ecb0a5f703c128)
2013-08-19 16:19:26 -04:00
Steve Howell 53f62bd71c Created MessageListView class.
(The code for MessageListView  was extracted from message_list.js.)

(imported from commit 60c0bac4c734d3850f8b8c047a978c292b19cc13)
2013-08-19 12:17:56 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Allen Rabinovich 64ac31b9af Adjusting padding and overflow styles to avoid horizontal scrollbars
(imported from commit 917ef94c433bd4a944792676387fe995fdb15e84)
2013-08-19 08:53:15 -07:00
Allen Rabinovich d4fe5c3e50 Modify overflow behavior to remove horizontal scrolling edge cases
(imported from commit 262d0b6432fe660c1dfe764f7d380e580a8c28e9)
2013-08-19 08:53:15 -07:00
Jeff Arnold 12058b0880 Don't break double clicking in the edit compose box to select a word.
(imported from commit 309f9b96b8567e384c83ba4c3a8a954383c6ebc7)
2013-08-16 22:03:47 -04:00
Zev Benjamin 04147ae01f Set Cache-Control headers on index.html requesting no caching
This solves the problem of restoring a tab taking you to the previous
load's initial pointer position.

(imported from commit e5e988af65966b15a9d091064b65f87be3f0d75a)
2013-08-16 18:08:41 -04:00
Steve Howell dc19f15b1f Make composebox_typeahead.seen_topics be a Dict of Dicts.
The new implementation makes add_topic() be O(1).  We incur
the cost of sort() in topics_seen_for(), but that's only called
in the typeahead widget, and I think the typical number of topics
should be manageable here.

(imported from commit 0e332301b2e44b4465bf7a1d93ae525a8d17a6b6)
2013-08-16 17:59:40 -04:00
Steve Howell a4af6c7062 Add unit tests for composebox_typeahead.add_topic().
This tests topics_seen_for() as well.

(imported from commit a748134af8068d9e4ae223fb7ecbbbc6c170137e)
2013-08-16 17:59:40 -04:00
Jeff Arnold e51cfeaed4 Only add an edit icon next to the last paragraph
(imported from commit c6d2893faef144f85518c4d45856282ada33a9d1)
2013-08-16 17:40:07 -04:00
Luke Faraone 53e2639906 Revise and simplify instructions.
(imported from commit beee4446caeb53d0e1a7c10fc2878fbd5a0c3dbd)
2013-08-16 17:24:55 -04:00
Luke Faraone f03a15ea6e Switch to apt.zulip.com.
Use HTTPS for the initial key download but not for the APT repo line.

(imported from commit 5afa07832ca09919ad4ea6d2b15b2679a902ffa1)
2013-08-16 17:24:55 -04:00
Jessica McKellar 7dcd1c4021 subscriptions: Make the full e-mail forwarding address visible.
(imported from commit 6358c96b6bd1fe8494f581008729785678bad368)
2013-08-16 16:24:32 -04:00
Jessica McKellar f3a32d8382 Report email forwarding errors to our internal Zulip.
For now, just do this, and we'll reach out to realms having trouble
manually. We may eventually need to automatically reply to the e-mail,
reach out to a realm admin, etc.

(imported from commit 5c5ac354066f9e9be3fb928e1f8801613c22c1ac)
2013-08-16 16:09:18 -04:00
Jessica McKellar 557bdd2a6e email gateway: Make forwarding even "richly formatted" messages work.
(imported from commit b15f24fa6898eb2eaf7d27bf862e8bead76f544d)
2013-08-16 16:09:18 -04:00
Jessica McKellar 7dc3a155ba Add a crontab entry for the email mirror.
(imported from commit cd1765c78cc7d298c6856563107a33354e45e441)
2013-08-16 16:09:18 -04:00
Jessica McKellar 2c8f08e237 nagios: add a command to check that the email mirror is running.
(imported from commit 812626c2ed665bdf19e0b52319f0f8fcc37c2359)
2013-08-16 16:09:18 -04:00
Scott Feeney 94a22adb95 Align labels next to Font Awesome icons
Fixes Trac #1700

(imported from commit 24fbc27e0d78e5f4863523740dae51853b0fdc8e)
2013-08-16 15:10:01 -04:00
Zev Benjamin ba62cab801 Add Bitbucket integration instructions
(imported from commit 6976e75577ebacfbd2330a45f430d544c1a2cfcf)
2013-08-16 14:38:54 -04:00
Zev Benjamin f06c3c0aed Add BitBucket webhook integration
(imported from commit 50be72fb72d52e24b161f09b1d2314aaae5d636c)
2013-08-16 14:38:54 -04:00
Zev Benjamin 7650804499 Split build_message_from_gitlog in two
We do this because the upcoming Bitbucket webhook does not send
enough information for us to send a useful message for deleted
branches or force-pushes.

(imported from commit dcac675f47e10672125caabd6fefa8dc0dc9c86c)
2013-08-16 14:38:54 -04:00
Zev Benjamin 2f262b1558 Make @authenticated_rest_api_view imply @csrf_exempt
(imported from commit a90402effe48b184c05bf19f1136e3d63a6f460b)
2013-08-16 14:38:54 -04:00
Allen Rabinovich 5571a6e466 Switch body click to document click to account for clicks on the outer edge
(imported from commit bf6c7a61cb2f00741ed3af70ca77b5782f15d148)
2013-08-16 10:51:00 -07:00