« first day (1880 days earlier)      last day (3082 days later) » 

7:10 AM
Any AngularJS developer:
0
Q: ng-repeat in this table with colspan and rowspan

feniixxHere's a fiddle with the desired table and the javascript function containing the array from where I want to populate the table, what I don't figure out is how, because if I use rowspan and colspan I have to create different <tr> for each product... If there's another way to get the desired tabl...

 
http://stackoverflow.com/questions/34171526/colums-merging-on-basis-‌​of-row-data
 
JavaScript is one of the noisiest tags with one of the largest percentage of off-topic questions and duplicates of remedial information on SO. This just proves there are more help vampires using JavaScript than the other tags. — Jarrod Roberson 3 hours ago
@JarrodRoberson: can you back up those claims with some data? — Cerbrus 1 hour ago
Hm, can't post the next one
@Cerbrus - can you refute those claims with some data? — Jarrod Roberson 55 mins ago
There we go... So, he's raining on the js parade, then refuses to back up his claims. Classy
 
Is it right to have multiple <tbody> in a table ?
 
Nope
 
Ok
 
7:25 AM
> Permitted parent elements - Within the required parent <table> element, the <tbody> element can be added after a <caption>, <colgroup>, <thead> and a <tfoot> element.
 
No, I mean I missed the context. So reading
 
@feniixx Can't (shouldn't) be added ater a <tbody> element
 
> multiple<tbody> elements are permitted (if consecutive), allowing the data-rows in long tables to be divided into different sections, each separately formatted as needed.
 
