Commit Graph

1259 Commits

Author SHA1 Message Date
Marco Burstein 096088969d compose: Re-open the compose editor after restoring a draft.
Fix #5951.
2017-12-22 08:57:39 -05:00
Marco Burstein e9d7161418 compose: Warn users when posting to the #announce stream.
Currently, users are warned when mentioning @all and @everyone, but not
when posting on the #announce stream. Confirm with users that they want
to send their message on #announce if over 60 people are going to be
notified.

Fixes #6928.
2017-12-20 07:36:50 -05:00
Andy Perez fc2298ec54 node tests: Add nice diffs to js markdown tests.
Fix #3915
2017-12-18 19:03:38 -05:00
Andy Perez 695affd44e node tests: Compare markdown using semantic equivalence.
Fix #4367
2017-12-18 19:03:38 -05:00
cPhost 3dc315a0a1 node tests: Add 100% coverage for narrow_state.js. 2017-12-18 09:57:43 -05:00
cPhost 7f4e57ddff node tests: Cover stream_data.initialize_from_page_params. 2017-12-18 09:19:05 -05:00
Vishnu Ks bc37317914 invites: Differentiate users invited as admin by showing bolt icon. 2017-12-13 15:12:21 -06:00
Aastha Gupta 1df3e04cd7 bot settings: Clear typeahead when renaming a bot
Fixes #7534
When bot is renamed, the old name persists in mention typehead.
This commit clears the typeahead, whenever bot details are modified.
2017-12-13 14:39:53 -06:00
Rhea Parekh dd1b14378b Streams: Disallow certain markdown characters in stream names. 2017-12-12 10:04:31 -06:00
Greg Price ac7d086085 sidebar: Revert to narrowing to whole stream.
This reverts commit eb2bdb706 "sidebar: Narrow to latest topic if
not in stream."  On a trial deploy, many users were surprised and
preferred the old behavior.
2017-12-11 16:35:12 -08:00
Brock Whittaker 2252d7e5f6 Revert "dark-mode: Add "T" hotkey for dark mode theme."
This reverts commit ce62abce73.

Fixes #7678.
2017-12-11 15:59:02 -06:00
Jerry Zhang 14d1902386 node tests: Cover exports.create_sub_from_server_data. 2017-12-11 11:13:55 -06:00
cPhost 63e8248933 node tests: Cover stream_data.canonicalized_name. 2017-12-10 04:20:29 -08:00
cPhost 0b9e678d4d node test: Cover stream_data.render_stream_description. 2017-12-10 04:20:29 -08:00
cPhost d2a2d0b362 node tests: Cover stream_data.get_subscriber_count. 2017-12-10 04:19:33 -08:00
Steve Howell 36ade63d84 compose: Fix bug in undo operation
This fixes compose.test_video_link_compose_clicked to just
use a stub for compose_ui.insert_syntax_and_focus.

It also adds direct tests for compose_ui.insert_syntax_and_focus.

Fixes #6362
2017-12-10 04:10:18 -08:00
Rohitt Vashishtha eb2bdb706a sidebar: Narrow to latest topic if not in stream.
We now narrow to the latest topic in stream if we are narrowing from
outside the stream, and show all topics grouped together (previous
default) if we are already narrowed to the stream.

Fixes #7555.
2017-12-08 05:53:49 -08:00
Rohitt Vashishtha 6d9273819c tests: Cover new composebox typeahead terminal symbols. 2017-12-08 01:00:38 -08:00
cPhost 7504d01066 node tests: Cover stream_data.remove_default_stream. 2017-12-07 15:05:44 -08:00
Jerry Zhang 48ebec3a29 node tests: Cover exports.get_default_status. 2017-12-07 15:02:12 -08:00
Jerry Zhang e134fd610e node tests: Cover exports.is_for_stream_id. 2017-12-07 14:58:27 -08:00
Jerry Zhang 806e9bb742 node tests: Cover exports.remove_subscriber. 2017-12-07 14:57:15 -08:00
Jerry Zhang b874693242 node tests: Cover exports.user_is_subscribed. 2017-12-07 14:57:15 -08:00
Jerry Zhang 4fd3492e73 node tests: Cover exports.get_user_group_from_id. 2017-12-06 06:34:31 -08:00
cPhost bbdf9f0306 node tests: Cover stream_data.notifications_in_home_view 2017-12-05 16:30:36 -08:00
cPhost cd9c066c0b node tests: Cover stream_data.name_in_home_view 2017-12-05 16:30:36 -08:00
cPhost 5f50786129 node tests: Cover exports.operators. 2017-12-03 14:01:19 -08:00
cPhost 8b7e355949 node tests: Cover single_collect. 2017-12-03 14:01:19 -08:00
cPhost 8d0ccd29fe narrow_state: Make set_compose_defaults return opts. 2017-12-03 14:01:19 -08:00
Jerry Zhang 164fe28c5b node tests: Cover exports.receives_audible_notifications. 2017-12-03 13:54:41 -08:00
Jerry Zhang f0d8ce009c node tests: Cover exports.receives_desktop_notifications. 2017-12-03 13:54:41 -08:00
Rohitt Vashishtha 10618157a2 typeahead: Refactor typeahead tests to include cursor position. 2017-11-30 13:23:46 -08:00
cPhost 6e5dab6a1e node tests: Cover set_compose_defaults. 2017-11-30 06:25:36 -08:00
Rohitt Vashishtha 621d5dc9df typeahead: Show typeahead only if cursor is before space or punctiation.
This solves the issue with typeahead appearing in the middle of an
already-completed typeahead word.

