noauthority.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Long live NAS!

Administered by:

Server stats:

1.4K
active users

Really? If it is that simple that's fucking cool.

@silas

That seems retarded to me. It's extra software to do what the browser already does natively.
Regular Silas 🇩🇪

@toiletpaper yes. But I want to prevent it from flashbanging the user with the white background and also don't want it to show unstyled elements while it's loading the rest.
That looks ugly and stupid.
My current solution is just show a full screen loading screen but that is really annoying.

This is like a middle ground between a real single page app and normal website with pages.

@silas

That sound like a consequence of bad web-design. I guess you could add more bad web-design to act as a work around, but if the content is under your control, better to implement some good web-design to fix the problem to start with.

@toiletpaper like what. Not use style sheets and just unstyled html?

@toiletpaper if there is another solution to not have flashes of white and the elements loading in unstyled. Of course I would use that. I just didn't look at that yet. I just saw this randomly out of coincidence and I think it would work for that issue.

@toiletpaper like browsers showing a white screen when loading is default browser behaviour.

@toiletpaper also yea just quickly looking.... You can apparently just do what I did. Show a throbber and block the whole page until it is loaded.. But then you still get a white flash shortly and then the fucking spinner every time.
Or put some. Js to fade the body in and out. Which seems stupid too. That just makes it fade to white instead of flash.

Or use single page app frameworks like livewire they write.

@toiletpaper I don't think I would do use that specific thing. I think I'll just have it load in and display or hide the individual things the user interacted with. Component based loading. Not like fake built in page loading.

@silas

This might not be entirely relevant to your use-case, but I found it interesting. A lot of good techniques.

How is this Website so fast!? | Wes Bos
https://youtu.be/-Ln-8QM8KhQ
@silas

Hmm. It's hard to say what the issue is without directly seeing the pages in question, but if the problem is FOUC, then yeah as you said you can do <html style="display:none"> and then reset that to display:initial in the final stylesheet or an inline style after the </body>.

Personally I never see that problem. Probably because, firstly, I load my external CSS synchronously in the head, or inline. I also I don't load that much content dynamically, which can cause the browser to rerender a bunch of times. I don't load too much content into a single page, which creates visible latency when pages load. I also use caching and other techniques to speed up rendering of static content.

But there are a whole bunch of possible reasons that could occur, and most of the time it's just poor design ime. It's hard to say exactly what the issue is without seeing it and fucking around with it for an afternoon.

@toiletpaper well I was just experimenting with styles to get it looking a very specific I want.. It's mostly just a top bar with 5 buttons and then a repeating background.

I have not thought about do I break it into livewire components that I can change individually or how do it do it...
I basically just copied the whole page, changed the page title and what button was using my top-bar-button-active blade component.
Just to see.

So. Yea it does load the entire page fresh.

@toiletpaper it's just blade components with one single livewire component that just gets a random number to emulate a live count.

Using css in the app.css and also tailwind though

@silas

I'm rewatching that YT vid I pasted, and I notice that the wire:navigate feature is doing something similar to what the mcmaster-carr website does, except instead of waiting for the person to click the link, they load the HTML content on mouseover. It reminds me of the old days of using javascript to preload images (which I still do) for multiple pages of a gallery, etc.

Anyway, I guess you'll be better off using what is appropriate to your situation. I was just making an off the cuff remark because it seems a lot of JS frameworks out there are trying to reinvent the wheel to compensate for issues of their own creation.

@toiletpaper lol. Well I dont know what solution I want to go with. I think I will just make a lot more livewire components. And make it more interactive overall. Just like hiding page loads is silly...
For actually for Design reasons. It would make sense if you saw it lol.

I want to try wire navigate though... Once I am home. And yes also watch that video. It's about the site I wanted to look at anyways.

@toiletpaper literally learning how to do this stuff

@silas

Personally, I have nothing against dynamically loaded HTML, *after* the page loads. Like if you're paging through content in a single page app, or fetching the next level of a very wide/deep set of submenus, or stuff like that. But my personal feeling is to avoid JavaScript like the plague whenever possible. It's nothing against JS per se. I actually really like JS. But it get's waaay overused to do stuff that was entirely routine with server side templates and static site generation like 20 years ago, and the end result is nothing better, just bloat and latency. Also it doesn't generally play nice with accessibility for screen readers and so on. But that's just me. I knee jerk despise JS frameworks whenever there's already a tried and true old school way to do the same thing. I feel like a lot of the JS framework developers are just reinventing the wheel with a new marketing package on top to justify their jobs and try to stay relevant long past their best-buy date.

@toiletpaper js frameworks don't mean you can't do stuff on the server anymore though.
And idunno. I feel like you need to do. Both stuff in the client and on the server. I don't particularly like Ruby on rails for example. If you look at stuff like Hey. You click a button and it takes a second and then when it shows up in your browser it like loads in crap and snaps into place. I think they even take in multiple actions of you clicking a button before the server made the stuff.

