multiline: Specify behavior with respect to formatting.#499
multiline: Specify behavior with respect to formatting.#499progval wants to merge 4 commits intoircv3:masterfrom
Conversation
Tthis is the only way to format the fallback for multiline-unaware clients the same way as for multiline-aware clients
|
lgtm |
|
I'm not sure. This puts a significant burden on clients when interpreting user input and composing a multiline message. |
|
So currently, if someone sends this: then irccloud and the current weechat master will display it like this, because they don't implement this PR: not-bold bold unclear and assuming servers don't do any reformatting, then every client not supporting multiline will get this: so they will display it like this: not-bold bold unclear I understand this can be annoying to implement, but we need to either:
Could we resolve this before weechat ships version 4.0 with draft/multiline support? |
|
Update: weechat released v4.0 without changing its behavior with respect to formatting. |
|
@flashcode As implementer of the multiline spec, could you weigh in on this question? |
|
This has been stalled for some time. I agree that this is the only sensible way of doing it. Any other approach has no sane fallback mechanism. There is however one complication that hasn't been addressed: the current draft says says this about fallback clients:
If the servers don't maintain the lines as sent, this would again lead to different formatting between multiline and non-multiline clients. The only sensible approach to me here seems to be to turn that recommendation into a requirement, i.e. change the 'SHOULD' into a 'MUST'. |
Co-authored-by: JustAnotherArchivist <[email protected]>
|
Actually, the above would apply not only to fallback clients but also to multiline-capable ones; their representation would also change if the server didn't maintain what the author client sent. |
|
And that's fine. Servers have always been allowed to tamper with the text and color codes if they want to. |
|
I suppose so. Would a recommendation to insert formatting reset codes during such rearrangements (if needed) be reasonable? |
|
Have any client developers made an attempt at implementing this suggestion and have any thoughts? |
|
Alternative server-side implementation (not fully fleshed-out wording wise, just an idea at the moment). I'm interested to hear what ircd devs think of this feasibility-wise, etc. For each line in a multiline batch, keep track if there's an unterminated format code. When the server processes a new line in the batch, it will synthesize and inject a Example: Repeat example but replace <0x02> with <0x01>ACTION and <0x0F> with <0x01> for CTCP. As a note, these injected lines could cause the batch being sent to clients to exceed the stated max-lines or max-bytes limits. |
|
What makes it easier for servers to insert |
imo it's not easier to do this server-side, doing it client-side would be easier because there'd be no concerns about impacting send queue and the like (plus a lot of extra overhead on the wire to add one character). However if this is stalled because clients don't want to go through the effort or we're afraid of client fragmentation with some following spec and others not doing the format reset, then there are a lot fewer servers in active development than clients, so having consistency would involve fewer people to do said implementation. |
Inserting and the server inserts to clients who support batch/multiline, which is wrong because they would bold the second line and this: to clients who don't support batch/multiline, which is also wrong for the same reason. |
|
There are literally and objectively only 3 options here: either the server adds formatting codes to subsequent lines for fallback clients, or the non-fallback clients treat formatting as ending at the end of each line, or the behavior is different for fallback and non-fallback clients. If the desire is to have the server handle making sure the formatting is applied to subsequent lines for fallback clients - which I will note is not the one and only objection noted in this thread - then the server will have to wrap lines which become too long as a result of that formatting, which means multiline-concat should have just been clients opting into longer lines in the first place, and then servers could have wrapped lines being sent to fallback clients. (As has been pointed out before, of course, yet multiline has consensus...) |
|
Here's a hot take: we need less server-side message tampering, not more. |
This is the only way to format the fallback for multiline-unaware clients the same way as for multiline-aware clients