Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

06-08-2016 , 09:38 PM
Quote:
Originally Posted by 8=====D
here I made one, http://jsbin.com/wewasupowa/edit?html,css,output

I see what you mean in that you can't use just css to keep the scroll position at the bottom. But if it's a chat application and you're using js to manipulate the dom anyway, why not just set the scroll position via js?
I'm not doing dom stuff directly with react just rendering based on state but yeah your approach worked fine as long as I scrollTop on updates. Not sure why I didn't think of that. Good times.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 10:03 PM
Quote:
Originally Posted by Grue
I'm not doing dom stuff directly with react just rendering based on state but yeah your approach worked fine as long as I scrollTop on updates. Not sure why I didn't think of that. Good times.
Might be trickier in react because you have to read the new scrollHeight position after adding the new chat text to the real dom and letting the browser recalculate layout stuff. If you're updating the virtual dom on one line and reading the scrollHeight the next there could be a race condition. But I don't really know react that well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 10:16 PM
Quote:
Originally Posted by RustyBrooks
As a somewhat reluctant JS learner, this is something that bugs the **** out me. So much stuff, when it's not done right, just silently fails. No errors or warnings or log messages or anything. It just doesn't work.

ETA: that combined with magic properties. Forgot to set the id in some specific way? Silently doesn't work!
just use the inspect tool in firefox or chrome. they show you which styles are being applied to any div or item on a page, and also which (if any) styles are being overwritten by another style for every item on a page.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 10:49 PM
I was so proud of my transform: scaleY(-1); approach too =/

thanks penis btw

Last edited by Grue; 06-08-2016 at 10:54 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 11:05 PM
Quote:
Originally Posted by Ryanb9
just use the inspect tool in firefox or chrome. they show you which styles are being applied to any div or item on a page, and also which (if any) styles are being overwritten by another style for every item on a page.
No styles involved. The specific thing I'm referring to was a jquery ui "sorting" thing. Each element in your container needs to have something like "id=foo_1" or "id=foo_2" etc. Without that, after you drag your element, when it submits the ajax call, no data is passed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 11:16 PM
Quote:
Originally Posted by RustyBrooks
No styles involved. The specific thing I'm referring to was a jquery ui "sorting" thing. Each element in your container needs to have something like "id=foo_1" or "id=foo_2" etc. Without that, after you drag your element, when it submits the ajax call, no data is passed.
Hmm... whats some solutions then? You can make a compiler (loosely using the word I guess) which you can copy/paste or drag/drop your code into and let it find any unused ID's or references to ID's that are not defined. I'm sure someone has made one ... at least I would assume.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 11:20 PM
I don't know what the solution is. But the problem is, your data set is completely free form, with no restrictions, and it "expects" certain types of data to be present, without any way to tell you what that is or whether it's missing. It's the nature of the beats a little bit, but it's a real problem.

In most languages that present a UI, such things just aren't really possible. You are usually manipulating some well defined data interface. It's just that the UI for JS is so strongly based on HTML that it has to be very loose/decoupled and it leads to code that depends heavily on convention.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-08-2016 , 11:45 PM
Quote:
Originally Posted by RustyBrooks
I don't know what the solution is. But the problem is, your data set is completely free form, with no restrictions, and it "expects" certain types of data to be present, without any way to tell you what that is or whether it's missing. It's the nature of the beats a little bit, but it's a real problem.

In most languages that present a UI, such things just aren't really possible. You are usually manipulating some well defined data interface. It's just that the UI for JS is so strongly based on HTML that it has to be very loose/decoupled and it leads to code that depends heavily on convention.
I think it would be a fun project to make. I bet I could bang a rough version out in a night. Would you mind sending me some source code with a little write up about what would be useful? I imagine if you ran into the string -> id=" <- you could put the next chars into a string, stopping at the next -> " <-, and add that to an array of id's you have created, and throw an error if there's no other mention of the same id.

The more I think about it the more I would be surprised if no one has made this before, have you tried googling for it?

Is there no support from things like notepad++ to help with syntactical errors?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 12:41 AM
Quote:
Originally Posted by Grue
http://codepen.io/chriscoyier/pen/obNNRa sigh. Doesn't look like its on the radar to be fixed. Fun afternoon. So to recap, to make a "bottom up" style of chatroom where the chats start at the bottom of the container there are 3 options:

1) The above option, which doesn't work with overflow/scrollbars at all.

