mozilla :: #mdn

18 May 2017
00:01sheppystandups: Initial draft up for
00:01standupsOk, submitted #46294 for
00:10sheppystandups: Noted per bug 1319140 that Intersection Observer doesn't deal with clip-path yet. Added DDN for future tracking.
00:10standupsOk, submitted #46295 for
00:10firebot NEW, (intersection-observer) Take clip-path into account
00:26sheppystandups: Updated IntersectionObserverEntry page to add a footnote to the compat table that Firefox currently doesn't set rootBounds correctly when the element doesn't intersect. Tracks bug 1358668.
00:26standupsOk, submitted #46297 for
00:26firebot NEW, (intersection-observer) Set rootBounds to an empty rectangle instead of null when not intersecting
14:10sheppyHi everybody!
15:17* sheppy works on adding code to his multiple target IntersectionObserver sample to replace tracked "ads" when scrolled off the screen if they've been visible for more than a minute.
15:17sheppyThat lets me show off unobserve() and some conceptual points.
15:23* sheppy discovers that the parameters to node.replaceChild() are backward from what seems logical.
15:23sheppyYou'd think the node to be replaced would be first, since that's the object of the verb "replace". But no, the new node is first. :)
15:41sheppyfscholz: That's something we should figure out I suppose -- do we include all the iOS versions just to be thorough or do we need to go through them and just figure out which ones had browser changes? The latter would be a bit of a job, I think.
15:42sheppyBut there have been API changes/additions in point releases, I'm fairly sure.
15:44fscholz Yes, figuring out the releases with browser changes is the trick there whether point release or not. It is not too urgent at the moment, I haven't started working on a version validator, it would be a nice thing, though
15:44jibHi, I was hoping to add a new "using promises" section to MDN, and I have some copy. Should I just go ahead?
15:44sheppyfscholz: So you'd prefer to limit the set to just those in which there actually were browser changes?
15:46sheppyjib: Yeah -- you can do that, I think. Just start with the URL
15:46sheppyUnless fscholz has other ideas, since he's our JS doc lead dude.
15:46jibsheppy: Ok calling it "Promises" rather than "Using promises" ?
15:46fscholzworks for me
15:47sheppyjib: Use "Promises" as the slug and "Using promises" as the title perhaps.
15:47jibok cool
15:47sheppyjib: awesomesauce
15:47jibI'll ping people here for looksies after
15:48sheppyProbably will need a couple of macro updates to fix the sidebar to include it.
15:48sheppyThat fscholz will likely handle.
15:48jibFor sure
15:48* fscholz is the bcd dude atm but needs to get back to JS at some point, too
15:50sheppygah... last few minutes my neuropathy has decided to kick in again after a break of about an hour.
16:32* sheppy starts working on code to try to work around one of our Intersection Observer... quirks.
16:33jibLink up
16:35jibHey how come I got fancy syntax highlighting on the last half of the document only?
16:36sheppyjib: Because the boxes earlier on aren&#39;t &quot;JavaScript&quot; boxes but plain <pre>. Pick JavaScript from the language drop-down in the toolbar.
16:36sheppyRight next to the heading buttons
16:36jibah, will do thanks!
16:37sheppyjib: you betcha
16:37jibOdd I pasted it all from a blog
16:37jib(I used wordpress as a notepad)
16:37* sheppy wonders how much fixing up of the HTML will be needed. :)
16:37jibprobably a great deal
16:37sheppyHappens often when pasted from elsewhere. Ah well.
16:38jibSaved me a bunch of time though
16:38sheppyI bet
16:38jibI just pasted and it looked good. Qute impressive
16:38jibPity if that&#39;s not desirable
16:38* sheppy has a worry
16:38jibor leads to undesirable results rather
16:39sheppyOh yeah, there&#39;s all kinds of stuff that we&#39;ll have to hand-edit in the HTML.
16:39sheppyThe pasted content has its own styling in it instead of just relying on the built-in syntax highlighter.
16:39sheppyWe&#39;ll have to go rip all of that out.
16:40jibI didn&#39;t know we had auto highlighting
16:40jibok no worries, I can do that (if I figure it out)
16:40sheppyWell, once you tell it what language each box is.
16:40sheppyjib: LMK when you&#39;re done and I&#39;ll go through it.
16:49jibsheesh what the heck is this html editor doing. the html is horrid
16:51sheppyThat&#39;ll be mostly what you brought over from your blog&#39;s editor.
16:52sheppyWith some bleaching done to remove stuff we don&#39;t allow at all.
16:55wbambergthats a really helpful article jib
16:57jibThe reason I wrote it was years of questions on stackoverflow from people being confused about how to use promises
16:57jibBasically all the guides I&#39;ve seen were either outdated or they start in the wrong end, dropping
17:00jibI had an epiphany that maybe some of the confusion stemmed from what people read first. A search for &quot;promise&quot; on google would drop me at the Promise constructor in MDN. And from reading that, people surmised that one used promises by creating a new promise, which lead to the dreaded promise-constructor anti-pattern -
17:00jiband other ailments
17:01jibSo if we like it, I&#39;d love to link to it from the top of the Promise constructor page, to divert newbies to it, before they read the constructor
17:01* jib fixes html
17:03wbambergagreed. I saw you linked to that pouchdb article the other day, which is also a good antidote, so its really good to have something similarly helpful on MDN
17:03jibyeah that&#39;s a good one
17:04jibAlthough anectdotally I noticed people came back from reading it thinking promises had issues
17:04jibsort of like JavaScript the good parts
17:04jibwhich isn&#39;t leading with the right foot imho
17:05wbambergyes, the difficulty I had with the article was that it spends a lot of time talking about what not to do
17:06jibI&#39;m the kind of person who reads one-star reviews on amazon to find out about products, but it&#39;s not very healthy :)
17:19sheppyjib: Yeah, I&#39;m super excited about having a more solid article about how to really use promises. Promises are amazing. I really enjoy working with them.
17:19sheppyBrings me back a bit to the old days of using multi-threading on BeOS. :)
17:20sheppy&quot;Figure this out and let me know when you&#39;re done&quot; kind of constructs are excellent.
17:21* sheppy tries to understand why when he replaces an &quot;ad&quot; in this example, the viewed-time counter keeps going up from where it was instead of resetting, even though it plainly gets reset in the JS.
17:21fscholzjib: great article! I can review it tomorrow and link it in navigations and stuff :)
17:21jibsheppy: code sections should be taken care of now
17:21sheppyjib: coolio
17:22jibthanks for the codestyle tip
17:24* sheppy is stripping out some unneeded divs now
17:26* sheppy also adds tags and the JS Guide sidebar.
17:26* sheppy pulls the source into BBEdit to do a greppy cleanup on one thing
17:31sheppystandups: Did cleanup work on new &quot;Using promises&quot; article: removed unneeded divs left behind by MCE. Also removed data attributes on links, made links site-local, and added JavaScript guide sidebar.
17:31standupsOk, submitted #46345 for
17:31sheppyHas other formatting work to do but that&#39;ll do for now. I have to go hustle to get to an appointment on time. :)
17:32jibsheppy: thanks for fixing it up!
17:32sheppy-apptjib: Thanks for writing it! That&#39;s the important bit. :)
17:33jibsure thing
19:18* sheppy gets back to work on this sample code
19:57sheppystandups: Moved to where it belongs
19:57standupsOk, submitted #46349 for
20:22andymis there a way to upload images to mdn so i can embed in a page?
20:24sheppyandym: Yes, although you have to get that permission added on request.
20:25sheppyIf you ping one of the admins (such as myself) we can do it, although we need account name and some idea what you plan to upload. :)
20:28andymok, i&#39;m working on a page now, i wouldn&#39;t mind get a review for wbamberg or others when its done and i&#39;ll fling the image your way then
20:43sheppystandups: Rewrote
20:43standupsOk, submitted #46351 for
21:29rwaldronfscholz I was just looking at and thinking: there should be some kind of reusable page marking that indicates proposals that are dropped
21:29rwaldronIn this case, SIMD is dead forever
21:29rwaldronAnyway, no urgent, just something to think about
21:30fscholzAll the doc work for nothing :(
21:31fscholzStill proud of this one
19 May 2017
No messages
Last message: 124 days and 21 hours ago