Right
Apparently I was wrong
(Well that's ugly o.O)
 
For a sec I thought it is angularjs specific table something :P
 
7:29 AM
So, if I just want to use <tbody> to be able to use ng-repeat it would be bad @AwalGarg?
 
Can't you place the ng-repeat on tr elements?
 
@Cerbrus here's a fiddle of what I'm trying
I can't put them in a single tr since there could be different amount of trs for the table struncture I have now
 
Hm
Tricky
 
I'd like to know if there's another way to get the table structure like that
Also
 
Not that I know of...
 
7:35 AM
The values of the rowspan must be calculated
becuase each transaction (that's what each table row is displaying) could have diff amount of products
 
you just need to nest your ng-repeats
 
calculating rowspan, that sounds like fun
might be worth considering having a nested table just so that you wouldn't have to worry about that
 
jsfiddle.net/23basm8m/2 This... "works"
But is ugly
 
@Neil that's what I was trying first, but I got a suggestion of using colspan and rowspan
@Cerbrus I can't see the change ...
 
and your rowspan is simply inventory.length -1
 
7:41 AM
@feniixx depends on the difficulty.. if it takes all of 30 seconds to do, do that
if you say to yourself "this complicates things quite a bit", then just go with the nested table
 
@rism but rowspan must different per table row, that's the second problem
 
@ton.yeung Yeah, that would work too. Make an accessible copy of it.
 
as inventory.length is different per row
 
@feniixx I think you can mix and match - keep colspan and rowspan in thead, and use nested table in the body.
 
@feniixx divs around the sets of <tr>
Which is pretty darn ugly
 
7:45 AM
@Neil The thing is that a nested table doesn't do the trick, I want a single thead
@Cerbrus Jaja,well if that's the only way...
 
@feniixx you want it for simplicity's sake? Because that's relative
 
@feniixx tbody elements in the alternative
An better alternative.
 
@feniixx Not sure what you mean by "the only way". You do know that, in actual DOM, the divs will be moved up and away from the table and becomes empty?
 
@Neil No, or well maybe, I mean, the table should only have a head and rows of data, not head and rows with tables containing other head...
 
Indeed
 
7:48 AM
@Cerbrus in fact, tbody and div wouldn't work, rowspan must be dynamic :s
 
Nested repeats, then.
 
@Sheepy It was kinda joke, I mean, either divs, or tbodys would work, rowspan must be in the table row..
 
crl
or flexbox (sorry not even read, just like to say that)
 
flexbox sounds interesting @crl
but haven't used it that much to know how to do this
 
I do think flex table may solve your problem. In fact I had a link stashed for you...
http://benfrain.com/css-performance-test-flexbox-v-css-table-fight/
But it is not always a better/simpler solution...
And certainly not very backward compatible.
 
7:54 AM
anybody use react.js at all?
 
Lol
 
@Sheepy Well, I think I'll wait a bit mode for the SO question to be answered and search about flexbox
0
Q: ng-repeat in a table with colspan and rowspan

feniixxHere's a fiddle with the desired table and the javascript function containing the array from where I want to populate the table, what I don't figure out is how, because if I use rowspan and colspan I have to create different <tr> for each product... If there's another way to get the desired tabl...

 
I'm teaching intro javascript courses and a lot of the workshops are on react - didn't know if anyone had an opinion on weather or not it is worth looking into and ever using
 
react.js is quite nice
 
Any ideas how to spend 5 hours on an airport in layover (don't have a laptop) . don't wanna watch movies
 
7:56 AM
@ScottSelby To answer your question: Yes. Someone probably has an opinion about that.
@Abhishrek Sleep.
 
fenixx - was there supposed to be a rule that I broke in there?
 
@Cerbrus I just woke up after the flight
 
@Abhishrek Sleep +1
 
And have 10 more hours of flight to nyc
 
You woke up? That's a good reason to sleep.
 
7:57 AM
@ScottSelby "anybody use react.js at all?" don't ask to ask, just ask
 
@Abhishrek - do what everyone else does and go to the bar and get wasted then sleep on the flight
 
Okay let's sleep then
 
react.js is pretty fast
 
Rate chicks out of 10 ;)
 
React.js is not fast js is fast
 
7:58 AM
@feniixx - what that rule means is dont say " can I ask a qestion here"
 
Thats what my friend and I did while in transit in London.
 
It's easier to write efficient dom code with it that's about it
 
@ScottSelby You didn't break any rules.
 
i know - I havent been in this room in months maybe even a year and a half but I used to spend a lot of time in here and c# room for years
 
welcome back :)
 
8:00 AM
@ScottSelby react js is amongst the most popular frameworks
Feel free to ask
 
I don't like having to hard code all your HTML in javascript - I really hate that , and I'm worried it's only popular because Facebook wrote it
 
@Abhishrek if you have pen and paper, write code on paper
 
its a nightmare for designers
 
Yet a breeze of fresh air for developers.
 
@AwalGarg I would have more milage writing poems
 
8:02 AM
@Abhishrek just think about it... all these years you have been using autocomplete. Missing autocomplete on paper really feels super weird.
 
I just really like separating "view" html from logic that manipulates the view - whether you use MVVM or MVC it seems react.js violates both design patterns
 
React is just a view layer
 
@ScottSelby You can have layout in HTML and only reusable components in React/JSX. Even traditionally, you have been making DOM elements in JS and appending to layout anyways.
 
I know , but I like angular or knockout how the javascript can only manipulate models or objects and the view can do whatever it wants with that change
 
@ScottSelby Then you are more suited for something other than React. I personally enjoy React and JSX/TSX syntax quite a bit. It gives me more control and better typing, whereas pure HTML with custom (framework-based) attributes is hellish to maintain and debug.
 
crl
8:05 AM
react is more than view, it's life
 
@ScottSelby They say that to PHP too. And then they developed HTML template engines for PHP. And then people realise that PHP itself started as a template engine and having html in PHP code is not, by itself, a big problem. (Mixing them with business logic is.)
 
but you don't get your autocomplete and all the other nice stuff that helps type HTML from whatever IDE you use when you are writing HTML in stringa
 
Angular puts expressions in the template, React puts the template in the code, they're both blurring the line between code and markup imho, they just approach it differently
I was extremely sceptic to JSX first time I saw it, but having worked with it I like it a lot
 
I'm about to create a whole new admin section for a site that is about as big as the site , so I'm just looking around at different js frameworks to use. I think I'll probably stick with angular , angular can become a nightmare with routing though
 
@ScottSelby And vice versa, you don't get template-specific help and validation from your IDE when you're writing HTML and it's completely oblivious to the fact that you're adding attributes to, essentially, add logic to the HTML file. :-)
 
8:09 AM
@ivarni You don't have to put expressions into the template in Angular.
 
