@tbroyer@piaille.fr avatar

tbroyer

@tbroyer@piaille.fr

Web development (frontend, Web APIs), Web app security, build tools, Java, Kotlin, Gradle, etc.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

tbroyer, to climate
@tbroyer@piaille.fr avatar

What if I told you that most promoted actions about climate-friendly software are misguided?

Backing data for that claim and my opinion on the low-hanging fruits:

https://blog.ltgt.net/climate-friendly-software/

Key takeaways:

  • Pick servers in carbon-neutral or low-carbon datacenters first
  • Optimize for the perceived performance and battery life
  • Don't be the one that will make your users change their device
  • Sometimes, ideas aren't even worth their impacts

#greenIT #climate #sustainability #carbonfootprint #co2

nixCraft, (edited ) to linux
@nixCraft@mastodon.social avatar

Poll: Which clone of RHEL (Red Hat Enterprise #Linux) are you using? Please boost for reach. TIA.

tbroyer,
@tbroyer@piaille.fr avatar

@Larvitz @nixCraft Wasn't that exactly the point? That CentOS moved from being a downstream of RHEL to an upstream? (to somehow crowdsource testing 😉)

josh, to microsoft
@josh@vickerson.me avatar

Parts of #Microsoft #Edge get up to 76% faster by dropping #React in favor of Web Components.

React's days may finally be coming to an end 🤞

https://blogs.windows.com/msedgedev/2024/05/28/an-even-faster-microsoft-edge/
————
#WebDev #WebComponents

tbroyer,
@tbroyer@piaille.fr avatar

@josh Well, it's not just react vs web components.

They also rearchitected their code; and as a side effect of moving away from react, they can have code optimized for the most recent Edge when react needs to support many more browser engines and versions (something you definitely want for most web apps).

davatron5000, to random
@davatron5000@mastodon.social avatar

📝 Quick post on a common experience I see when people are test-driving for the first time.

https://daverupert.com/2024/05/cold-turkey-wont-fix-your-javascript-addiction/

tbroyer,
@tbroyer@piaille.fr avatar
mayank, to random
@mayank@front-end.social avatar

📝 new blog post: "web components" considered harmful

https://www.mayank.co/blog/web-components-considered-harmful

tbroyer,
@tbroyer@piaille.fr avatar

@mayank Well, technically, dashed names don't create "custom elements" either, but the same kind of "unknown elements".

BTW, I just noticed this in the spec: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-upgrades-examples
> Because element definition can occur at any time, a non-custom element could be created, and then later become a custom element after an appropriate definition is registered. We call this process "upgrading" the element, from a normal element into a custom element.

So a dashed name, per spec, creates a "non-custom element" (aka unknown element), and a "custom element" is one that has been registered.

tbroyer,
@tbroyer@piaille.fr avatar

@mayank Oh sure, but due to https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-name so would any element with a : or _ in its name (and those are just examples, HTML is very lenient when it comes to parsing tag names: https://html.spec.whatwg.org/multipage/parsing.html#tag-name-state), but those can't be registered in the "custom element registry" so they can't be turned in "defined custom elements" (which everyone just calls "custom elements" I believe)

tbroyer,
@tbroyer@piaille.fr avatar

@mayank I have another one for you: are "non-defined custom elements" really custom elements? Or more "unknown elements that happen to have a hyphen in their name"? (because if you only use them to match them in a CSS selector then you could use any name, even without an hyphen)

bagder, (edited ) to windows
@bagder@mastodon.social avatar

users running stupid scanners now contact us for support regarding CVE-2023-46218 which the scanners say affects 8.4.0 shipped by Microsoft.

It would, if their version was built to use , a prereq for this CVE, which does not.

Security scanners. A snake oil business.

https://curl.se/docs/CVE-2023-46218.html

tbroyer,
@tbroyer@piaille.fr avatar

@bagder The problem is not the tools themselves (not entirely at least because they have many shortcomings, like not accounting for Debian/Ubuntu fixes backports) but how people (don't) analyze the results.
We do use vulnerability scanners (sending SBOMs to Dependency-Track) but this clearly requires work to analyze the results and determine if you're actually vulnerable (false positive, non-exploitable vuln, only if configured in some specific way, etc.)
Contacting project maintainers for assistance without even some prior analysis is just plain wrong I 💯 agree!

tbroyer, to webdev
@tbroyer@piaille.fr avatar

Announcing Platformer: a set of libraries to help implement:

• attribute reflection in web components following the HTML specification
• WebIDL type coercions for your public JS APIs (including web component properties)

https://github.com/tbroyer/platformer

Comes with ECMAScript decorators (compatible with TypeScript 5.2+ and Babel) for vanilla custom elements and Lit elements.

Currently not published on NPM (as I'm still evaluating whether all of this is a good thing worth pursuing 😂 feedback welcome!)

#webdev #WebComponents #buildWithLit

ayo, (edited ) to random
@ayo@ayco.io avatar

What’s your preferred app configuration format? Comment explanations or answers not in options (I can only add 4)

🙏 pls for science

tbroyer,
@tbroyer@piaille.fr avatar
tbroyer, to webdev
@tbroyer@piaille.fr avatar

📣 I've written about how I improved (in my opinion) @stefan' <sparkly-text> by, for instance, moving the sparkles to the shadow DOM. I also left many things to be done though. Of course this is subjective, so YMMV.

https://blog.ltgt.net/web-component-step-by-step-improvement/

#webdev #WebComponents

tbroyer, to webdev
@tbroyer@piaille.fr avatar

Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors.

https://blog.ltgt.net/web-component-properties/

#webdev #WebComponents #buildWithLit #fastdesign #stencil

develwithoutacause, to til

#TIL any errors thrown in attributeChangedCallback get swallowed. They're not propgated to whoever called el.setAttribute('observed', 'data').

tbroyer,
@tbroyer@piaille.fr avatar

@zachleat @develwithoutacause Probably because no built-in element would ever throw when changing an attribute.
State is derived from attributes, but attributes don't directly "set" state, and it's not abnormal to sometimes be in some sort of "invalid state" and you have to cope for it.

Would you like it if you had to be careful updating min, max and value in proper order or it would throw?

See https://blog.ltgt.net/web-component-properties/ where I touch the subject a bit (among other things)

nixCraft, to mastodon
@nixCraft@mastodon.social avatar

doesn't directly support quoting toot like the bird app. Support (Literally) Quoting Public Toots https://github.com/mastodon/mastodon/issues/22793 is still open. I hope they release support for this. This is killer feature.

tbroyer,
@tbroyer@piaille.fr avatar

@nixCraft Particularly as many fedi clients do support it!

westbrook, to webdev
@westbrook@mastodon.social avatar

would be such a better tool if it wasn't doing some non-platform thing with platform primitives at every turn. Or at least, could it have a "vite, but for people who actually like the web" configuration option?

🤦‍♂️

tbroyer,
@tbroyer@piaille.fr avatar

@Lukew @westbrook Ah yes, I do remember that in 2021 the french website https://vitemadose.covidtracker.fr (to easily book covid vaccination appointments) had (and probably still has) a similar issue: the CSS ended up duplicated between the main page and the shadow dom. This was due to import styles from "style.scss" both injecting the styles in the HTML and returning them as string (so they could be used as unsafeCss with Lit).
I did report this to Vite at the time and indeed the answer was to use ?inline (might have been added specifically in response to that issue): https://github.com/vitejs/vite/issues/3246
That was 3 years ago though, I'd have hoped it would have changed…

tbroyer,
@tbroyer@piaille.fr avatar

@westbrook I don't use vite but know teams at work who do so I'm curious. Could you name a few of those things it does?

aeris, to random French
@aeris@firefish.imirhil.fr avatar

Quelqu’un saurait comment avec docker compose virer les containers qui sont issus d’un run sans l’option --rm ?
Si on tente un docker compose rm xxx-run-yyy il ne voit rien.
Il y a une option supposée mergée mais… qui n’existe juste plus ?
https://github.com/docker/compose/pull/3178

tbroyer,
@tbroyer@piaille.fr avatar

Quelle version de Compose ? Parce que "it works on my machine", que le conteneur tourne toujours (detached) ou non.

$ docker compose run keycloak true  
$ docker compose run -d keycloak cat  
$ docker compose ps --all  
<montre les 2 conteneurs, un Up, l'autre Exited>  
$ docker compose down --remove-orphans  
<arrête le conteneur qui tourne, supprime les 2 conteneurs>  
$ docker compose version  
Docker Compose version 2.27.0  
tbroyer,
@tbroyer@piaille.fr avatar
nixCraft, to linux
@nixCraft@mastodon.social avatar

What should the fandom be called? 🤔

tbroyer,
@tbroyer@piaille.fr avatar

@fmuc @nixCraft Nah, that's for frontend web developers fan of web components: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM

tanepiper, to random
@tanepiper@tane.codes avatar

Should this even be optional? 🤔

tbroyer,
@tbroyer@piaille.fr avatar

@tanepiper AFAIK the most critical level is not optional, you can only disable lower levels (and given how irresponsibly the Paris prefecture abused it to advertize for the olympic games' opening ceremony pass, I bet may parisians disabled those lower levels already).

niclake, to random
@niclake@mastodon.social avatar

Really tempted to give @eleventy a shot, but I've not actually looked at hosting stuff in ages (thanks, GitHub Pages). Any recs for good, affordable hosting platforms for a small site like mine?

tbroyer,
@tbroyer@piaille.fr avatar
dutchcelt, to web
@dutchcelt@mastodon.social avatar

In the EU, iOS will soon allow multiple browser engines. Is this the end of Safari's dominance on iOS? Will it fall into obscurity? Will it eventually be discontinued? Will the tables be turned as Safari becomes a Chromium browser? That would be ironic.

#web #safari #ios #browsers #eu

https://dutchcelt.nl/posts/the-singular-web/

tbroyer,
@tbroyer@piaille.fr avatar

@dutchcelt Do you think Apple continues to invest in Safari because of some sunk-costs fallacy? They could have already switched to Chromium a long time ago, so I don't think this is going to happen.

As for whether Safari will lose its dominance on iOS, I'm not sure either: people don't care about the browser engine, they care about integrations and they (already) use Chrome on iOS because of how it can sync their data with their Google account, whether WebKit or Chromium.

zachleat, (edited ) to random
@zachleat@zachleat.com avatar

curious what percentage of y’all:

tbroyer,
@tbroyer@piaille.fr avatar

@zachleat Did use one to have more grip, but it was a bit too big. Removed it a few weeks ago and I don't think I'll get back (well, except it allows me to also attach an accessory… which I only use once in a while… (Xiaomi photography kit))

patrickbrosset, to CSS
@patrickbrosset@mas.to avatar

Have you used CSS Subgrid?

Looking at the comments that people left about it in the State of CSS survey 2023, I see mostly negative comments. 3 broad themes:

  1. Lack of cross-browser support.
    This is no longer a problem! Subgrid is implemented in all engine as of Chrome/Edge 117.

  2. Complexity/lack of good docs.
    Do you feel this too?

  3. Lack of actual use cases for it.

tbroyer,
@tbroyer@piaille.fr avatar

@tomayac @patrickbrosset We've been using subgrid at work in an internal knowledgebase site since before it came to Chrome. It goes like this:

<body>  
 <header>  
 <div>site title  
 <div>theme toggle  
 <div>  
 <div>search  
 <div>site version  
 <nav>main menu  
 <main>  
 <h1>page title  
 <div>main content  
 <div>author, date, tags, outline  
 <footer>  
 <div>left  
 <div>right  

and we want to render in 1, 2 or 3 columns. We could remove the <header>, <div>, <main> and <footer> grouping level and just use grid, but using subgrid seems like a better fit here.

melix, to random
@melix@mastodon.xyz avatar

Benefits of constructor injection vs setters: you don't have to rebuild your code 2387619 times to figure out all the dependencies.

tbroyer,
@tbroyer@piaille.fr avatar

@melix …and every single place you need to update (particularly unit tests that don't use DI) whenever dependencies change: code just fails to compile.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • cubers
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • tacticalgear
  • osvaldo12
  • normalnudes
  • tester
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • anitta
  • Leos
  • provamag3
  • modclub
  • lostlight
  • All magazines