HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dylanjha

no profile record

Submissions

I built an agent to organize 500 GB of family home videos from the 90s

mux.com
15 points·by dylanjha·2 месяца назад·0 comments

What everyone gets wrong about AI customer support

mux.com
2 points·by dylanjha·12 месяцев назад·0 comments

Begin (begin.com) team joining Sanity

sanity.io
3 points·by dylanjha·2 года назад·0 comments

How to steal video content on the internet (not a tutorial)

mux.com
1 points·by dylanjha·2 года назад·1 comments

How we got critical data everywhere, all at once

mux.com
1 points·by dylanjha·3 года назад·0 comments

Script to convert pg essays into epub for your kindle

github.com
1 points·by dylanjha·3 года назад·0 comments

We glued together content moderation to stop soccer pirates

mux.com
174 points·by dylanjha·3 года назад·229 comments

comments

dylanjha
·в прошлом году·discuss
Why do you want to migrate from remotion to pure canvas?
dylanjha
·в прошлом году·discuss
Ever consider shipping this as an SDK that other apps can embed? This is something I’ve heard many people ask for.
dylanjha
·2 года назад·discuss
Yeah, worth noting that there IS an escape hatch for monkey-patching (at your own risk). So you're not totally out of luck. It is just HTMLElement all the way down
dylanjha
·2 года назад·discuss
Not everyone has to use everything.

In my 13 years there are a lot of technologies I've never used. Maybe there was opportunities where you could have, or maybe things are working just fine for the problems you're solving and you don't need it, which is fine too.
dylanjha
·2 года назад·discuss
Styling components nested inside other components can still work with either slots or scoping CSS custom properties with parent selectors.

.login-form { --button-outline-width: 2px; }

.credit-card-form { --button-outline-width: 2px; }

Of course, the component needs to be authored & documented in a way that supports this.

For example, shoelace has a "Drawer" component: https://shoelace.style/components/drawer

By default the drawer component has an "X" button in the header to close it. If you want to override that, instead of trying to style the nested "X" button you can pass in your own header actions with slot="header-actions"
dylanjha
·2 года назад·discuss
> think there is a clear tension between the component desire for encapsulation vs the web designer wanting to impose their styling on the nested components

This is the inherent tension. It requires good web component authoring to expose:

1. `part`s that can be accessed by application-level CSS

2. slots for the application developer to inject html

3. CSS custom properties (--variable) -- these pierce the shadow DOM

The web component authors have to be very intentional about these things. There are good examples and bad examples and I think people are still learning how to do this well.
dylanjha
·2 года назад·discuss
I see. Particularly with CSS there's more of an enforced contract around how the element internals get exposed for styling. If the element hasn't exposed `parts` or slots it's hard to hack around it.

More broadly speaking I have found myself getting thrashed by the ever evolving "best practices" in the React ecosystem. First: write everything using class components, and then a couple years later everything should be written with hooks.

I think the benefit of web components (for certain things) is that the APIs and the standards move slowly. Something you write today isn't going to feel obsolete in only a couple years.
dylanjha
·2 года назад·discuss
(author from Mux here) -- that is correct. For the stuff we build for in-house use on mux.com and dashboard.mux.com we have a components library written in React.

You nailed it that we are shipping SDKs with visual components (like a video player) that need to be compatible across all kinds of frontends.

Instead of N number of SDKs to maintain where N is every front end framework, we have 2: a web component, and a React wrapper around the web component. Maybe in the (near) future we only have to maintain 1.
dylanjha
·2 года назад·discuss
(author here) I think the problem might be more around bureaucracy mixed with bad & buggy code than it is a specific problem with web components. Can you expand on that?
dylanjha
·3 года назад·discuss
It's amazing how the web has come full circle now.

2023 web developers: I figured it out y'all. Send HTML from the server.

1994 web developer: ...excuse me? What else would you do?
dylanjha
·4 года назад·discuss
Wow that’s exactly it. I didn’t know there was a term for this. Thanks for sharing!
dylanjha
·4 года назад·discuss
Even though I’m not deaf or hard of hearing, I find myself using captions more and more when I consume video content. I don’t think I’m alone in that. I saw something a while ago that tracked this as a broad trend. Today’s accessibility is tomorrow’s usability.

I also work on player stuff with OP and learned a lot in this process.