2) Flip the container vertically, and then reflip the contents/chat. This causes the scrollbar direction to be backwards...

3) Have an invisible "pusher" element that slowly gets smaller but that doesn't work with multi-line chats without some really skanky calculation.

Front end web dev in 2016 was supposed to be easier.
this is a real bug. one of the comments has a suggestion that might help: https://bugzilla.mozilla.org/show_bug.cgi?id=1042151#c8

Quote:
Originally Posted by RustyBrooks
As a somewhat reluctant JS learner, this is something that bugs the **** out me. So much stuff, when it's not done right, just silently fails. No errors or warnings or log messages or anything. It just doesn't work.
I know not what you were talking about, but CSS works this way by design. It's supposed to be optional styling, so you dont want to stop the show if there's an error. And you can always run your own through a linter to catch errors.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 02:23 AM
SASS/LESS is good for catching CSS errors at compile time as well. I'm a big fan of catching things at compile time.

Not sure if a css linter would work inside a <style> tag in a .html file. But I can try.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 08:00 AM
I am not talking about css
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 08:51 AM
Javascript doesn't fail silently though. It will always throw an error somewhere.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 10:01 AM
Quote:
Originally Posted by RustyBrooks
I am not talking about css
pls reread my post
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 10:04 AM
Quote:
Originally Posted by suzzer99
SASS/LESS is good for catching CSS errors at compile time as well. I'm a big fan of catching things at compile time.

Not sure if a css linter would work inside a <style> tag in a .html file. But I can try.
probably won't but can't you just pull it out? also with node and postcss easy to write your own parse rule that pumps style content thru a linter, if you really need to
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 10:26 AM
I don't think you can pull the inline style tag out of the polymer element template. The whole point is to put it there so it's automatically scoped to just that element. But maybe you can have a CSS file for just that element I'll look into that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 11:54 AM
StaticTyping4lyfe
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 09:17 PM
So... there is a certain person on my team that never cleans up after himself. He doesn't remove **** that he replaced with something else so you're stuck with a bunch of code that now does nothing. I have asked him maybe 5 or 6 times now to clean up after himself. He exploded today on me and said "I'm getting tired of your ****".

I have also pointed out on numerous occasions now that components he wrote are severely broken but he has outright refused to fix them. When I asked him to last his response was basically "get bent".

As part of updating the site, I had to go visit every page to add a new component. I saw that he had something like the last dozen commits on one page which was *severely* broken. [it was working when i last updated it before his flurry of updates] Clicking on one element on the page caused the page to completely lock up for 30 seconds.

How do you deal with someone like this?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-09-2016 , 10:00 PM
Who reviews his code?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 12:59 AM
Quote:
Originally Posted by RustyBrooks
Who reviews his code?
Whats a code review? /sarcasm
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 02:09 AM
Move up to where they respect your process
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 02:38 AM
Quote:
Originally Posted by kerowo
Move up to where they respect your process
I wish we had code reviews and agile workflow and all that 'modern' ****. Unfortunately, we are a PHP shop.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 04:59 AM
Fry_smirk.jpg
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 08:16 AM
http://io9.gizmodo.com/watch-this-fa...ten-1781610303

Neural net writes SciFi screenplay. Hilarity ensues. Not entirely worth watching the whole thing, once it starts to drag you can really turn it off. Or wait for the black hole.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 09:45 AM
Quote:
Originally Posted by suzzer99
I don't think you can pull the inline style tag out of the polymer element template. The whole point is to put it there so it's automatically scoped to just that element. But maybe you can have a CSS file for just that element I'll look into that.
oh i was actually replying to your comment about <style> element, meaning pull out the stuff between those tags into its own .css file, which you can lint.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-10-2016 , 09:50 AM
Quote:
Originally Posted by Craggoo
So... there is a certain person on my team that never cleans up after himself. He doesn't remove **** that he replaced with something else so you're stuck with a bunch of code that now does nothing. I have asked him maybe 5 or 6 times now to clean up after himself. He exploded today on me and said "I'm getting tired of your ****".
it's hard for me to imagine a workplace context where this is remotely acceptable. i'm assuming it wasn't said in a joking way, since you used the word "exploded." i mean, i would pretty much fire someone on the spot for behaving like that toward a coworker, at the very least it would be a one time warning and then you're fired after that. it sounds like something a 12 year old would say.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m