we have modals that are supposed to be their own routes so the user can go directly to opened modal . I tried my best at getting that requirement dropped
VisualStudios understands when your putting angular in HTML - your a .Net guy , right @RoelvanUden
 
you're
 
@Cerbrus Well you kinda do when you use most ng- directives
 
Hm, I see what you mean.
 
yea , you're right @ivarni , you definitely do , and its imho easier to check oneword js variables then entire html element strings
 
8:12 AM
Imo, Angular templates are (can be) pretty darn clean, compared to some alternatives
 
even {{ user.name }} is still js expressions in HTML
 
@ScottSelby That doesn't count.
 
yea - they're not always html5 valid , but that doesn't seem to matter for a single browser that I have found
it kinda counts
 
@ScottSelby Sure, it does understand that, but it sure as hell doesn't understand I just refactored the controller variables and functions which causes the horrible dynamically typed bullshit angular statements to completely fall over themselves :-)
 
No. any templating engine would require something like that to put user.name into the HTML
 
8:15 AM
from what I saw breifly with react it would be inserting the whole html element into the page if the user was logged in
and what the fuck is with unicorns and developers?
 
@ScottSelby (Note: I'm basing everything I say about Angular/React of TypeScript support; meaning that I value typed and compile-time checked code. In this case, TSX compile-time checking is extremely extremely extremely valuable. Otherwise, meh, Angular is good enough I suppose)
 
@MadaraUchiha - unfortunatly that did nothing to get me to understand , and I've been professionally writing code for like 8 years
 
@RoelvanUden "meaning that I value typed and compile-time checked code." You realize you're in the "JS" room, right?
 
I do, hence I thought it was appropriate to elaborate that point.
Besides, once ECMAScript standardizes types you'll all go "Ohh ahh types are great!" on me anyway, so I'll just embrace it now. :-P
 
8:21 AM
"once ECMAScript standardizes types". Is that before or after hell freezes over?
 
Anyone feels like helping be debug a FOUC?
 
Fiddle?
(or site?)
 
@Cerbrus Heh, don't count it out just yet. Microsoft and Google are both pushing typing, Facebook has their own type checker, it's not unreasonable to think that one of the many typing proposals is eventually adopted.
 
I won't count it out either.
 
8:23 AM
In Chrome, I get a FOUC, the entire body is in a "display: none" and the style is above the body.
 
@BenjaminGruenbaum Yikes
 
Any help greatly appreciated (this is a React site with server side rendering, if you care)
 
Why is there style="display: none" on the <head>?
 
Because I thought that might help, because before that I got a FOUC on the style text itself in the <head>
 
I see a "loaded" class on the <body> and a inline style=display: block. Have you tried removing (the line that sets) that inline style, and adding it in css to body.loaded?
 
8:28 AM
 
/**
 * Created by Benjamin on 12/6/2015.
 */
document.body.style.display = "block";
Maybe get rid of that, do that in the DOMContentLoaded
 
@BenjaminGruenbaum What is a FOUC?
 
A flash of unstyled content (FOUC) is an instance where a web page appears briefly with the browser's default styles prior to loading an external CSS stylesheet, due to the web browser engine rendering the page before all information is retrieved. The page corrects itself as soon as the style rules are loaded and applied; however, the shift is quite visible and distracting. == Technical information == The issue was documented in an article named Flash of Unstyled Content. At first, FOUC appeared to be a browser problem unique to Internet Explorer. FOUC behavior has also been documented "as a Safari...
Google, buddy.
 
@Cerbrus I'm not your buddy, pal.
 
@Cerbrus I'm sorry that I didn't perform a web search before trying to help someone with their problem, friend
 
8:35 AM
@BenFortune We all know how that discussion (doesn't) end(s)
 
@BenjaminGruenbaum my guess, it takes a while for styles to be applied because the DOM isn't what you expect yet (i.e. missing structure, classes, etc)
I see a very long period of "Scripting" in the timeline.
 
^ this is just before domcontentloaded happens
and at that point, body is already visible. So make the body visible only on domcontentloaded
 
@BenjaminGruenbaum you have some very long synchronous operation that prevent styles from happening.
 
The next render occurred on 16.50s, which is when the domcontentloaded happened for me
 
My browser consistently freezes in that UC period.
 
8:39 AM
@SterlingArcher Vice Grip.... of all the Parkway songs... Vice Grip ಠ_ಠ
and not a single ABR song? how can I contribute here?
oh, sorry, Ghosts is in there... yay! :)
 
@GNi33 By adding ABR? :P
 
does the web version of spotify even let me do that?
oh yeah, it does
 
Hello how could i sent ajax request to local server
I am using easyphp for local server
this is my url
 
please google this
 
what url should i use for ajax request
 
8:42 AM
you could use relative paths for example
FFS, they removed Leveler from spotify again
 
@MuneemHabib You just gave us the url to your server, right?
 
morning
 
morning~
 
yex
yes
but it does not work
 
@MadaraUchiha hmm, any idea how to fix it?
@MadaraUchiha oh it does? Hmm.. :/
 
8:47 AM
@MuneemHabib Maybe you can try ajax on some static local json file first. When it work you just replace the file with php.
Just make sure you call it through http: not file:
 
hello
 
@Cerbrus that's below the actual DOM.
@AwalGarg hmm, why though?
Why is it displaying that?
 
@BenjaminGruenbaum If it helps, the page renders fine in Firefox and in IE11, the styles are never applied :)
 
