This task is about making it more clear to people drafting a comment in the Reply tool's visual mode that their signature will automatically be added/included in the comments they post.
Situation
- Experienced contributors writing a comment in the Reply tool's visual mode may not expect for the tool to automatically sign the comment they are drafting.
- Accordingly, they may enter ~~~~ to sign the comment they are writing
- Upon posting the comment they've just written, they notice their signature along with ~~~~ appears appended to the comment they just posted to the page.
Implementation details
The below describes how Approach #1 will function:
Scenario A
- When someone types ~~~~ in the Reply tool's visual mode at the end of their comment:
- The ~~~~ will be transformed into the signature they have set for their account
- A hit would be shown that says the following:*
- TITLE: Signature markup detected.
- BODY: ~~~~ has been transformed into your signature. To undo this, type ⌘ + Z. Note: typing ~~~~ to sign your comments using this tool is not required; it will add your signature automatically.
- When someone saves this comment:
- An additional signature will not be appended. Said another way: only one signature should appear.
Scenario B
- When someone types ~~~~ in the Reply tool's visual mode that is not at the end of their comment:
- The ~~~~ will be transformed into the signature they have set for their account
- The same "hint" described above will be shown.*
- When someone saves this comment:
- An additional signature will
notbe appended. Said another way:only onetwo signatures should appear, the signature in the middle of this person's comment and the signature at the end of the person's comment. - A [ reply ] link should appear at the end of the comment, following the ending signature
despite the person's signature appearing in the middle of it.
- An additional signature will
Reason for revision
As @Esanders identified when we talked about this today, if we do NOT adjust the software such that it appends signatures to comments signed in the middle, the comment parser will be less reliable because, in these cases [i], it will mistake one comment as being two.
*Notes about the "hint" implementation:
- Frequency: the hint will be shown each time someone types ~~~~ in the Reply tool's visual mode.
- Dismissal: the "hint" can be dismissed by clicking elsewhere in the Reply tool's text input or by pressing ⎋.
- Location: the "hint" should be presented as it is shown here:
Open questions
- 1. Approach #1: What happens when someone includes a signature in the middle of the comment they are writing?
- The ~~~~ they typed will be transformed into a signature; the [ reply ] link will be appended to the end of their comment and no additional signature will be added. See: T255738#6257560
- 2. Approach #1: How might someone write a comment like, ""You can sign your comments with ~~~~.
- People can type + and the signature "transformation" will be undone. As a result, people will see ~~~~ in the tool's visual mode and <nowiki>~~~~</nowiki> in the tool's source mode. See: T255738#6262917.
- 3. Approach #1:what can be done to preserve ~~~~ when someone types ~~~~ in the tool's visual mode, switches to source, switches back to visual and then back to source once more?
- Fixed per T255738#6265254
- 4. What should the text inside the "hint" say?
Observed cases in production
- User A
- 18-June @ 08:05: https://w.wiki/UY$
- 18-June @ 10:57: https://w.wiki/UYz
- 18-June @ 13:26: https://w.wiki/UYy
- User B
- 18-June @ 12:11: https://w.wiki/UZ5
- User C (22 comments posted with visual mode as of 22-June at 17:46 PST)
- 19-June @ 11:04: https://w.wiki/Uwi
- 20-June @ 20:20: https://w.wiki/Uwk
Approaches
- Approach #1: On pages where VE is enabled and signatures are allowed, typing ~~~~ will convert itself into a signature/selectable node.
- Approach #2A: After a user types ~~~~, present a warning/instruction that informs them of two things: 1) the tool automatically signs comments and 2) if the ~~~~ they typed are left, they will be wrapped in <nowiki> tags when published.
- Note: unless changed, the "warning/instruction" mentioned above would be presented in the same way edit warnings currently are.[1]
- Approach #2B: Before a user types ~~~~, present a warning/instruction that informs them of two things: 1) the tool automatically signs comments and 2) if they do want to leave the ~~~~ in the comment they are writing, the tildes will be wrapped in <nowiki> tags when published.
- Note: we did not talk about where/how this communication would be presented.
Notes
- Current edit warning treatment:
Reported by: