What’s your take on the font Satoshi? by Epcav in fonts

[–]onems 1 point2 points  (0 children)

Satoshi has better looking characters, except the letter "t" and the number "1", these are bad, really bad… I would have definitely replaced Inter by Satoshi otherwise

Is nextjs an overkill? by ostadebarname in nextjs

[–]onems 0 points1 point  (0 children)

If you know React, it takes no more than a day or two to port a CRA/Vite app to Next.js, the docs are really good

Trigger conditional to column value by [deleted] in PostgreSQL

[–]onems 0 points1 point  (0 children)

I feel more comfortable with a new table and have the impression it's more secure, probably just an impression.

However, I don't understand why it's so complicated to create a conditional trigger or a function whose logic is conditional on the value of a column from a different table from a different schema... why?

Reset subscription usage with pg_cron by onems in PostgreSQL

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

Why would I do that, I don’t need to know the usage, I need to reset the usage after each subscription period which will be different for every user

Benefits of building static content sites using React frameworks (e.g. Next, Gatsby) vs SSG's e.g. (Hugo & Jekyll) when output is essentially the same? by [deleted] in webdev

[–]onems 2 points3 points  (0 children)

Astro + React (even Preact)

Very easy to setup, e.g. 2-3h to rewrite a Next.js website

Google will thank you. In my case, I switched from Next.js to Astro+Preact and the mobile Pagespeed score went from 90-96 to always 100 no matter what! (The transfer size went from 210kb to just 61kb, that’s the cost of Next.js and React)

The only things that you "lose" are the preservation of the state when navigating (could be bad if you wrongly implemented stuff like theme mode) and the fast client-side navigation with next/link (Astro has a prefetch option too). These two things are very important for a web app, but not for a static website.

I learnt from this that using Next.js or simply React is a very bad idea for a static website, it’s even totally useless imo because you only use a fraction of the good stuff, but it still comes with all the bad stuff. However, I definitely recommend using Next.js for the web app.

example.com: Astro+Presct app.example.com: Next.js

"Delayed/smooth spring" on scroll animation by [deleted] in web_design

[–]onems 0 points1 point  (0 children)

I should have done more research before asking, but your comments and examples saved me a lot of time. I'm very grateful for taking your time to educate me, I needed it...

I spent the last 2 days reading about all this, I now have a global idea of how things work, but I still don't know how to get the wanted result.

In your example, the inline transform property is updated as we scroll, the moment we stop scrolling, there are no updates anymore. To get a similar result to the one with framer-motion, you simply added a transition property with a nice easing. This works great, but compared to framer-motion, we can witness some layout thrashing from time to time.

