Page MenuHomePhabricator

New topic tool: "Subject" input in visual mode is treated as wikitext
Open, Needs TriagePublic

Assigned To
None
Authored By
Esanders
Jun 18 2022, 3:25 PM
Referenced Files
F35260260: image.png
Jun 21 2022, 3:20 PM
F35260262: image.png
Jun 21 2022, 3:20 PM
F35251241: image.png
Jun 18 2022, 3:25 PM
F35251247: image.png
Jun 18 2022, 3:25 PM
F35251245: image.png
Jun 18 2022, 3:25 PM
Subscribers

Description

Regardless of which mode you are (visual or source), the subject is treated as wikitext. Also in both modes we style the input with the same font as the final rendering, something we only usually do in visual modes (in source mode we usually use monospace to indicate wikitext).

In source mode there is at least a preview to help you catch any errors.

Discussion tools visual modeAfter publishing
image.png (290×686 px, 12 KB)
image.png (95×458 px, 13 KB)
Discussion tools source modeAfter publishing
image.png (369×692 px, 23 KB)
image.png (95×458 px, 13 KB)

Flow does not give us an example of what to do here, as it disables all formatting in the topic title, which we can't do without it being a regression from the old new topic tool.

Event Timeline

I think the most "consistent" fix here would be to:

  1. In visual mode, either:
    • (easy option) Escape any wikitext/html input from the subject field so it renders as you type it, and show the wikitext warning when any is entered (as we do in the body)
    • (hard option) Make the subject input a single-line VE surface with basic text formatting controls (italic, links)
  2. In source mode:
    • Style the subject input with monospace font in source mode

The engineers think we should start with the easy option to treat the subject input as visual but not formattable by escaping the input (e.g. It''s would be become It<nowiki>''</nowiki>s). At some point in the future we could support formatting via the toolbar (hard option).