zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.19k stars 7.66k forks source link

Make it possible to automatically split long messages #28626

Open alya opened 8 months ago

alya commented 8 months ago

As discussed on CZO, it can be useful to compose a long message all at once, but then split it into multiple messages before sending. For example, this can allow others to react to specific parts of the message. We should add an option to automatically split a long message. Specifically:

The text in you compose box will be split int to multiple messages at two consecutive blank lines. [Cancel]

Technical details:

@_Tim Abbott|7 said:

Also just to frame how this feature will work technically -- I expect it to send without local echo the first block, and when that completes, the success callback would put the remainder of the messages as a draft pushed into the compose box, and recursively call the "send multiple messages" function, repeating until one runs out of message content to send.

This model would mean that if there are errors sending one of the submessages, you'll have exactly the stuff that hasn't been sent still there as a draft in the compose box.

This should help ensure that bad connections are handled reasonably.

Notes:

Follow-ups:

The text in you compose box will be split at two consecutive blank lines into N messages. [Cancel]

Related issues:

CZO thread

parthksingh1 commented 8 months ago

@alya I've carefully reviewed the proposed automatic message splitting feature, and I'd like to contribute some suggestions to enhance its functionality and user experience: Customizable Splitting Criteria: It would be fantastic to have the ability to customize the criteria for message splitting. Imagine being able to choose our own delimiters or set character/word count thresholds. This way, each user can tailor the feature to their unique writing style and preferences, adding a nice touch of personalization.

Interactive Divider Configuration: How about an interactive configuration feature for the divider within the compose banner? It would be great to easily set our preferences, making the whole experience more user-friendly. Imagine a seamless and intuitive way to configure the splitting process.

Visual Feedback in Preview Mode: Providing clearer visual feedback in the preview mode would be a game-changer. Visual indicators or color-coded sections could make it crystal clear how our message will be split. This way, users can have a visual preview before hitting send, ensuring a more informed and confident user experience.

what are your thoughts on these ideas?

kuv2707 commented 7 months ago

@zulipbot claim

zulipbot commented 7 months ago

Welcome to Zulip, @kuv2707! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

alya commented 7 months ago

@parthksingh1 thanks for the suggestions! Those all sounds like potentially helpful follow-ups, but not requirements for the initial version.

zulipbot commented 7 months ago

@kuv2707 We noticed that you have not made any updates to this issue or linked PRs for 10 days. Please comment here if you are still actively working on it. Otherwise, we'd appreciate a quick @zulipbot abandon comment so that someone else can claim this issue and continue from where you left off.

If we don't hear back, you will be automatically unassigned in 4 days. Thanks!

kuv2707 commented 7 months ago

@zulipbot abandon

kuv2707 commented 7 months ago

@zulipbot claim