@toiletpaper create infinite fucking calender entries and shit because oh no your browser didn't receive the answer of having successfully made an event yet because you are on 3G wireless

@toiletpaper I don't use Javascript though.. Like that's why I chose to learn laravel first. Php. And the livewire. Although sure there's like a livewire script running in the browser. But I don't actively do that.

I will do more testing though with it to see can i dynamically load and show menus and stuff... Without it looking like a rails project.

@silas

> js frameworks don't mean you can't do stuff on the server anymore though.

I know. But it's mostly to compensate for latency and related issues that were created by their own front-end code. Meanwhile HTML templates have been a thing for well over 20 years already. There's nothing really new or revolutionary about it that you couldn't achieve with some engineering in the first place. Slashdot for example has been doing that forever using Perl, which is widely regarded as one of the slowest scripting languages out there. And yet there's this thing called the "Slashdot effect" which they themselves never succumbed to.

@toiletpaper I mean how much does it matter if you use php and blade to put together html pieces on your server... Compared to using nextjs to put together react and html pieces on your server.

I don't actually know because I haven't started looking at react yet... I want to eventually. Just because seems like you can get a job with it probably. And then next just mostly randomly. I hear many good things about it though.

@silas

> ...seems like you can get a job with it probably.

That's what it really boils down to in my opinion. Apart from that it has a bit of cross-platform benefits for mobile (ie. React Native). But even though I'm not a React guy whatsoever, my impression is that this is mostly a matter of buzzword bingo and very little to do with the benefits of the technology itself relative to what came before it. Tbh, I was doing stuff that react does back during the era of the browser wars, just by having a function that acts as syntactic sugar around document.createElement, which accepts an object like {div: { className: 'foo', onmouseover: function () {...}, childNodes: [ ... ] } }. Those could be broken up into components too. There was also XML, as in XMLHttpRequest, which could encapsulate a lot of component related content. It's really reinventing the wheel, and I don't think the end result has nearly the benefits it's evangelised to relative to the cost in complexity and bloat.

@toiletpaper I was pretty much against react due to a misunderstanding of what react was and then react native and the other things for it was.
When I saw a video where someone just actually explained which thing is react itself and what makes it work for Web, native mobile, desktop, fucking 3d and vr and AR shit.

That actually made me kinda interested in it.

@silas

If you have that video, please send it to me. Maybe I'll change my mind. Tbh, it seems next to impossible to get a job doing fullstack these days unless you can rhyme off all the react related buzzwords, so even if I think it's a bit pointless as a technology, it's worth understanding it anyway.

@toiletpaper I have seen one job listing for full stack developer as only done with laravel and livewire.... I think one.

But then also many which want laravel plus react. Which.. Like.. Idunno. Almost seems stupid to me but there's good reasons for it I assume.

@toiletpaper I need to go look for that video again in a bit.but I think I can find it.

@silas

The one thing I could see being of use with React is tying dynamic page elements to dynamic data. But again, I was doing similar things using a signals and slots paradigm at least a decade before React existed. So, other than having a uniform way of doing things that other developers can easily maintain, it seems kinda *meh* And even in respect to maintainability, the goal posts of React dev seem to be moving so fast it's basically already obsolete or being replaced with some new and improved <insert buzzword> by the time the site's been pushed to prod.

@toiletpaper
That video. When he went "this is part of react-Dom" I loudly went ooohhh.

It's not exclusively him just explaining.. Also reading an article and the cross platform stuff comes up multiple times.

The rest seems good too. I used to not like him when I found his channel like 6 months ago. But I like him now. He does seem very smart to me.

You can skip the sponsor part though. Just skip to 2:00 immediately.

youtu.be/GjBfD9PHff4

@toiletpaper and I get what the problem is and what they are trying and apparently achieving with it.
At least from my limited knowledge and use of other frameworks/toolkits... Like.. I know GTK XML.. I know GTK with Blueprint... Both super directly tied to how GTK works. And then actually yes that's it lol. Unless you count laravel with blade too. That's also just literally tied to Webbrowsers exclusively.

@silas

Oh that guy. LOL. Yeah. I watch his stuff sometimes. Hadn't see that vid yet though. Thanks for sharing.

Btw, I use either FreeTube or yt-dlp for videos, which filter out the ads. ;)

@toiletpaper lol. Yt dlp filters out in video sponsor reads?

Also yea that guy. I used to shit on him and call him a vercel shill on twitter often.. But like. I exchanged many tweets with him and watched more of his stuff. And yea i do like him now and think he's smart.
Lol just the fact that he's leaning into it and his new domain for linking to sponsors is soy.dev is already smarter than most people.
But yes. Interacting with him on twitter and watching him live changed my opinion of him.

@toiletpaper @silas dynamic replacement goes back to
Like 2003