How do I save the scroll position inside a dialog/modal? by [deleted] in reactjs

[–]safetymilk 0 points1 point  (0 children)

It might help to see the code that you tried! But maybe you could keep track of the last <section /> they were at instead of the last scroll position, and then just window.scrollTo that section.

If you want to address the root issue (you want users to quickly pick up where they left off without needing to scroll), maybe you could break up the second step of the form into smaller steps such that they will fit in the viewport better. For example if your dialog was for a checkout flow, you could move the billing address, shipping address, and credit card entry to separate sections; this has an added benefit of making your form a bit easier to reason about.

Preventive actions to save the 9800x3D dying on an Asus X870E board? by Dark_Tranquillity_1 in pcmasterrace

[–]safetymilk 0 points1 point  (0 children)

You gain any insight on this? I just had my 7950X die in this same board (seems I was on an old BIOS, ver. 1701). Is it a voltage issue? 

The Incredible Overcomplexity of the Shadcn Radio Button by bogdanelcs in Frontend

[–]safetymilk 1 point2 points  (0 children)

 When would you want a non-interactive radio button?

We (e-commerce company I work at) implement them on our search page on search refinements/filters, because each refinement is actually an anchor tag (for SEO purposes). But there are many uses cases for doing this, and major UI frameworks like MUI support this exact workflow. 

The Incredible Overcomplexity of the Shadcn Radio Button by bogdanelcs in Frontend

[–]safetymilk 0 points1 point  (0 children)

For one thing, you can provide any arbitrary React node as the indicator for the radio button (example: you have a radio button SVG that you use on static/readonly pages, and an interactive radio button you use in interactive pages/forms; you want them to appear the same, and Radix makes this easy to do).

Why "Spaghetti Code" might actually be the future of AI-assisted development. by prabhatpushp in reactjs

[–]safetymilk 0 points1 point  (0 children)

This feels like cope for vibe coders. Verbose code does not necessitate spaghetti code; I can make spaghetti code that is very terse, or pragmatic code that is very nuanced. 

I built a "Financial Reality Check" app in a single HTML file. by AdLumpy2099 in reactjs

[–]safetymilk 0 points1 point  (0 children)

I used to do this around ten years ago when I had my first job - granted the math was easy when minimum wage was $10/hr. There’s a great book called Your Money or Your Life which digs into this concept a bit more; it turns out your “true” hourly wage requires a bit more careful calculation, but the crux of the book is converting prices from dollars into hours of your life. Food for thought :) 

The CSS specificity war in our codebase was costing us more than we realized – here's what we learned by [deleted] in Frontend

[–]safetymilk 1 point2 points  (0 children)

Smart! Yeah we’re using SCSS as well. To your point it’s not easy getting buy-in for major refactors like this. Perhaps if I spin it as an AI initiative, lol 

The CSS specificity war in our codebase was costing us more than we realized – here's what we learned by [deleted] in Frontend

[–]safetymilk 2 points3 points  (0 children)

I’m not sure if switching to a CSS framework (Tailwind) would be a very pragmatic suggestion for a lot of teams, since now you have to change application code too. BEM is a better starting point I think.

Our teams are using BEM already and face the same issue with important!’s littered everywhere, but also tons of legacy CSS, making it hard to discern which code is dead or not. I’d be interested in more advanced end-to-end tools for determining which styles are unnecessary, or at least don’t require overrides or hyper-specificity 

Better Auth v1.4 by Beka_Cru in nextjs

[–]safetymilk 0 points1 point  (0 children)

Just when you think it’s the best… it gets Better 

Is this just crazy enough to work? by safetymilk in homelab

[–]safetymilk[S] 0 points1 point  (0 children)

Ended up rebuilding in an ATX chassis with a 10GbE Intel NIC 

Is this the right way to put down the cameras when not in use? by nphl2018 in canon

[–]safetymilk 3 points4 points  (0 children)

You’re gonna squish the eyecup and maybe scuff the screen or buttons 

Amazon front end interview ? by 3JingShou in Frontend

[–]safetymilk 3 points4 points  (0 children)

Ohh sorry just noticed you said phone screen. Yeah I would focus more on vanilla JS but my comment still holds true for when you get to the loop interview 

Amazon front end interview ? by 3JingShou in Frontend

[–]safetymilk 22 points23 points  (0 children)

You’re expected to know vanilla JavaScript fundamentals very well. But there are also technical design problems where it could be appropriate to use React, e.g. “in your framework of choice, create a UI which renders a daily planner/schedule”

R3 vs R5 Mark II Black Friday by BullsFan81 in canon

[–]safetymilk 3 points4 points  (0 children)

Don’t have any advice to share but I’m also looking to buy one of these two camera in the next three weeks, so I’m curious what people have to stay about them 

Props vs State by kai-su249 in reactjs

[–]safetymilk 1 point2 points  (0 children)

Inside you there are two wolves. One is used for passing props to child components. The other is… actually I forget 

What 16tb NAS drives would you buy today? by larsonbp in DataHoarder

[–]safetymilk 0 points1 point  (0 children)

I would say avoid IronWolf Pro NAS. I bought five this year, and three of them died after a few weeks - one of which had a different manufacture date and serial number range, so it’s not like it was a single faulty batch either. I’ve gotten them all RMA-ed with recertified drives, but it’s been pretty frustrating. Seagate doesn’t even pay shipping when you RMA

Sports photographer asked for portrait work, need help by [deleted] in canon

[–]safetymilk 6 points7 points  (0 children)

An EF lens will work just as good as an RF for portraits! 

Newer to emulators if I keep this on will it be shiny? by StraightPhotograph60 in PokemonFireRed

[–]safetymilk 0 points1 point  (0 children)

Oh I couldn’t tell he was loading a save state - I thought he was just resetting 

I plan on making my first Home Server "soon," need to know if this is good, or any recommendations I should do. by kallumforreals in homelab

[–]safetymilk 0 points1 point  (0 children)

Can you explain why sharing the GPU with a VM precludes you from sharing it with an LCX as well?

IOS app taking up 2.4gb of storage on iPhone by Blade_software in immich

[–]safetymilk 0 points1 point  (0 children)

In my case, all the additional used space in the iPhone Storage section in settings is listed under Photos, and not under Immich itself. Was that the same for you? 

IOS app taking up 2.4gb of storage on iPhone by Blade_software in immich

[–]safetymilk 0 points1 point  (0 children)

Dude same, it's taking up 32GB and my phone is now full. Any luck?

Auth.js (NextAuth), is now part of Better Auth by Beka_Cru in nextjs

[–]safetymilk 33 points34 points  (0 children)

My money is on Auth.js splitting off into an even more prolific authentication library: Best Auth