Okay, I know it's been a long time since we did one of these but life does intrude on volunteer dev time. Hopefully this one will be worth the wait. Bear with me if I seem a bit off today, I'm writing this with a really fun head cold.
First, what didn't make it into this update but is directly upcoming. Bitpay is still down on account of them changing the API without notifying existing customers or versioning the new API and leaving the old one still up and functional. It's the first thing I'm going to work on after we get this update rolled out but it will basically require a complete rewrite. Don't expect it any earlier than two months from now because we like to test the complete hell out of any code that deals with your money.
Also, adding a Jobs nexus didn't quite make the cut because we're not entirely sure how/if we want to work it. One thing we are certain about, it would not be for headhunters or HR drones to spam us silly but for registered members who have a specific vacancy they need to fill and would like to throw it open to the community.
The API still has some broken bits but it's been low priority compared to what I've been busy with. I'm thinking I'll jump on it after Bitpay unless paulej72 cracks the whip and makes me fix bugs/implement features instead.
There were several other things that I had lined up for post-Bitpay but I can't remember them just now what with my head feeling like it's stuffed full of dirty gym socks.
Now let's throw the list of what did make it out there and go over it in more detail afterwards.
Morning Update: Really digging the constructive criticism. Some quality thoughts in there. Keep them coming and we'll see how fast we can get a few done. --TMB
Before the specifics, I know some of you are going to see the new Threaded modes and be like "that's pretty awesome" and some of you are going to call us dev types very bad names. Well, this ain't the other site. We're not saying "You Shall Use This Because It's New And Shiny". We're saying something had to be done about page load times approaching a full minute on heavily trafficked stories and the way we pulled and rendered comments made up nearly all of that time.
So, the first thing we did was we stopped pulling every single comment and then removing the ones we didn't want to display. Mostly that means that the comment counts in the dropdown menus for Threshold and Breakthrough are on a per-page basis now.
Next we did away with templates for comments. Wildcarded, case insensitive search and replace, even in perl, is horribly slow and that's a large part of how templates worked. The html and related logic is now hardcoded into the source. This did mean though that we had to entirely rewrite all the comment modes logic. Flat and Threaded-TOS are pretty much identical to the old Flat and Threaded, so there shouldn't be any surprises there except that we got rid of the javascript in Improved Threaded and gave every mode collapsible comments with nothing but CSS. Threaded-TNG is new-ish however. It's essentially Nested but without Threshold or every top-level comment being fully visible. If Nested users absolutely cannot live with that, we'll preempt working on the bitcoin rewrite and slap a Nested mode in as well. It shouldn't take but a week, testing included.
Third, we paginated every mode. I know it was nice being able to see every comment on one page but that meant pulling and rendering every comment and that simply doesn't work if a story has over a hundred comments.
The removal of sorting by score we can't roll back though. Its loss was a necessity due to the way we pull and sort only the comments that the user actually requests. Previously, we were pulling every single comment for a story and then removing the ones we didn't want. That was both bloody stupid and slow as hell, so it had to go. Unfortunately it means we have to do things slightly differently. It may make a triumphant return eventually but it would require some moderately tricky coding with the particular way our code is laid out.
Oh and if you have objections to the new Threaded modes, by all means bitch about specifics in comments here and we'll see what we can do to address them. After having spent so much time recently bashing on exactly these bits of code, we're quite familiar with them and changes/additions shouldn't take too terribly long to whip out.
Now to the specifics.
The buttons on the upper left of each comment don't work exactly like the Javascript version did but we do like how they work. The double chevron either shows or hides the comment tree beneath a comment but it does not change their collapsed/expanded state. The single chevron controls the expanded/collapsed state of each comment individually. Adding another button to expand/collapse every individual comment beneath a given comment may be doable but we haven't figured out how so far. It is high on the wish list but not high enough to delay the release any longer than it already has been.
Flat: Flat is still flat but now with a collapse/expand button that functions like the ones from Improved Threaded.
Threaded-TOS: If you can find significant differences between Improved Threaded and Threaded-TOS, let us know because it's probably a bug. The idea was to make it as much like Improved Threaded as technically possible with just CSS but paginated like Nested so we don't have to render more than 100 comments at a go. We defaulted everyone on Nested/Threaded/Improved threaded to Threaded-TOS to minimize the aggravation of unexpected change. Oh, and Breakthrough now takes precedence over Threshold, so high scoring comments will always be visible even if they're responding to blatant trolling.
Threaded-TNG: All comment trees start fully branched out but with the individual comments either expanded or collapsed. "Comment Below Threshold" functionality is gone. Breakthrough gets compared to a comment's score to decide if it gets expanded or collapsed. Play with it a couple minutes; it's not terribly hard to grok. Why do we need this mode if TOS covers most all of the best bits of the three old modes? Because I like it. You don't have to use it. Shut up.
What happened to Nested? What's old is new again. Threaded-TNG more or less is Nested but with the fun bits of Improved Threaded bolted on as well and without the annoyance of having to allow Javascript to run. Minus Threshold functionality. If you spot any serious differences between the two besides those, give us a heads up, because we didn't. It's a very easy mode to code on though, so if you absolutely cannot live without Threshold it's not at all difficult to clone it, add Threshold back in, and call it Nested.
Why not leave the old comment rendering modes in as well as the new ones? Because by rewriting them we got a rendering speed increase around a factor of two+, to go with the factor of two+ increase we got by pulling only the necessary comments instead of every last comment a story has with every page load. This has been becoming necessary as we increasingly go way above the 100 comment mark on busy stories. It's not cool for you lot to have to wait forty-five seconds to load a page of comments and it's even less cool to peg a cpu core for forty-five seconds to deliver it to you. If you ever again find a story that takes 10+s to load, something's going wrong and we'd appreciate a heads up. We think there's still some room in the code for improvement but this was the lowest-hanging fruit.
Now on to the rest of the details.
The Content Security Policy should cover what's required for operation of this site (plus allowing for Stripe payments) and nothing else. If your browser honors CSPs, it should not be possible to get smacked with XSS or inline script injection on this site any more; even if we write code buggy enough to allow it, which we have once or twice.
On dimmed comments... This only functions for logged in users currently as it would take some serious work to get it functioning for individual ACs, even using cookies. What it does is when you load a page of comments, it picks the highest comment ID from that story and marks that comment as read by you. Switching between pages of comments or changing your Threshold/sort order should not update which comments you have read, even if new ones have come in since your last read comment ID was set. Hitting the "Mark All as Read" button or hitting your browser's Refresh button on the main story page should take the stored comment ID and set the opacity to 60% on all the comments with a comment ID equal to or less than that. It's not entirely accurate but it's pretty damned close and it doesn't bloat the db much at all. Oh and read histories get wiped after two weeks of not being updated for a particular user/story combination to save on db space as well.
The new comment badge functions exactly opposite of dimmed comments. It puts "* NEW *" in the title bar of comments you haven't read yet. It's there strictly so you can have the same functionality but dislike the aesthetics of comment dimming. You can technically use both if you really want new comments to stand out but that would just be weird.
Returning to where you last moderated works like this. If you moderate one comment, you'll get sent back to that comment. If you moderate several in one go, you should get sent to the one farthest down the page. Moderating does not update the comment ID of what you've read for dimming purposes.
Returning to where you just made a comment? That's pretty self-explanatory. It also should not update the comment ID of what you've read for dimming purposes.
The Politics nexus. This does not mean we're looking to have even more political stories. The balance of tech/science/etc... to political stories is not going to change nor will the quality of accepted political submissions. It's primarily a way to let people who are sick and bloody tired of seeing politics here set a preference and never see political stories again. It's also handy if you wish to see what political stories we've run recently as clicking on the nexus link on the left of the page will show you only those stories.
The Reviews nexus has been brought up three separate times that I can remember by different groups of people, so we decided to go ahead with it. It's going to be a book/film/software/hardware/etc... review and discussion place. By my understanding, though I'm not really involved, it's getting its own space because some folks wanted to start what amounts to a site book club. Tech books will of course be welcome but it's open to all genres of printed and bound words. Ditto non-book reviews. Just don't go sending in a review of something we normally wouldn't publish news about on the site. Not enough people are going to be interested in your review of the barber shop down the street from your house, so it won't get published.
Spoiler tags, <spoiler>text you don't want casually seen</spoiler>, work both in stories and comments and are just a bit of css trickery that hide the text between them until the person viewing them hovers over the *SPOILER* text. There's a slight delay, so don't think it's not working because it's not immediate. That's intentional so you don't accidentally trigger showing the contained text by briefly crossing it.
By popular demand, <del> tags were also added.
That's all worth mentioning in this site update. Look for another one hopefully in May or late April. If you find any bugs, please slap them up as issues on our github repo or email them to dev@soylentnews.org.
(Score: 3, Interesting) by Aiwendil on Sunday February 26 2017, @10:09AM (11 children)
(I use threaded-TOS)
1] Could how much the dimming is done be a usersetting? (I like it, but it looks like my vision got wrecked, a 90-95% opacity would be nicer for me - but lot of people would miss that)
2] Everything after "Modding :N)" should go the the same small bar as the comment-id, excepting the "*NEW", it currently requires me to rescan the entire title visually to see who wrote something,also - makes it take longer to findnthe current moderation.
3] Scrolling inside comments - either get rid of it or put it at the same threshold as the old "read full comment", as it is I see very short comments require scrolling and I do not enjoy having to interact a lot when reading (also when at desktop I often need to reach for the mouse - so try the current way in keyboard-mode only).
4] I want the "reply to"-button (for a story) to be the right-most button, personal preference but it will make it easier to hit when on smartphone
5] when in chrime/android the reply-to textbox (where I write now) renders weirdly until you hit preview (ie - the textbox will expand over the preview/submit, but after hitting preview evertyhing works as expected), this was like thusi prior to this update as well.
(Oh look, this short comnent requires scrolling, so to preview I do now [on smartphone] I do now have to interact more... - yes, it really bugs me)
And just a "would be nice", could it be possible to increase the space between "preview" and "submit" (below where I type), I'm on a 4.3" screen...
Probably has a crapload of typos, but I'm not scrolling again
(Score: 2) by Aiwendil on Sunday February 26 2017, @10:19AM (7 children)
Also, on chrome/android, after moderating you get returned wit some element being much longer, which means now lines are being wrapped at longer than screen-width (which requires you to revisit the comment-page to not having to scroll horizontally as well).
And it seems like the reply-to button (chrime/android again) gets rendered bigger for your own comment (did'nt have "parent" nor moderation)
(Score: 2) by Aiwendil on Sunday February 26 2017, @10:36AM (2 children)
And while replying to myself.
Now qhen we have behavior based on previous load; could we get a "page generated at" near the top? (and maybe an amnesiac reload-button as well)
(Score: 2) by paulej72 on Sunday February 26 2017, @12:39PM (1 child)
We could add a page generated time, but the time you want is when you first loaded the story from the home page. As you comment and moderate a story, this time (saved as the highest comment id loaded at the time) is not updated. It only does so if you load the page from the home page, or click on the "Mark All as Read" button.
Turning the comment id back into a load time would be difficult, but showing the current time is simple, but not fully accurate. If I have been commenting, as I currently have been, that time will be out of sync with what the new comment highlighting is current showing.
(I have been commenting for 45 minutes now and all comments from 45 minutes ago are still showing as new to me.)
Also I am not sure where you would want this reload button and what you would like it to do. If you can explain it more, we may like the idea and add it.
Team Leader for SN Development
(Score: 2) by Aiwendil on Sunday February 26 2017, @10:29PM
A page generated would be enough - I more interested in if the last reload was before or after I left for work.
Might have been I misunderstood when the highest id was set (I tend to leave tabs open for the week or so I follow a story, and reload whenever chrome has gotten swapped out on smartphone or when going to the tab on desktop)
(Score: 2) by paulej72 on Sunday February 26 2017, @12:31PM (3 children)
Strange bug. Not sure what might be going on. Can you send a screen capture to dev@soylentnews.org. It would help us figure this out.
Looks like I will need to find a way to view chrome on android without having a device. I guess there is some dev environment that will allow this.
Team Leader for SN Development
(Score: 2) by The Mighty Buzzard on Sunday February 26 2017, @01:01PM
Tried Chrome and FF on two different Android phones. Couldn't replicate.
My rights don't end where your fear begins.
(Score: 2) by Aiwendil on Sunday February 26 2017, @10:25PM (1 child)
Sent. :)
Sorry for the slow reply, just got home. (And yes, that chrime/android as in a smartphone)
(Score: 2) by paulej72 on Monday February 27 2017, @03:34AM
Wow, that is strange. Going to need to research that one.
Team Leader for SN Development
(Score: 2) by paulej72 on Sunday February 26 2017, @12:27PM
1] We were afraid that a higher opacity would not be noticed as easily, so we added the NEW badge and gave you the choice of which to use.
2] We needed to create a new title bar to make collapsed comments easy to create without making a separate set hidden title bars. We will look into changing how things are displayed to make it easier to see.
3] Mentioned this above. We will be working on a fix for this soon.
4] Not sure if we will change this, but your comment is noted.
5] There was a last minute fix for the preview box that does need some additional tweaking. We will try to replicate this bug and try to fix it.
6] Yes we can see if we can ad some extra space between the buttons.
Team Leader for SN Development
(Score: 2) by The Mighty Buzzard on Sunday February 26 2017, @12:48PM (1 child)
6am, mid-coffee thoughts:
1) Hmmm, we could just dim the title bars but that wouldn't work for the vt100 theme at least, so we'd need to override it there.
2) The "NEW" badge was done at the last minute because someone complained about dimming not working well for their eyes. I have no doubts we could have done something better with it but we're currently lacking in the artsy-fartsy dept. We used to have a guy in charge of making pretty things but all we have now are devs, admins, editors, and SirFinkus. Which is a long way of saying we'll see if we can come up with better.
3) Yeah, I don't really like it myself. I'm thinking... I'm not sure what I'm thinking. Whatever we end up doing needs to take into account the vast majority of our traffic is ACs who can't use user preferences.
4) Love to help you out there but I think more people would be annoyed than helped out by changing that. Let me think on it some.
5) Can't replicate. Renders as expected aside from some font-size issues on both of my phones in both FF and Chrome.
6) Yeah, we can add a little space between buttons. Half an em or so of margin-left I think so Preview spaces away from the dropdown list as well.
My rights don't end where your fear begins.
(Score: 2) by Marand on Sunday February 26 2017, @03:12PM
In case my other comment [soylentnews.org] gets lost in the shuffle, I'm going to repeat part of it here because I haven't seen anybody else mention this so far;
Finally, I just noticed while writing this that comment preview loading is a bit strange now. I'm on a high-latency connection so it probably is more noticeable to me, but when I preview I'm getting an unstyled version of the page for a few seconds before the styles apply. This wasn't happening before the update, and doesn't occur on any other part of the site I've tested; it's exclusive to previews so far.
I use the Grayscale theme (as noted in my complaint about spoiler background being too close to Grayscale's comment background), so having the entire window flash white and look like it's being rendered by "links -g"* for several seconds every preview is rather jarring and a bit hard on the eyes.
* Seriously, I loaded links' graphics mode and compared, and the output's nearly identical except that Firefox's default background is brighter.