in reply to Re: Recent threads - Show toggle on the left: indentation
in thread Recent threads - Show toggle on the left: indentation

It would seem most straightforward to prepend lines without the +/- with some non-breaking space or a <div> of a certain width or a left margin etc on the server side.

Replies are listed 'Best First'.
Re^3: Recent threads - Show toggle on the left: indentation
by LanX (Saint) on Mar 09, 2024 at 16:27 UTC
    > the +/- with some non-breaking space or a <div> of a certain width or a left margin etc on the server side.

    For the record

    • it should be a span, not a div
    • the +/- are already inside a span with a dedicated CSS-class nnt-toggle , use your browsers console to investigate further
    • a clean solution would (may) try to prepend an "empty" (or &middot; · ?) span for "leaf" nodes, but with the same toggle class. Like that the width of indentation is consistently controlled for all lines.
    • probably best with em units, to fit font size
    • the code in question has around 1330 lines to cover all possible config options for RAT, not counting code of "subroutines" called from within
    • there -> handle_threaded_nodes
    • various generations of gods left their mark in the code, without making it more readable (surprise)
    • it's easy to identify where the +/- are added to the left, but not so much where not
    • Update: it must be taken care that all view-modes render well with said indentation.
    As I already mentioned, we have more urgent problems, but you or others could apply for pmdev and provide a patch.

    HTH :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

Re^3: Recent threads - Show toggle on the left: indentation
by LanX (Saint) on Mar 07, 2024 at 23:16 UTC
    I had no time to look into the design yet, might be table based, tho I seem to remember <dl> nesting.

    Anyway what you propose must be hidden, in case the toggle is switched to the right.

    Only to mention one complication.

    Disclaimer: we have more urgent problems, I won't be able to provide a patch for that.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

      The switching from left to right is done by the server via a form submit, so if it's to the right you wouldn't prepend anything. No need to "hide" anything.