Contribute to Open Source. Search issue labels to find the right project for you!

Make r/enter work for empty narrows.


Most of the time when you hit r/enter to reply to the “selected” message, there actually is a message to reply to.

We should handle the case where there’s no selected message, because the narrow is empty, but there’s still an implicit stream/topic/person to whom we are replying, based on the narrow. I think we should always open the compose box and fill in as many fields as we can. If we’re narrowed to a topic, then fill in both stream and topic. If we’re narrowed to PMs, open the compose box with the focus on the “to:” field. Etc. The one edge case here would be that you’re in a home view (or a search view) with no messages, and then I don’t know what the correct behavior should be, but it’s probably fine to just make an arbitrary decision.

Updated 08/06/2017 05:32 5 Comments

Add hotkeys for switching between the three main panels.


Currently, there is no easy way to switch between the three main panels (navigation, chat, users) without using the mouse: image

It would come in handy if there were hotkeys for switching between those. The most intuitive keys would be the left/right arrow keys. * The right arrow key is currently unbound. * The left arrow key is currently used for editing one’s last message.

Any implementation should try to find consensus with other Zulip users regarding the chosen hotkeys, especially when they override older ones.

Updated 07/04/2017 02:18 1 Comments

refactor/test: Clean up hotkey.js.


We can accomplish a couple goals with static/js/hotkey.js:

  • Eliminate nearly all jQuery calls (besides keydown/keypress) by delegating to other modules like settings.js, compose.js, popover.js, etc.
  • Add more coverage to hotkey.js (via frontend_tests/node_tests/hotkey.js)

This is a good task for a relative newbie who has a little bit of experience with Zulip node tests.

The best way to accomplish this is with a series of pretty small commits. You will want to be thorough with both adding automated tests and manually testing your changes.

Updated 16/06/2017 03:01 9 Comments

hotkey for hopping through stream/pm history


Right now the “r” hotkey allows users to reply either the stream containing the highlighted(/selected) message or the author of the message they have highlighted (w/ “R”). However, the selected box does not update over through time, thus you have to either use the arrow keys to scroll up and down to get to the appropriate message or narrow your scope by selecting one specific stream/pm to be in focus. I prefer to sit at the global screen to process all my messages but it is very inefficient/inconvenient to repeatedly scroll up and down to get to the right place. Having the selected box automatically update as new messages come in would be slightly better, but would still lock me into one stream. Also, while “c” allows me to send a message to anywhere, it would result in non-trivial time wasted and introduces potential errors (misspelling a stream or topic name or failing to use the drop down box correctly).

Therefore, I would like (and I think it would be useful for other like minded users) to have a new hot key binding that hopped back through time to the topics you most recently replied in. For instance, if I messaged (stream/topic): “IT/maintenance”, “IT/upgrades” and then “Everyone/helpdesk”, this new hotkey (arbitrarily for example setting it to “ctrl+t”) if pressed from the global screen would start composing a new message to “Everyone/helpdesk”, pressing ctrl+t would switch the message to “IT/upgrades” and another ctrl+t would switch the message to “IT/maintenance”. ctrl+T should do the same but for private messages. I think that having it be a key pairing is important, so that it could be invoked multiple times (i.e. if it is just “t”, then pressing “t” a second time would add the literal character to a message).

Several immediate questions and my proposals: Q. How frequently are these stacks updated? A. Each time a message is sent, the stacks should be updated, using MRU (probably). Q. What happens if you have nothing in that stack and try to use it? A. The same functionality as “c” (or “C”) Q. What happens if you try to hop back through more history than you have (i.e. you press it 4 times when you’ve only sent messages to 3 unique locations)? A. It cycles through back to the first one Q. How many hops are stored in this stack? A. There would be some fixed limit (potentially configurable) (e.g. 10 hops). There would also be some timeout (potentially configurable / togglable) that would remove old entries (i.e. when you send the one message to random user X, it gets removed from your history after X hours, so that if you don’t exceed the fixed limit, it still removes cruft). Q. What happens if you are not at the global scope? A. If your scope is narrowed to a stream, stream hops (ctrl+t) would only show topics within that stream, pm hops (ctrl+T), would show all PMs. If your scope was narrowed to a topic, stream hops would do nothing, pm hops would still traverse all PMs. If your scope is narrowed to a PM, stream hops would iterate all streams and pm hops would do nothing.

Updated 09/06/2017 13:02 4 Comments

Fork me on GitHub