SMF 2.1 RC4: Hard-coded hyphen in alerts div class="details"

Started by Antechinus, August 30, 2021, 08:39:34 PM

Previous topic - Next topic

Antechinus

OK, it works. If you only want default presentation. However, default presentation is all a bit jumbled up and a PITA to read at a glance. So, first thing I did was set the alerts menu to be the full width of ul id="top_info".

.top_menu {
    right: -3px;
    left: -3px;
    min-width: 15em;
    margin: 3px 0 0;
    padding: 7px;
}

That's an improvement. Makes things a bit less jumbled. But, it could still be cleaner and easier to scan if the various components were split to separate lines. Which can be done with CSS easily enough, except for that damned hyphen between the "alert_text" and "alert_time" spans.

Obvious fix:
Code ("Profile.template.php - Find") Select
                <div class="details">
                    <span class="alert_text">', $details['text'], '</span> - <span class="alert_time">', $details['time'], '</span>
                </div>

Code ("Profile.template.php - Replace") Select
                <div class="details">
                    <span class="alert_text">', $details['text'], '</span><span class="alert_time">', $details['time'], '</span>
                </div>


Code ("index.css - Find") Select
.profile_user_links li {
    font-size: .8rem;
    line-height: 2em;
    padding-left: 24px;
    text-indent: -24px;
    -webkit-hyphens: auto;
    hyphens: auto;
}
/* Fixes bug with border-box on scrollable js */
Code ("index.css - Replace") Select
.profile_user_links li {
    font-size: .8rem;
    line-height: 2em;
    padding-left: 24px;
    text-indent: -24px;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.alert_text::after {
    content: ' - ';
}
/* Fixes bug with border-box on scrollable js */

This way the default presentation stays the same, for anyone who can put up with it. But, if anyone wants to change the default presentation, they won't have to fight with hard-coded text. This is good. :)

ozp

Hi Antechinus

I see you have many good suggestions for improvements of SMF 2.1

I think it would be better if you submitted them as PRs or bugs to github.
That way you would get feedback right away.

Now someone needs to find the threads here and make it into PRs. Any feedback would go into the PR and the one doing the PR don't know the background.

Antechinus

If you want them as bug reports on GitHub you can have them. However, none of these things seriously break functionality, and you are at RC4 with your Final milestone looking pretty. How many presentation bugs will you want to deal with at this stage?

And, if I do file them on GiiHub, will they be implemented? Because frankly, if they are not going to be implemented, there's not much point. It's better to have them here as an easily-accessible record for anyone who wants to mess with 2.1 presentation.

As far as I'm concerned these are already implemented. I'm going through things writing custom overrides for this site, and I get them working before I post, so they're done and dusted (apart from any concerning actual changes to markup). From my perspective, GitHub would just be wasted time.

But, if you really want them there, and are prepared to create PR's for them and merge them into the dev branch, then sure I can post them on Github too. I'm not going to make PR's myself, because I view GitHub as something that just gets in the way of me implementing whatever I want to implement, so I have no interest in learning how to use it again. Been there, done that.

Not trying to be a bastard here. Just being honest. I'be been through this mill before. :)

Advertisement: