moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
55 stars 49 forks source link

Footnote ignores paragraph breaks #623

Closed pd431 closed 2 months ago

pd431 commented 2 months ago

Describe the bug Setting the footnote through Boost-Union settings to text with two paragraphs displays all text on a single line.

To Reproduce Steps to reproduce the behavior:

  1. Go to Boost-Union/Content/Footnote

  2. Set footnote to :

    <p><a href="https://www.importantwebsite.com/link1">Important Link 1</a></p>
    <p><a href="https://www.importantwebsite.com/link2">Important Link 2</a></p>
  3. Save

  4. Scroll down to footnote, where both links are next to each other : Important Link 1Important Link 2

Expected behavior The formatting in the footnote looks the same as in the editor:

Important Link 1

Important Link 2

That behaviour can be emulated by adding line breaks (shift+Enter, or
tag)

Screenshots Editor, correct layout: image

Footnote, incorrect layout image

Additional context The issue was noticed when we migrated our environment to Moodle 4.1.8, might have also upgraded other things at the same time. Unsure where the source of the issue is, could be upstream.

abias commented 2 months ago

Thank you @pd431 for reporting this glitch. I think I found the issue.

In the footnote, there was a .row element included by mistake.

The definition of this class is:

.row
{
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

However, there wasn't any .col element included in the footnote as well. That way, the flexbox definition of the row element was propagated down to the paragraphs which you added to the footnote and the paragraph breaks practically got lost.

I will now simply remove the .row elements and make sure that the layout of the footnote is still correct.