Context
When I tried to edit the lead of an article that used noinclude and includeonly (for excerpting purposes) using VisualEditor, it messed up the tags. Is this a known issue?
Approach
Principles
For this initial approach [1], it is important people editing articles in the visual editor that contain <noinclude>, <onlyinclude> and <includeonly> , to know the content wrapped in/affected by these tags:
- Is different from other content on the page they are editing
- Is different from other content on the page they are editing in that this content is being used by (read: transcluded onto) other page(s).
- If changed, will impact other pages that depend on/mirror it.
Implementation
With the above in mind, we would like to make the following changes to the current implementation [2]:
- CHANGE the <> that is currently displayed to the tag itself
- In this example, someone editing in VE would see: Hello <noinclude>there here</noinclude>! dfdfdf instead of Hello <>there here<>! dfdfdf
- ADD a "tooltip" that appears when the tag metaitem/node is clicked; this "tooltip" should appear and be presented in ways similar to what is currently done for comments <! ---
- These tooltips should include the following:
- Title: "⚠️ Warning"
- Call to action: None
- Contents:
- <noinclude>…</noinclude>: "Be careful when editing the content in between these tags. Other pages depend on it. To learn how these tags work, visit: Help:Inclusion control.
- <includeonly>…</includeonly>: "Be careful when editing the content in between these tags. Other pages depend on it. To learn how these tags work, visit: Help:Inclusion control."
- <onlyinclude>…</onlyinclude>: "Be careful when editing the content outside these tags. Other pages depend on it. To learn how these tags work, visit: Help:Inclusion control."
- These tooltips should include the following:
Open questions
The question below is now in the task description as well.
- How should <noinclude> and other similar tags be treated? As metaitems? As nodes?
- If this question has already been answered, please comment as much. Documenting it here b/c I remember it coming up during standup last week without it sounding like y'all (engineering) having arrived at an answer.
- Are there help pages for "inclusion control" at each wiki? If not, what is common practice when wanting to direct people to more information about something that is not written in that person's local langauge?
Done
- Open questions have been resolved
- Changes described in "Approach" > "Implementation" have been implemented
- We can revisit this implementation in: TASK
- http://patchdemo.wmflabs.org/wikis/4f42faac93ed6fba3a86431ad568623d/w/index.php/B?veswitched=1