Split messages for display already, to indicate "spam" and/or link breakage

RESOLVED FIXED

Status

--
enhancement
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Gijs, Assigned: Gijs)

Tracking

(Blocks: 1 bug, {access})

Trunk
access
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.82], URL)

Attachments

(1 attachment, 1 obsolete attachment)

6.10 KB, patch
bugzilla-mozilla-20000923
: review+
Details | Diff | Splinter Review
(Assignee)

Description

11 years ago
(I remember we had a discussion about this in #chatzilla aaaaaages ago, but apparently we never filed a bug)

Reasoning:
To reflect that messages never contain newlines, we should split the messages at display time already. This will also inform the user that they're "spamming" if they send a multiline message. Furthermore, the <br>s we insert cause problems in the a11y code of Mozilla. This is a bug in there, but I severely doubt it will get fixed for 1.9, and we should try to work around it given it is a more exact representation of what happens anyway.



Because we don't want to remove the splitting feature from the IRC library, I believe we should split it out of messageTo, leave it in the library, and add a flag (true by default) on the network indicating whether messageTo should still employ the code, or that it can assume that the splitting has been done, and then employ the splitting in ChatZilla's UI code (and set the flag to false).

Updated

11 years ago
OS: Windows 95 → All
(Assignee)

Comment 1

11 years ago
Created attachment 318852 [details] [diff] [review]
Simplify some code

This is really an initial step, to remove some code duplication. Doing this first, I *think* will make life easier afterwards. Though I could be wrong. I think it's a good change to take anyway.

(note: this bug is actually much harder than I thought :-( )
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #318852 - Flags: review?(silver)

Updated

11 years ago
Attachment #318852 - Flags: review?(silver) → review+
(Assignee)

Comment 2

11 years ago
Created attachment 318903 [details] [diff] [review]
Patch

This patch actually works. Cough. :-)

Seriously though, it's basically the same as the last one, but now with the split code copied across to static.js, and used to send as well as display line by line. Things should work like this, though I just realized that I should probably include another comment in irc.js that those lines are copied to static.js, and to keep them in sync.
Attachment #318852 - Attachment is obsolete: true
Attachment #318903 - Flags: review?(silver)

Updated

11 years ago
Attachment #318903 - Flags: review?(silver) → review+
(Assignee)

Comment 3

11 years ago
Checking in mozilla/extensions/irc/xul/content/commands.js;
/cvsroot/mozilla/extensions/irc/xul/content/commands.js,v  <--  commands.js
new revision: 1.152; previous revision: 1.151
done
Checking in mozilla/extensions/irc/xul/content/static.js;
/cvsroot/mozilla/extensions/irc/xul/content/static.js,v  <--  static.js
new revision: 1.271; previous revision: 1.270
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.82]
You need to log in before you can comment on or make changes to this bug.