New mdn front-end dropped, ditching a legacy React front-end for lit and web components cc @brianleroux.bsky.social
Great write-up by @leo.mca.is !
developer.mozilla.org/en-US/blog/m...
Posts by Leo McArdle 🇺🇦
MDN search for “Under the hood of MDN’s new frontend” with results for HTML, CSS, JavaScript performance optimization, Web APIs, and SVG over HTML source code. MDN logo in the corner.
Under the hood of MDN’s new frontend. @leo.mca.is explains how MDN replaced React with web components and Lit, using server components for static content and lazy-loading interactive islands. #mdn #webcomponents
developer.mozilla.or...
Really great write-up, and spoiler alert!
...
MDN uses Lit to write their web components! 🔥😎
And they use Lit SSR to implement their own server components, and built their own component lazy-loader.
Impressive work MDN!
Code snippets and headings showcase web development topics like HTML, CSS, and JavaScript optimization related to MDN's new frontend.
Under the hood of MDN's new frontend 🛠️
We rebuilt MDN from the ground up.
⋅ Web components for islands of interactivity
⋅ Only the CSS & JS each page needs gets shipped
⋅ Dev server starts in 2 seconds (down from 2 minutes)
Read the full story 👇
developer.mozilla.org/en-US/blog/...
I have a vague memory of benchmarking this with a simple regex, and the gains were so minimal it wasn't worth investigating more at that point.
You've got me interested again now though! I'll try and find some time this week to try it, and report back.
The difference is that on the client the browser has already helpfully parsed the DOM for us, on the server we'd need to implement it ourselves ;)
Thanks! I remember the joy of stumbling across this approach myself back when implementing it: such a different, and nicer, approach than how we had to do it back in the old React app.
We don't scan the source in SSR, merely template it together: we'd need to add another step to detect what custom elements are being used.
It ought to improve things, but it's on my "to implement and benchmark later" list: caching and progressive enhancement means I expect it to be very minor.
🚲 LCC's campaign Streets for Cycling is calling on local election candidates to make cycling in your borough safe everywhere and fun for everyone! 👨👩👧👦
🧑💻 Email & ask your candidates to pledge to build a safe local cycle network today
action.lcc.org.uk/streets
AI controls are now live in Firefox 148. A single place to manage, customize, or completely block AI features in the browser.
See how it works here ⬇️ blog.mozilla.org/en/firefox/h...
A reminder to the news media: “conflicting accounts” is what you say BEFORE the incontrovertible video evidence appears. After that, your job is to ask why one side is lying, not to repeat the lie and pretend no one knows the truth.
As an experiment, we (the Firefox team) wanted to try a new way to get feedback on which Interop proposals matter most.
So, here's a web app where you can rank the proposals you care about, giving us data we can use when reviewing which ones to champion.
interop-rank.jakearchibald.com
I'm so so happy to get this out. It never felt great using a bloated SPA to serve users documentation about the latest and greatest web standards. Now we have a frontend I feel incredibly proud of.
I'll be writing a technical deep dive soon, we've done some interesting things worth sharing.
The new MDN frontend (we call it Fred) is live after about 5 months of work, and a lot of planning and prototyping before that!
Rebuilt using web components, it should feel a lot cleaner and more consistent for users, and is so much easier to develop in.
github.com/mdn/fred
Anyone who thinks you can solve London's housing crisis, the product of several decades of not building enough houses, without building more houses, does not deserve to be taken seriously. Nor does anyone tagging the NIMBY ultras of CPRE into a discussion on housing.
Whether it's Obama wearing a tan suit or Donald Trump tanking the economy, alienating America's allies, sending innocent people to torture camps, destroying the free press, and causing millions of deaths worldwide by ending USAID, both sides have brought great shame to our country.
Graph of load on Spain's energy grid over time, showing actual load deviate from forecast load enormously around 12:00: going from around 25GW to around 11GW
If I'm reading the charts right (very possible I'm not), looks like the power outages in Spain & Portugal are somewhere on the demand side, rather than supply side (i.e. a power plant didn't fail, something transmitting energy did). Here's the forecast vs actual load for Spain today:
LIGHTNING STRIKES RICE
The problem with Dems chasing public opinion is that THE PUBLIC'S VIEW OF THINGS IS JUST MOVING IN RESPONSE TO WHAT POLITICAL FIGURES SAY AND IT'S VERY OBVIOUS IN THE DATA MY GOD
Tweet: "Have you said thank you once?" -@VP JD Vance - pic of jd Vance looking oddly symmetrical. Why are his pants so tight?
I can't stop laughing at this man I'm sorry. This is the kind of shit the biggest loser in the world would say to their girlfriend about buying her flowers on Valentine's Day once, and he's doing so in an argument that started because he called her a bitch
(on a personal note it's quite striking how quickly I've gone from "generally a bit of a pinko on defence issues" to "and could I just do a monthly direct debit to BAE Systems, would that help")
Zelenskyy is my hero. A true anti-fascist. A man with more bravery and dignity in his other finger then most of his detractors will encounter in their lifetime
Vance is a fucking snake. Trying to pretend other people have to show decorum as he’s out there calling Zellensky a loser. Fuck that guy.
How can America look at how they ganged up on Zellensky like a pair of bellowing kids & feel good about this
“As Trump asked him who was ‘holding the cards’ at the moment, the Ukrainian leader – whose countrymen and women were fighting and dying against Russian aggressors even as the meeting took place – was desperately trying to make the point that none of this is a game to him.”
JD Vance is a snivelling little shit, but thanks to him I'm now donating £100/month to Ukraine: u24.gov.ua
Your dignity honors the bravery of the Ukrainian people.
Be strong, be brave, be fearless.
You are never alone, dear President Zelenskyy.
We will continue working with you for a just and lasting peace.
This is a President who skipped a World War One commemoration because it was raining talking to one who has stood in front of a fresh mass grave of his own people.
The most shameful day for the United States of America in any of our lifetimes.