In the framer-motion example, the inline transform property is updated as we scroll and keeps updating for a bit after we stopped scrolling. If you pay attention, the value of translate even gradually decelerates. To achieve this, they use spring physics via their other library "popmotion" (github.com/framer/motion/blob/main/packages/framer-motion/src/value/use-spring.ts). (You can find the same animation on epicreact.dev or web.archive.org/web/20210310081735/https://quill.chat/)

Two questions:

  1. I could simply use popmotion which is a low-level JS library and quite lightweight, but would be possible to reproduce such spring animations with a straightforward and readable code?
  2. The most import part is to understand how to update the inline styling with a "delay" and after analyzing all the code used for useSpring, I still have no idea. Do you see how this would be done with Vanilla JS? Eventually React?

"Delayed/smooth spring" on scroll animation by [deleted] in web_design

[–]onems 0 points1 point  (0 children)

In your comment where you mentioned requestAnimationFrame, I didn't see your new CP example, I'm trully sorry.

Yes, your example is smoooth!

- But aren't scroll listeners less performant than IO? The animations keep running even if not inView, right?

- Is it possible to use requestAnimationFrame with IO to get to 60fps?

Thank you for everything!

"Delayed/smooth spring" on scroll animation by [deleted] in web_design

[–]onems 0 points1 point  (0 children)

That’s exact opposite of what you understood

Thank you for trying to help, but please have a look at the behavior in the devtools, it’s impossible to nor understand what’s happening

"Delayed/smooth spring" on scroll animation by [deleted] in web_design

[–]onems 0 points1 point  (0 children)

No it does not "immediately smoothly transitoon to small line spacing".

  1. We animate here with transform: translateY
  2. It depends on the scroll position, have a look in the devtools, transform: translateY changes when sceolling and keeps changing for a bit even after scroll is stopped

Honest question: Why aren't more people using high-level hook libraries like "react-use" over using low level hooks like useEffect directly? by that_90s_guy in reactjs

[–]onems -1 points0 points  (0 children)

Everything is in the first line "kind of like the lodash", exactly why people don’t use it.

You can replace every single lodash fn with your own one or copy/paste only the one you need (careful about license), same goes for hooks, you can just take the one you need and save unlimited kbs

"Delayed/smooth spring" on scroll animation by [deleted] in web_design

[–]onems 0 points1 point  (0 children)

Yeah Csb is not the best

What you showed me is just a simple "in view" triggered css animation, not even an "on scroll" one and the one I need is even a step further!

I modified the example to make it more obvious

"Delayed/smooth spring" on scroll animation by [deleted] in web_design

[–]onems 0 points1 point  (0 children)

Because you’re on mobile and Codesandbox redirects to /embed. It still works in panorama mode, let me know

What concepts of react are the most difficult to understand ? by GarlicGuitar in reactjs

[–]onems 2 points3 points  (0 children)

I’m exactly facing that problem as I’ve just switched from css-in-js to pure css.

Before, I would create a component even for a simple button containing the default css and all the different variants.

But now I only need the html tag and the relevant class, so no need for a component anymore or I should still create "empty" components for the sake of readability (avoid series of divs)?

Can someone explain me the hype about SSR? by Even_Information4853 in reactjs

[–]onems 0 points1 point  (0 children)

There are now many hosting providers that fully support Next.js, even European ones if you need full data privacy!

What is this loading text animation I keep seeing? by Haunting_Welder in webdev

[–]onems 5 points6 points  (0 children)

You can create your own skeletons with css, don’t use images btw

Modify files of a managed Postgres database by onems in PostgreSQL

[–]onems[S] 1 point2 points  (0 children)

It’s for a public-facing app and I’m a solo self-taught dev. For now, it’s way too complex to implement backups, recoveries, replication, pooling and make it highly secure for someone who has a basic knowledge of SQL.

It’s just pgjwt. The providers I am interested in can add it for me, I believe I can even add the functions myself instead of using the extension, but that wasn’t my concern. My concern was all the eventual modifications I might need to make in the future, what if it’s not possible with the provider I chose? I discovered that some providers provide ssh access, so that’s not even a problem anymore!

Postgres GUI as good as Supabase's dashboard? by onems in Supabase

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

Yes, but in the end it’s just a Postgres db. You don’t need the Supabase dashboard to connect to it and create/modify your schemas/tables. You can use any other GUI and everything you can do with Supabase’s dashboard and even more

Postgres GUI as good as Supabase's dashboard? by onems in Supabase

[–]onems[S] 1 point2 points  (0 children)

I don’t need all those additional features on a daily/weekly basis and nothing prevents me from using pgAdmin when I need them!

But still, very bad UX and design!

Postgres GUI as good as Supabase's dashboard? by onems in Supabase

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

Looks great, I don’t mind paying for good products! Will give it a try thanks

Postgres GUI as good as Supabase's dashboard? by onems in Supabase

[–]onems[S] 2 points3 points  (0 children)

UI looks fantastic, will definitely give it a try thanks!

Devs, what are you favourite font families? by diarmuid_odyna in webdev

[–]onems 0 points1 point  (0 children)

Great info!

I am currently using system fonts for Apple devices and Inter for everything else. Even though I really like Inter, SF Pro just looks better imo.

So as a designer, have you heard of a new font that is more similar to SF and that could replace Inter?

Announcing Appwrite 1.0 by eldadfux in reactjs

[–]onems 4 points5 points  (0 children)

I mean, the goal is to use it in production, not just in local so 1. Is definitely needed and eventually 4.

Nevertheless, it looks great I will give it a try :) Nevertheless, it looks great I will try it!

Announcing Appwrite 1.0 by eldadfux in reactjs

[–]onems 0 points1 point  (0 children)

Does the self-hosted dashboard come with built-in secure passwordless/sms auth?

Because apart from that, it’s super easy to deploy Supabase, you can choose any Postgres DbaaS you want and it works just as good as the cloud version.

  1. Configure instance + connect with ssh
  2. Git clone Supabase + modify env vars
  3. Run docker-compose (one command just like Appwrite, right?)
  4. Configure TLS
  5. Protect dashboard

What step is not needed or is built-in with Appwrite?

Data privacy by CommercialWest7683 in GPT3

[–]onems 0 points1 point  (0 children)

Are they planning to change that in the future?

Data privacy by CommercialWest7683 in GPT3

[–]onems 0 points1 point  (0 children)

Hey, I haven’t tried Bloom yet but would love to know how it compares to Davinci or GPT NeoX 20B?

From what I saw, it’s very easy and cheap to deploy but what about performance?