正在加载视频...

视频加载失败

Historically, I really hate modals. But I just coded through them for the LAST stack tutorial and... I LOVE the result. Simple, reusable, beautiful. No external libs (besides Turbo & Stimulus), but I finally had to write some JS... a whole 50 lines 😛

10,918 次观看 • 2 年前 •via X (Twitter)

9 条评论

@rskuipers@phpc.social 的头像

We built this exact same solution as well and I love the simplicity. I also put a simple if statement for my twig extends keyword so we either extend modal layout if it's in the modal turbo frame or page layout if it isn't, making it very flexible to choose between modal and page

Zoran 的头像
Zoran2 年前

Great stuff as always @weaverryan. Thanks a lot

Bhumi 的头像
Bhumi2 年前

LAST stack is? something something Stimulus Turbo?

Sw8rl3y 的头像
Sw8rl3y2 年前

Looking forward to the symfonycast LAST stack tutorial ! Thx for your work !

deliooos 的头像
deliooos2 年前

Beautiful!! Do you have a repo ?

Ryan Weaver 的头像
Ryan Weaver2 年前

Yup - but nothing is really public yet - watch for the screencast :)

Valentin Silvestre 的头像
Valentin Silvestre2 年前

Meh. No more js 😈

Ryan Weaver 的头像
Ryan Weaver2 年前

Haha, I can’t even get away with 50 lines of js??? In all seriousness, this 50 line modal controller should be its own library after this, I think.

Ryan Weaver 的头像
Ryan Weaver2 年前

There is no doubt that modals are a minefield for accessibility. That’s something I need to learn more about

相关视频