Example: Earlier, '@ran|dom' would also trigger the typeahead and show
'random', but selecting it would turn it into '@**random** dom'.

We still have a problem to solve of preventing typeahead from
appearing on a space in the middle of an already-completed typeahead
word, but that is its own independent bug.
2017-11-29 14:53:14 -08:00
Sivagiri 4871b48bf2 node tests: Add tests for stream() and topic() in narrow_state. 2017-11-29 09:39:43 -08:00
Umair Khan 4a0c372de4 get_user_group_from_name: Remove existence check.
Using user_group_name_dict.get() will return `undefined`.
`blueslip.error` statement caused an exception notification to the
admins.

Tweaked by tabbott to add a test for a nonexistent group.
2017-11-29 09:36:04 -08:00
Rishi Gupta 191f8f1b39 left sidebar: Change Home to All messages.
We made this change because users often unnecessarily click "Home"
first in their use of Zulip, because it seems appealing.  While "All
messages" isn't quite precise (it doesn't include muted streams), it
does describe relatively simply the interleaved view that this
represents.

This commit leaves everything as "home" in the code, and only changes
user-visible strings and docs. Changing the code will be a big project;
there are hundreds of relevant occurrences in variable names, etc.

Further, we'll probably want to convert those various variable names
in different ways.

Tweaked by tabbott to extend the commit message and update a few comments.
2017-11-28 15:42:58 -08:00
Tommy Ip 6e22847548 refactor: new message content -> compose textarea. 2017-11-28 12:53:40 -08:00
Garvit b9826e9067 Add filters for toMarkdown to paste data to compose-box.
This fixes bugs with pasting headings and italic styling.

Fixes #7485.
2017-11-28 09:56:48 -08:00
Tommy Ip 29e9d16ac7 refactor: s/upload-bar/compose-upload-bar. 2017-11-27 21:35:14 -08:00
Tommy Ip 6a694418b2 refactor: s/error-msg/compose-error-msg. 2017-11-27 21:35:14 -08:00
Tommy Ip b9c2f479d3 refactor: s/send-status-close/compose-send-status-close. 2017-11-27 21:35:14 -08:00
Tommy Ip c0c58f9761 refactor: s/send-status/compose-send-status. 2017-11-27 21:35:14 -08:00
Tommy Ip 19b518c801 refactor: Extract tests for upload mechanics.
This temporarily removes the tests for clear_out_file_list since
fixing that test proved to be difficult.
2017-11-27 21:34:55 -08:00
Tommy Ip ddaff4cd2a refactor: Extract upload mechanics to new JS module.
Tweaked by tabbott to move changes from the next commit that are
required for this to pass tests into this commit.

Note that this exports a few items that were not previously exported.
2017-11-27 21:31:51 -08:00
Rishi Gupta 83149a953a copy paste: Turn off toMarkdown in production.
At least until some of the TODOs at the bottom of
node_tests/copy_and_paste.js are done.
2017-11-27 16:44:16 -08:00
Rishi Gupta 3fcfcd2a55 copy paste: Add toMarkdown test for `1. text`. 2017-11-27 16:44:16 -08:00
Rohitt Vashishtha 8082780853 typeahead: Update @mention to not autocomplete "@ " (@space).
Tweaked by tabbott to also cover "@** ".

Fixes #7533.
2017-11-27 15:15:56 -08:00
Steve Howell 025b8c19ae Simplify code to warn about private stream links.
This change does a few things:

    * I use "early return" to make the code a bit flatter
      and easier to comment.

    * I added more comments.

    * I removed some unneeded passing of `invite_only` into
      the template.
2017-11-27 10:41:10 -08:00
Steve Howell e74118e730 tests: Improve templates.compose_private_stream_alert() test.
I assert that the stream_name gets properly placed into the HTML.
2017-11-27 10:41:10 -08:00