Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Hilighting Newest Nodes (implemented)

by Tanktalus (Canon)
on Apr 16, 2006 at 13:37 UTC ( [id://543641]=monkdiscuss: print w/replies, xml ) Need Help??

As per a previous post, I've gone and made some minor changes to the way that the newest nodes are shown. Prior to this change, your browser would get a class of "node-from-#####" where ##### is the node ID of the author of the node. Now, every alternate entry will get a class of "NN-highlight".

Note: this class matches the class of the CB. If you want hilighting to be different in CB vs newest nodes, you'll need to embed your CSS a bit differently. I think ".cb_table .highlight" will work for the CB, leaving ".highlight" to work for both or, if overridden for the CB, only for the newest nodes.

Old (slightly reformatted):

<table><tr class="node-from-391408"><td><a href="?node_id=543621">Puzz +le: Longest Increasing Sequence</a></td> <td>by <a href="?node_id=391408">TedPride</a></td></tr> <tr class="node-from-507927"><td><a href="?node_id=543595">calculating + the bpm of a song in mp3 format</a></td> <td>by <a href="?node_id=507927">keiusui</a></td></tr>
New (again, slightly reformatted):
<table><tr><td class="node-from-391408"><a href="?node_id=543621">Puzz +le: Longest Increasing Sequence</a></td> <td class="node-from-391408">by <a href="?node_id=391408">TedPride</a +></td></tr> <tr class="NN-highlight"><td class="node-from-507927"><a href="?node_i +d=543595">calculating the bpm of a song in mp3 format</a></td> <td class="node-from-507927">by <a href="?node_id=507927">keiusui</a> +</td></tr>
What we've done is move the node-from-##### class into the td's so that we can give the highlight class to the tr's.

How to take advantage: update your CSS to highlight these highlight rows the way you want. By default, you won't see any difference, unless you've already done this for the CB. See Recent changes to the color schemes for information on how/when the CB got this feature.

(Update: demerphq promised to apply the patch after seeing this note - so you may not see this change yet.)

Update: We've changed the class to NN-highlight due to the complaints (thanks, Corion). So now the people who want the highlighting will need to add this to their CSS manually.

Replies are listed 'Best First'.
Re: Hilighting Newest Nodes (implemented)
by Limbic~Region (Chancellor) on Apr 17, 2006 at 17:03 UTC
    Tanktalus,
    Yuk - I hate it. Why do I have to do anything to revert back to the old style? Why can't it be like the Re: Recent changes to the color schemes (plans) where it was removed as a default from the themes and those that wanted it could add it back using CSS. Seriously, it would be nice to have plain vanilla settings and a site doc whitepaper on customizing your personal experience. That way all the neat doodads would be summarized in a single place and people could pick and choose what works for them.

    Cheers - L~R

Re: Hilighting Newest Nodes (implemented)
by demerphq (Chancellor) on Apr 17, 2006 at 10:22 UTC

    As promised I've applied the patch.

    ---
    $world=~s/war/peace/g

Remove Hilighting Newest Nodes
by kutsu (Priest) on Apr 17, 2006 at 18:42 UTC

    I second the idea that it not be the default. This isn't because I don't like it (I don't though as it makes it very hard to read) but because to disable it you have to find the original background color and reset that yourself and for some of the monks less familiar with html and css this can, and proably will, cause a bit of confusion.

    So to help a few people along the way the css needed to remove highlighting (on the default themes and NN only) are:

Re: Hilighting Newest Nodes (implemented)
by demerphq (Chancellor) on Apr 17, 2006 at 19:42 UTC

    Tanktalus, could you please prepare a CSS patch so this is opt-out and not opt-in? I concur with those who feel its too intrusive by default. Alternatively a user setting to turn it on maybe. Its up to you, but I think it should be opt-in not opt-out.

    ---
    $world=~s/war/peace/g

      Adding user settings are far beyond my meager skill as a PMDevil. Would you rather see the highlighting patch change the class to NN-highlight, or go through and find any/all highlight CSS and remove it (thus affecting Saints in our Book, too)? Something tells me that more people would appreciate the latter than the former anyway.

        Either set up the common CSS so the highlighting is disabled for NN, or change it to be NN-Highlight as you say. And trust me user settings are trivial to work with, dont be intimidated by them. :-)

        ---
        $world=~s/war/peace/g

        I think more people would appreciate you just hand over your idea to someone who is capable of adding user settings, instead of forcing users to do a lot of work to revert to a situation they are perfectly happy with.

        --
        b10m

        All code is usually tested, but rarely trusted.
Re: Hilighting Newest Nodes (implemented)
by NateTut (Deacon) on Apr 17, 2006 at 13:36 UTC
    I like it much more readable. Its easier to select the nodes you want to review.
Re: Hilighting Newest Nodes (*RE*-implemented)
by Tanktalus (Canon) on Apr 18, 2006 at 21:47 UTC

    I've updated the main node, but am posting this just so that people may notice this thread being updated in RAT or NN.

    I've changed my CSS to be:

    tr.highlight, tr.NN-highlight { background-color: #eee; }
    This highlights everything lightly, the way I like it. Feel free to steal/modify to your liking. If you want no highlighting, as a lot of people seem to, then you shouldn't need to do anything. Or you may want to remove what you did do.

    I did not opt for a user setting on this. After looking at the theme code which is spread out over a few locations, and noticing demerphq's thoughts on PM CSS, I'm hoping to ride his coattails on that process instead. I agree with that node - we need to come up with something a bit simpler to use, with a lot more consistency to allow themes to work easily. No point in me going and trying to come up with something that needs to be reworked later anyway.

Re: Hilighting Newest Nodes (implemented)
by dorward (Curate) on Apr 17, 2006 at 22:31 UTC
    There is no need to move the node-from-##### class into the tds. In HTML, the class attribute accepts a list of space seperated classes, so class="node-from-##### highlight" is fine.
Re: Hilighting Newest Nodes (implemented)
by simon.proctor (Vicar) on Apr 18, 2006 at 08:58 UTC
    I'm afraid I went and fixed my personal CSS before even reading any nodes. I really don't like it.
    tr.highlight { background-color: #ffffff; }
    If that helps anyone change the colour or remove it if they hate it then there you go!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://543641]
Approved by atcroft
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found