ucfopen / Obojobo

Next generation course content for your LMS. Easy for beginners, but powerful enough for researchers.
https://ucfopen.github.io/Obojobo-Docs/
GNU Affero General Public License v3.0
69 stars 34 forks source link

Differences in rendering lists between editor and viewer #1653

Open zachberry opened 3 years ago

zachberry commented 3 years ago

Shown in this example (Note the bullets):

Editor:

Screen Shot 2021-02-02 at 1 57 02 PM

Viewer:

Screen Shot 2021-02-02 at 1 57 05 PM

Here's the XML:

<List id="d7516e68-3583-4562-9b31-ec6fea836b53">
    <listStyles>
        <type>ordered</type>
        <indents>
            <indent level="0" type="ordered" bulletStyle="decimal"/>
            <indent level="1" type="ordered" bulletStyle="upper-alpha"/>
            <indent level="2" type="ordered" bulletStyle="upper-roman"/>
            <indent level="3" type="ordered" bulletStyle="decimal"/>
            <indent level="4" type="ordered" bulletStyle="upper-alpha"/>
            <indent level="5" type="ordered" bulletStyle="decimal"/>
            <indent level="6" type="ordered" bulletStyle="lower-alpha"/>
            <indent level="7" type="ordered" bulletStyle="lower-roman"/>
        </indents>
    </listStyles>
    <textGroup>
        <t indent="3" hangingIndent="false">1 List Level 1</t>
        <t indent="1" hangingIndent="false">A List Level 2</t>
        <t indent="6" hangingIndent="false">a Li    st Level 3</t>
        <t indent="3" hangingIndent="false">1 List Level</t>
        <t indent="7" hangingIndent="false">i List Level 5</t>
        <t indent="3" hangingIndent="false">2 Back to Level 4</t>
        <t indent="0" hangingIndent="false">1 Back to Level 1</t>
    </textGroup>
</List>
jpeterson976 commented 3 years ago

Did some digging around in the code, figured out what's causing the viewer to display lists differently. With the way that lists are created in viewer-component.js, if a line is more than one indentation level ahead of the previous one it will still create the list elements in between, they just get hidden, so items further down the list may have unexpected numbering. Commenting out the line of code that hides the list element shows the secret hidden structure of the list.

code that hides nested bullets list with un-hidden bullets
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep our backlog under control, but we thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep our backlog under control, but we thank you for your contributions.