@BenjaminGruenbaum your script sets display to block on body
 
@BenjaminGruenbaum I suspect line 758
return function(formatDetect) {
(I don't know if it's yours or some library's)
 
8:52 AM
@OliverSalzburg wait what?
@AwalGarg yeah, but below all the actual content.
 
@BenjaminGruenbaum There is no FOUC in Firefox and IE11 looks like this: i.imgur.com/a2UVELh.png
 
@BenjaminGruenbaum are you sure? Because the debugger says otherwise.
/**
 * Created by Benjamin on 12/6/2015.
 */
document.body.style.display = "block";
^ this executes, and originates from head
 
crl
put teh css in css! :p
 
@AwalGarg that's in the HEAD?
 
yes
 
8:54 AM
damn npm package :/
 
crl
it's shorter in css, and better
 
I'm also confused by the fact it seems a lot faster if served directly from node
 
it's better to use SCSS :D
 
<body style="display: none">
		<div id="app"></div>
		<script src="/start-scripts/show-after-fouc.js" inline></script>
:/
 
crl
inline css :(
 
8:56 AM
of course css is inline, it's a build.
 
crl
ah
 
@BenjaminGruenbaum why use root-relative link instead of relative link?
 
It doesn't to me
 
@BenjaminGruenbaum it executes before the CSS loads completely, and that is quite logical because your styles are loading async... r u trollin' :(
 
because our build is complicated and does many things and this has to be served wit hhot reload.
 
8:57 AM
@BenjaminGruenbaum I sure hope you don't have <body style="display: none"> in production.
 
@AwalGarg why are the styles loading async?
 
Cause I will write. Aw–›
 
@AwalGarg His styles aren't loaded async
They're inline.
 
crl
because Mosho did so :)
 
Inline styles are faaast! Google uses inline styles :P
 
8:57 AM
One less request.
 
Inline styles a crap
Google uses them to save millions
 
lol
 
hmm, yeah, the inspector does show them inline. But chrome's stylesheet load breakpoint fires them much later
 
@BenjaminGruenbaum My sense of smell tells me that something long and synchronous is stopping the DOM from building into the correct structure for a second or so
 
Of dollars
 
8:58 AM
That's why you don't have styles.
 
I need money too $$$
 
wow, wtf, wtf wtf wtf
 
Stop using my name
 
The odd part is that it works in all other browsers.
 
Is this some kind of optimization bug o.O
 
8:59 AM
@Abhishrek :P
 
If it was me I'd just serve it in another file :/
@AwalGarg Yeah, that much I know...
 
^ same
 
The question is how to overcome it.
 
@BenjaminGruenbaum I meant chrome's bug, not yours
 
You wouldn't think I'd come here with a bug that Paul Irish's polyfill solves.
@AwalGarg yeah, I know, I need to work around it.
 

« first day (1880 days earlier)      last day (3082 days later) »