#dev | Logs for 2017-03-18
« return
[01:19:39] <Bytram> paulej72: TheMightyBuzzard: I suspect it's too late for it, now, but wemissed a chance to add a green tint to the site in observance of st patrick's day, today.
[01:20:12] <Bytram> not like the green of the other site, but a REAL green, #0F0, or similar =)
[01:27:24] <paulej72> I wanted to do a green theme and add it to the site
[01:27:39] <paulej72> maybe I could poop out one
[01:28:03] <paulej72> must find my soylent wrapper files though
[01:32:01] <Bytram> evensomething as subtle as changing the background color to "lime green"on base.css would prolly suffice.
[12:20:51] <Bytram> TheMightyBuzzard: while we are messing with the code base, there's a long-standing thing in the story editor interface that bugs me... the topic editor 'window' works MUCH better on dev than it does on prod... might be as easy as swapping just a js and/or css file, from what I can tell.
[12:21:22] <Bytram> for one, the topic *tree* is immediately visible for me on dev, and on prod it does not even seem to work. :(
[12:21:50] <TheMightyBuzzard> search me, i got no idea how it works aside from probably being javascript
[12:23:06] <Bytram> I loaded up both, looked at page source, did a D/L of the JS for each, and they are different in basically one place... the code that actually *does* the picking/displaying/etc.
[12:23:16] <Bytram> or so it seems to me.
[12:23:28] <Bytram> hmmm, I wonder what is used on the staff server
[12:24:20] * TheMightyBuzzard shurgs
[12:24:30] <paulej72> huh
[12:24:54] <paulej72> works fine for me on both
[12:25:19] <Bytram> do you have taky's 'upgrade' in place? I'm using plain vanilla
[12:25:52] <paulej72> topic tree code is generated by a slash job
[12:26:20] <paulej72> no taky upgrad for me either
[12:26:32] <Bytram> tree looks fine on chillax for me
[12:27:03] <Bytram> //chillax.soylentnews.org/admin-topic-popup.js?rehash_17_02
[12:27:43] <TheMightyBuzzard> paulej72, we really should move the js calls to pulling from the api. after i make the api able to do that stuff.
[12:28:00] <Bytram> https://dev.soylentnews.org
[12:28:01] <aqu4> No title found.
[12:28:06] <Bytram> https://soylentnews.org
[12:28:07] <aqu4> No title found.
[12:34:24] <paulej72> TheMightyBuzzard: I am not aginst it
[12:34:55] <paulej72> Bytram: the only difference seems to be the dense part tha t build the tree
[12:35:07] <Bytram> that's what I saw, as well
[12:35:27] <paulej72> not sure why it is not working for you.
[12:35:39] <Bytram> unless... there is some differences in the .css for them?
[12:36:04] <paulej72> css should be almost identical
[12:36:36] <paulej72> check to see if is a theme problem, wich I doubt
[12:37:29] <Bytram> I'm using default on dev... OMGPwnies on prod... could be it, I suppose.... lemme check
[12:37:44] <Bytram> btw, while I have it in my paste buffer:
[12:37:44] <Bytram> /chillax.soylentnews.org/admin-topic-popup.css?rehash_17_02
[12:38:05] * TheMightyBuzzard wanders off in search of nicotine
[12:38:51] * Bytram changes Homepage them preference from OMGPwnies to Site default
[12:39:38] * Bytram edits "Seal Whiskers" story on prod
[12:40:01] * Bytram clicks on "+"
[12:40:39] * Bytram sees "Select Topics" window display, has just a text-entry box and a list of underlines letters, A-Z
[12:41:08] * Bytram clicks on "Tree" button, "Select Topics" window disappears
[12:41:10] <paulej72> take a screen grab and post it
[12:41:11] <Bytram> :(
[12:41:38] <Bytram> do we have a place on SN where I canpaste it to?
[12:42:16] <Bytram> if we don't, it would be really handy... this is far from the first time we've needed to do something like this.
[12:42:53] <paulej72> http://imgur.com :)
[12:42:54] <aqu4> ^ "3 Imgur: The most awesome images on the Internet "
[12:43:52] <Bytram> and why do they provide that for free? because WE are the product.
[12:44:08] <paulej72> Bytram: do you have the dev tools available in your browser?
[12:44:12] <TheMightyBuzzard> Bytram, used to do that for me as well. then it stopped.
[12:45:07] <Bytram> sorry, my connection hiccup'ed
[12:47:05] <paulej72> both front ends as displaying the same js file
[12:47:10] <TheMightyBuzzard> Bytram, it started working for me again when i changed browsers and NEVER clicked the button that lets you search through topics/nexuses again
[12:47:37] <TheMightyBuzzard> so it's likely a cookie
[12:48:00] <Bytram> hrmmm
[12:48:18] <Bytram> TheMightyBuzzard: so have you seen the problem I am describing?
[12:48:25] <paulej72> gets stuck on search mode
[12:48:32] <paulej72> I just did it to myself
[12:48:38] <Bytram> not see tree & when click on tree button, topic window goes away
[12:48:54] <Bytram> so, reproducible?
[12:49:06] <TheMightyBuzzard> yes, it's a proper bug but i know not enough bout javascript to figure it out and fix it.
[12:49:21] <paulej72> ok I'll see what I can do
[12:49:46] * Bytram changes his theme back to pwnies on prod
[12:51:10] * Bytram wonders how well hexchat handles multi-octet unicode chars... 𐀀𐀁𐀂𐀃𐀄𐀅𐀆𐀇𐀈𐀉𐀊𐀋𐀍𐀎𐀏
[12:51:10] <Bytram>
[12:51:41] <Bytram> 3-octet:ࠀࠁࠂࠃࠄࠅࠆࠇࠈࠉࠊࠋࠌࠍࠎࠏ
[12:51:48] <TheMightyBuzzard> just fine if you have the right fonts installed
[12:51:52] <Bytram> 4-octet: 𐀀𐀁𐀂𐀃𐀄𐀅𐀆𐀇𐀈𐀉𐀊𐀋𐀍𐀎𐀏
[12:52:01] <Bytram> yep, lookin good!
[12:52:28] * TheMightyBuzzard goes back to digging an enormous hole in minecraft
[12:52:38] <Bytram> time for coffee and cleanup... biab
[12:52:46] <Bytram> thanks guys!
[13:24:31] <paulej72> Bytram: fixed on prod
[13:30:18] <paulej72> and on the other two
[13:30:46] <paulej72> missing ID on a div was causing the js on the button switch to error out
[13:31:41] <paulej72> 8 year old code
[13:40:04] <TheMightyBuzzard> woot! lurve me some eight year old code
[15:06:50] <paulej72> OK I have decided to start purging uneeded JS code from the code base
[15:30:46] <TheMightyBuzzard> heh, luck with that.
[15:31:09] <TheMightyBuzzard> i can't read the stuff well enough to see what is and what isn't very quickly
[15:36:04] <TheMightyBuzzard> paulej72, don't nuke the Improved Threaded code just yet. ima hack it into working for a new mode probably next week.
[15:46:32] <paulej72> TheMightyBuzzard: that code uses a plugin, I would rather do it with Jquery.
[15:46:47] <TheMightyBuzzard> does it? blerg
[15:47:00] <paulej72> xpath waling code
[15:47:05] <TheMightyBuzzard> jquery is a plugin in though.
[15:47:13] <TheMightyBuzzard> a pretty large one relatively even
[15:47:31] <paulej72> bur eveyone uses it
[15:48:51] <TheMightyBuzzard> ima see if i can do up something monday that'll do it without using external js libs. shouldn't be TOO hard...
[15:49:58] <paulej72> yes it will
[15:50:26] <paulej72> traversing the tree of a sibling is a bitch
[15:50:37] <paulej72> with just pure js
[15:51:38] <paulej72> Jquery minified is only 84K uncompressed
[15:53:37] <TheMightyBuzzard> mmm
[15:54:43] <TheMightyBuzzard> oddly, it's EASY to select a sibling and all its children, or even only selective children with css
[15:54:59] <TheMightyBuzzard> just can't check checkboxes
[15:55:54] <TheMightyBuzzard> oooh... could cheat and use checkboxes. just make the js set them checked and use css for the display= state
[15:56:10] <TheMightyBuzzard> since we already got code written for just such an occasion
[15:56:19] <paulej72> that is what we are doing now, its getting JS to check the correct boxes
[15:56:24] <TheMightyBuzzard> ahh
[15:57:36] <paulej72> I am going toread up a bit on it and see if there is a quick way to do this wiht straight js
[16:01:36] <TheMightyBuzzard> aight. ima continue my weekend of not doing a damned thing productive.
[16:02:47] <paulej72>
[16:02:47] <paulej72> You need to accept the param named divId then use :enabled filter to filter out disabled checkboxes
[16:02:47] <paulej72> function uncheckAll(divid) {
[16:02:47] <paulej72> $('#' + divid + ' :checkbox:enabled').prop('checked', false);
[16:02:47] <paulej72> }
[16:02:48] <paulej72> Demo: Fiddle
[16:02:50] <paulej72> If no jQuery
[16:02:52] <paulej72> function uncheckAll(divid) {
[16:02:54] <paulej72> var checks = document.querySelectorAll('#' + divid + ' input[type="checkbox"]');
[16:02:56] <paulej72> for(var i =0; i< checks.length;i++){
[16:03:00] <paulej72> var check = checks[i];
[16:03:02] <paulej72> if(!check.disabled){
[16:03:04] <paulej72> check.checked = false;
[16:03:06] <paulej72> }
[16:03:08] <paulej72> }
[16:03:10] <paulej72> }
[16:12:20] <TheMightyBuzzard> thas not bad at all
[16:20:13] <paulej72> well if I can get it to work it will be
[16:24:17] <paulej72> Ok I think I can get this to work. How about a button that just open evything under a given comment
[16:29:31] <TheMightyBuzzard> if it'll close it again, sure
[16:29:53] <TheMightyBuzzard> if you just want to open everything below a comment, i can do that in css easily
[16:38:19] <paulej72> TheMightyBuzzard: I want to open everyting without casuing the state to get locked, a css only solution will do that
[16:39:09] <paulej72> but I am thinking of a button that will open all (parent + childern) and if you want to not see it. use the collapse tree)
[16:39:24] <TheMightyBuzzard> hrm
[16:39:31] <paulej72> I think I can even set it up so that if JS is disabled it will not show the button
[16:39:41] <paulej72> function expandAll(cid) {
[16:39:41] <paulej72> var checks = document.querySelectorAll('#tree_' + cid + ' input[type="checkbox"]');
[16:39:41] <paulej72> for(var i =0; i< checks.length;i++){
[16:39:41] <paulej72> var check = checks[i];
[16:39:41] <paulej72> if(!check.disabled){
[16:39:42] <paulej72> check.checked = false;
[16:39:46] <paulej72> }
[16:39:48] <paulej72> }
[16:39:50] <paulej72> }
[16:40:05] <TheMightyBuzzard> paulej72, you can do that all by css though.
[16:40:56] <paulej72> no you can't, if you set a button to open all children via css the childeren's buttons will be stuck open
[16:41:05] <TheMightyBuzzard> well no, not being able to collapse individual bits of it after you've done it
[16:41:25] <TheMightyBuzzard> nah, css can't change the button state
[16:41:26] <paulej72> the JS solution is not sticky
[16:41:49] <TheMightyBuzzard> it can just make the css fight over whether it's display none or block
[16:42:22] <paulej72> css cant change the stat, but the childeren buttons will be rendered useless as the partent forced open the comments
[16:42:28] <TheMightyBuzzard> yup
[16:42:39] <paulej72> we don't want that
[16:43:12] <TheMightyBuzzard> i could see it being useful but yeah
[16:43:13] <paulej72> but this bit of js code will do the same thing, I jsut need to code it up to a button
[16:44:09] <paulej72> most people bitched that they could not open all coments easily, this will do it and if no js, the css buttons will still work
[16:44:24] <paulej72> except for that one dude that does not do css :)
[16:46:30] <paulej72> I am going to code it up and see how it works, we can tweak it later
[16:46:34] <TheMightyBuzzard> he can live with it. i'm not making the site "degrade gracefully" for them not using css.
[16:46:50] <paulej72> yeah me too dumb asses
[16:47:18] <TheMightyBuzzard> if he bitches too much i'll even throw in some inline styles that bypass blockers
[19:26:38] <paulej72> aaaaah no inline JS got to fix
[19:34:17] <TheMightyBuzzard> paulej72, yup. gotta write it in as an included script. CSP is all or nothing on inlined scripts until you get to CSP 2.0 which less browsers support.
[19:37:59] <paulej72> OK I think I added the correct event listeners
[19:40:47] <paulej72> JS debug console is your friend
[20:09:00] <TheMightyBuzzard> never learned to use it. i just keep poking things until they work.
[20:57:57] <paulej72> Fuking bastard js and event handleers
[21:04:22] <paulej72> TheMightyBuzzard, Bytram, others: I have JS majic openineg all child comments working on Dev
[21:04:41] <paulej72> THere are a few bugs I need to fix, but I will get to those soon
[21:04:46] <TheMightyBuzzard> oh? nifty.
[21:05:03] <TheMightyBuzzard> both modes, yeah?
[21:05:17] <paulej72> yeah I just got the event handler working
[21:05:29] <paulej72> Any mode that shows threads
[21:05:56] <TheMightyBuzzard> oh, wait, TNG expands anyway
[21:05:57] <paulej72> if there is a treeHider there is a expand all button
[21:06:16] <TheMightyBuzzard> yeah, looks good
[21:06:26] <TheMightyBuzzard> good way to key it too
[21:06:29] <paulej72> with high breakthrough
[21:06:43] <paulej72> the button works real well
[21:06:53] <Bytram> on my way to check it out
[21:07:06] <TheMightyBuzzard> well i meant it didn't collapse the threads down to just the parent like TOS does
[21:07:27] <paulej72> I just need to fix a bug with unhiding the buttons when first loading the page, as I want them to be missing if JS is off
[21:08:36] <paulej72> my code currently makes buttons visible that should not be
[21:09:11] <paulej72> I just need to fix a conditional in the JS
[21:09:13] <Bytram> love the look of he new icon!! looks like someone who had one teemany martoonies
[21:09:21] <TheMightyBuzzard> oh, set it to display:none and have the load event make it visible
[21:10:16] <paulej72> yeah, but some of them need to stay display:none as the comment is currently hidden in a collapsed tree
[21:10:44] <TheMightyBuzzard> mmm
[21:10:56] <paulej72> https://dev.soylentnews.org
[21:11:04] <aqu4> ^ "3Unconfirmed Purchase Transaction Reported - Dev.SN"
[21:11:14] <paulej72> there are some floaters there that should not be
[21:19:59] -!- snary has quit [Ping timeout: 276 seconds]
[21:29:36] <Bytram> yes, just saw that, too.
[21:30:42] <Bytram> heh... simpleness. Hit Ctrl+- a bunch of times to shrink the font size as much as you want, and it becomes almost trivial to see if any comments filed to minimize/expand
[21:32:38] <Bytram> looks like thisone sliped through: https://dev.soylentnews.org
[21:32:41] <aqu4> ^ "3Dev.SN Comments | Unconfirmed Purchase Transaction Reported"
[21:33:44] <Bytram> nvm, my bad... it'
[21:33:54] <Bytram> it's a TLC
[21:35:41] -!- snary [snary!~mike@72-581-601-514.dhcp.ftwo.tx.charter.com] has joined #dev
[21:49:46] <Bytram> I'll be heading out for the evening shortly, but will take a quick look back in later to see how things are going...
[21:49:46] <Bytram> paulej72: amazing work btw!
[21:51:59] <paulej72> OK I think I got the bug fixed
[22:24:20] -!- snary has quit [Ping timeout: 276 seconds]
[22:27:20] -!- snary [snary!~mike@72-581-601-514.dhcp.ftwo.tx.charter.com] has joined #dev
[23:43:24] -!- snary [snary!~mike@72-581-601-514.dhcp.ftwo.tx.charter.com] has parted #dev