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 {key ~~~~} 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 is description a of **Approach #1**://
**Scenario A**
1. When someone types {key ~~~~} 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 {key command} + {key Z}. Note: typing ~~~~ to sign your comments using this tool is not required; it will add your signature automatically.**
2. When someone saves this comment:
-- An additional signature will //not// be appended. Said another way: only one signature should appear.
**Scenario B**
1. When someone types {key ~~~~} 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.*
2. When someone saves this comment:
-- An additional signature will //not// be appended. Said another way: only one signature should appear, the signature in the middle of this person's comment.
-- A `[ reply ]` link should appear at the //end// of the comment despite the person's signature appearing in the middle of it.
//*Note: the hint will be shown //each// time someone types {key ~~~~} in the Reply tool's `visual` mode.//
=== Open questions
- [ ] 1. **Approach #1:** What happens when someone includes a signature in the middle of the comment they are writing?
-- //See: T255738#6257560//
- [x] 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.//
- [x] 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
=== 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 {key ~~~~}, present a warning/instruction that informs them of two things: 1) the tool automatically signs comments and 2) if the {key ~~~~} 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 {key ~~~~}, 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 {key ~~~~} 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**
1. Current edit warning treatment:
{F31875792}
---
Reported by:
- @Barkeep49 here: https://www.mediawiki.org/wiki/Topic:Vnfm31gam3etc1zb
- @Kaartic here: https://www.mediawiki.org/wiki/Topic:Vnsesw6xaisydeyx