Bug 970822

Summary: Injects are not rendered in the doc preview.
Product: [Community] PressGang CCMS Reporter: Jared MORGAN <jmorgan>
Component: Web-UIAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.1CC: lnewson, misty, mmurray
Target Milestone: ---   
Target Release: 1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-08 02:05:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 1 Lee Newson 2013-06-05 04:23:18 UTC
Firstly your syntax is incorrect for the injection, it should be <!-- Inject: <ID> --> (note the missing colon), so if that was correct then it would appear on the Docbuilder. However it would not appear on the live preview so I'm gonna edit the title to match that (also made your comment private since it has internal links).

Comment 2 Lee Newson 2013-06-06 04:36:57 UTC
*** Bug 971233 has been marked as a duplicate of this bug. ***

Comment 3 Lee Newson 2013-09-17 07:33:48 UTC
I've implemented a first pass at this in Build 201309171700.

Currently the injections aren't resolved fully and will only display the topic ID instead of the topic title (and the links are useless). It is done this way as it would be too slow to have to fetch each topics information and provide the rendering in a reasonable time frame. To do a full rendering we'd have to asynchronously load and replace the content, in the same way that images are loaded.

As an example see topic 3676 on the test server.

Comment 5 Jared MORGAN 2013-09-17 22:35:56 UTC
Yep, I corrected the injects at the time (as per an IRC with you) and they then rendered in the published doc.

This extra level of functionality in the test topic is actually pretty good. This way, displaying the injects like this shows you that you have structured them correctly. 

Early on, I was making the mistake with injects you detected in Comment#1 because I wasn't getting any feedback from the system that the syntax was incorrect. If new users know that they should see an in-line render of the referenced topic, that is a great visual key for them to know they've "done it right".

For now, I think this solution is fine.

Comment 6 Lee Newson 2013-09-17 23:23:36 UTC
Really the XML validation that is done should also check for any incorrect injection references, however we have BZ#997681 open to fix that issue.

I've also made another minor change to the initial pass. The links that are injected will now link to the editor for the injected topic.

Comment 7 Lee Newson 2013-11-08 02:05:19 UTC
I'm going to mark this as complete since it was released as part of 1.2 and if we want the titles instead of just the ids then a new bug/RFE should be opened.