Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurations HELP text gets wrapped to one line #1058

Open
gizmocuz opened this issue Dec 3, 2016 · 1 comment
Open

configurations HELP text gets wrapped to one line #1058

gizmocuz opened this issue Dec 3, 2016 · 1 comment
Assignees

Comments

@gizmocuz
Copy link
Contributor

gizmocuz commented Dec 3, 2016

If the original configuration file includes a help text that is spanned across multiple lines, and a node is included, the resulted configuration file from the user (zwcfg_xxxx.xml) will have a help text that is one line.

For instance, the NodeOn msp31xxMicroSmartPlug.xml

Original:

        <Value type="byte" index="3" genre="config" label="Follow State" size="1" min="0" max="3" value="3">
            <Help>
                This parameter allows Basic Set Commands to be sent when the channel output state changes (ON or OFF). Only the two least significant bits can be addressed.
                Bit 0: Enable or disable Basic Set Commands sent to associated nodes of Group 2, when Channel Output State changes.
                Bit 1: Enable or disable Basic Set Commands sent to associated nodes of Group 3, when Channel Output State changes.
            </Help>
        </Value>

After inclusion and the configuration file is written to disk:

               <Value type="byte" genre="config" instance="1" index="3" label="Follow State" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="3" value="3">
                    <Help>This parameter allows Basic Set Commands to be sent when the channel output state changes (ON or OFF). Only the two least significant bits can be addressed. Bit 0: Enable or disable Basic Set Commands sent to associated nodes of Group 2, when Channel Output State changes. Bit 1: Enable or disable Basic Set Commands sent to associated nodes of Group 3, when Channel Output State changes.</Help>
                </Value>

This results in a not so clean help text.

possible solutions:

# 1 (not tested)
place it in CDATA tags:

<![CDATA[ 
first line
second line
last line
]]>

# 2 Add "\n" behind each line
first line\n
second line\n
last line\n

Maybe in addition to this, do we need the help text in the final zwcfg_xxxx.xml file, or can we somehow retrieve it via the library out of the original file ? (Or maybe this help text can be created internally at startup ?)

@Fishwaldo
Copy link
Member

yep. Known issue. CDATA is the prefered method, as using a \n in the lines would "break" HTML widgets etc. Its on my plans for when I fix up the help text for builtin values. #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants