Why is Flare adding value attributes in outputs?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

Why is Flare adding value attributes in outputs?

Postby chuck_agari on Tue Apr 30, 2019 12:02 pm

Here is the original code:

Code: Select all
 <ol>
            <li>Go to <span class="UI_interaction">Admin &gt; Users</span>.</li>
            <li>Click the name of a user.</li>
            <li>In the lower right, click the <span class="UI_interaction">Delete [username] entirely from...</span>&#160;link.</li>
            <li>Click <span class="UI_interaction">OK</span>.</li>
        </ol>


Simple, right?

Here is the output, and it is the same for both HTML5 and "Clean" XHTML:

Code: Select all
<ol>
            <li value="1">Go to <span class="UI_interaction">Admin &gt; Users</span>.</li>
            <li value="2">Click the name of a user.</li>
            <li value="3">In the lower right, click the <span class="UI_interaction">Delete [username] entirely from...</span>&#160;link.</li>
            <li value="4">Click <span class="UI_interaction">OK</span>.</li>
        </ol>


The value attributes, of course, are entirely unnecessary and clutter up the code. Anyone know why MadCap is doing this?
chuck_agari
Sr. Propeller Head
 
Posts: 166
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Postby doc_guy on Thu May 02, 2019 4:32 pm

They are unnecessary in your output because you built a clean list. However, not everybody builds clean lists. Sometimes they break the list and add an image and then restart the list and continue the numbering, or break the list and throw in a table and then continue the numbering. You'd be amazed at the way some people structure their content.

However, this presents an opportunity. It's not a native Flare feature, but I think you could use this to write some code that would let you refernence a specific step number in a list. (Like "repeat step 4 until all widgets have been added".) And it would dynamically get the step number from the value attribute. You'd just need to name the LI element... Anyway. I don't have a good answer to your question, just some ideas on why its there and how it could possibly be useful.
User avatar
doc_guy
Propellus Maximus
 
Posts: 1925
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West

Re: Why is Flare adding value attributes in outputs?

Postby chuck_agari on Mon May 06, 2019 12:23 pm

doc_guy wrote:They are unnecessary in your output because you built a clean list. However, not everybody builds clean lists. Sometimes they break the list and add an image and then restart the list and continue the numbering, or break the list and throw in a table and then continue the numbering. You'd be amazed at the way some people structure their content.

However, this presents an opportunity. It's not a native Flare feature, but I think you could use this to write some code that would let you reference a specific step number in a list. (Like "repeat step 4 until all widgets have been added".) And it would dynamically get the step number from the value attribute. You'd just need to name the LI element... Anyway. I don't have a good answer to your question, just some ideas on why its there and how it could possibly be useful.

You might think that it's true that I'd be amazed at the way people structure their content, but the truth is that I've spent so much time fixing such content from others over the years that I'm just resigned to the fact that it'll almost always be necessary when I'm given content authored by someone else. It's like they've never been trained in fundamental technical communication concepts. Oh, wait.....

When I want to add images or tables in lists, Flare often does not follow on automatically. I am often having to go into the code and "clean up" the intervening </ol><ol> tags that Flare "helpfully" adds. But this is not at all "helpful." Perhaps another example of no one being brave enough to say "No, that's a terrible idea to foist upon industry professionals" because in the modern workplace, no ideas are bad ideas?
chuck_agari
Sr. Propeller Head
 
Posts: 166
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Postby ChoccieMuffin on Tue May 07, 2019 3:34 am

chuck_agari wrote:...
When I want to add images or tables in lists, Flare often does not follow on automatically. I am often having to go into the code and "clean up" the intervening </ol><ol> tags that Flare "helpfully" adds. But this is not at all "helpful." Perhaps another example of no one being brave enough to say "No, that's a terrible idea to foist upon industry professionals" because in the modern workplace, no ideas are bad ideas?


The way to deal with that situation (where there are images in between bullet points) is to do it properly :lol: :wink: and include the image in its own paragraph as part of the li item it relates to, so you still only have a single list.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2017
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Why is Flare adding value attributes in outputs?

Postby chuck_agari on Tue May 07, 2019 9:59 am

ChoccieMuffin wrote:
chuck_agari wrote:...
When I want to add images or tables in lists, Flare often does not follow on automatically. I am often having to go into the code and "clean up" the intervening </ol><ol> tags that Flare "helpfully" adds. But this is not at all "helpful." Perhaps another example of no one being brave enough to say "No, that's a terrible idea to foist upon industry professionals" because in the modern workplace, no ideas are bad ideas?


The way to deal with that situation (where there are images in between bullet points) is to do it properly :lol: :wink: and include the image in its own paragraph as part of the li item it relates to, so you still only have a single list.

Yup. I even have a CSS selector for <p> elements that are children of <li> elements.

Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.
chuck_agari
Sr. Propeller Head
 
Posts: 166
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Postby Dave Lee on Wed May 08, 2019 12:14 am

chuck_agari wrote:Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.


When you're in a list item (li), to add a paragraph (p) tag just press Ctrl+; or right-click the li tag and select Make Paragraph item(s).

Once you've inserted the paragraph, you can also change it to any block element (div, etc.) by selecting from the style list, or you can insert things like tables, snippets, or dropdowns.

It should be fairly rare that you have to go into the Text editor view to manually edit code in a list.
Dave Lee
Master Propellus Maximus
 
Posts: 5535
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Why is Flare adding value attributes in outputs?

Postby chuck_agari on Mon May 13, 2019 10:34 am

Dave Lee wrote:
chuck_agari wrote:Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.


When you're in a list item (li), to add a paragraph (p) tag just press Ctrl+; or right-click the li tag and select Make Paragraph item(s).

Once you've inserted the paragraph, you can also change it to any block element (div, etc.) by selecting from the style list, or you can insert things like tables, snippets, or dropdowns.

It should be fairly rare that you have to go into the Text editor view to manually edit code in a list.

Hm, interesting tip.

I've tried to make a habit of not doing Shift-Enter to add lines just because I want CSS to properly style every block. Ctrl-Enter is a twist that I'll try out.
chuck_agari
Sr. Propeller Head
 
Posts: 166
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Postby ChoccieMuffin on Tue May 14, 2019 4:54 am

chuck_agari wrote:
Dave Lee wrote:
chuck_agari wrote:Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.


When you're in a list item (li), to add a paragraph (p) tag just press Ctrl+; or right-click the li tag and select Make Paragraph item(s).

Once you've inserted the paragraph, you can also change it to any block element (div, etc.) by selecting from the style list, or you can insert things like tables, snippets, or dropdowns.

It should be fairly rare that you have to go into the Text editor view to manually edit code in a list.

Hm, interesting tip.

I've tried to make a habit of not doing Shift-Enter to add lines just because I want CSS to properly style every block. Ctrl-Enter is a twist that I'll try out.


Chuck, it's Ctrl + semi-colon, not Ctrl+Enter. What that does is change the structure from ol > li to ol > li > p. When you then press Enter, you have two p's inside your li, so you can indeed use styles properly. Give it a go, or try the clicky stuff Dave described: "right-click the li tag [in the structure bar at the left of the screen] and select Make Paragraph item(s)."

Let us know how you get on.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2017
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Web-based Outputs

Who is online

Users browsing this forum: Google [Bot] and 3 guests