Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Antechinus on August 28, 2021, 10:40:54 PM

Title: Deprecated CSS class - lpr_border
Post by: Antechinus on August 28, 2021, 10:40:54 PM
I remember this one.

There was a pull request put in some time ago, that apparently deleted this from the CSS, and substituted a simple border added to .lastpost in responsive.css. The reason being that a purely presentational class, that only appeared in one place anyway, and might annoy anyone who didn't want a border there anyway, was not worth having in the markup.

Which is all groovy, but someone forgot to actually remove said class from the markup. :P

Code (BoardIndex.template.php - Find) Select
// Show the last post if there is one.
echo'
<div class="lastpost lpr_border">

Code (BoardIndex.template.php - Replace) Select
// Show the last post if there is one.
echo'
<div class="lastpost">

Code (MessageIndex.template.php - Find) Select
// Show the last post if there is one.
echo '
<div class="lastpost lpr_border">

Code (MessageIndex.template.php - Replace) Select
// Show the last post if there is one.
echo '
<div class="lastpost">

Hey presto, groovy new markup now matches existing CSS. You know you want it. :)
Title: Re: Deprecated CSS class - lpr_border
Post by: Antechinus on September 02, 2021, 05:11:11 PM
Just found the relevant commit for this one: github.com/SimpleMachines/SMF2.1/pull/6502 (https://github.com/SimpleMachines/SMF2.1/pull/6502/commits/015e8b4836d0a544e49e914406244f092688259c).
And yes, it gets rid of the deprecated class from the CSS, but leaves it in the markup. Seems odd.

Also, that commit ties in with this: Redirect boards on mobile - div.lastpost better hidden (https://www.simplemachines.org/community/index.php?topic=578705.0). The code that was removed from the markup in pull/502 was obviously intended to drop empty .lastpost divs on mobile, with redirect boards being the obvious target case on a mature forum. But, IMO it's still better handled by appending the board type as an extra class for the .up_contain div.

(Incidentally, whoever thought it was a good idea to call the board row wrapper divs "up_contain"? It would be hard to invent a less clearly descriptive class name for them. Using "board_row" for the class name would have been infinitely more sensible, and could still easily be done before Final.)