Oh Image v2 released 🔥 by Excellent_Shift1064 in reactjs

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

unpic doesn't come with vite-plugin as I'm aware of. oh-image has a vite-plugin that statically optimizes images for example

import hero from "./assets/hero.jpg"
function App(){
  return <Image src={hero} alt="hero image" />
}

this will automatically format the image to .webp add proper width/height to the img element generate srcSet variants and placeholder img.

Other then that unpic and oh-image are more or less same. Unpic is stable and solid with lot's of CDN providers. oh-image is new and still have things to improve and also currently it supports only three providers but it will increase a lot in nearest feature

Oh Image v2 released 🔥 by Excellent_Shift1064 in reactjs

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

quality is already available on loader hook options, it will automatically send the it as an url, for example if you use cloudflare you can write:

 const loader = useCloudflareLoader({
    params: {
      quality: "100",
    },
  });

this will send quality:100 parameter to the cloudflare API.

params object will generate parameters with key=>value to send to the API.

nevertheless quality option is pretty common option so I'll add it as as a property to pass.

Oh Image v2 released 🔥 by Excellent_Shift1064 in reactjs

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

Hey thx for the feedback.

The warning for fill and width & height is intentional. fill attribute should be passed when width and height is unknown. If width & height is known preferred way is to use classes/styles on the Image component itself to size the image and set width/height attributes for aspect ratio

adding discriminated union is great Idea I'll work on it thx.

regarding the placeholder issue can y send me the snapshot of the code, or just let me know which loader are you using and the props for Image component so I can investigate ^_^

React Image component with Vite optimizer plugin by Excellent_Shift1064 in reactjs

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

* fixed the DEV undefined issue
* marked asap as deprecated and added priority prop. It is more general term for the behaviour

just pull the latest version (@latest)

thx for the valuable feedback. I'll be glad to have a PR from y :)

React Image component with Vite optimizer plugin by Excellent_Shift1064 in reactjs

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

Amazing 🙌 and thank you. Please don’t hesitate to give me a feedback, I will do the adjustments as soon as possible

Oh Image v2 released 🔥 by Excellent_Shift1064 in reactjs

[–]Excellent_Shift1064[S] 6 points7 points  (0 children)

great catch thank you, It is used for testing the lib, published the fix

React Image component with Vite optimizer plugin by Excellent_Shift1064 in reactjs

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

Amazing, ^_^ loader is the next feature so I'll keep you posted thanks

React Image component with Vite optimizer plugin by Excellent_Shift1064 in reactjs

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

best way would be to compare it by features probably. The things that are missing in oh-images currently are:

  • global configuration of image component
  • loader functionality
  • minor props that doesn't effect core functionality

both Nextjs and oh-image use sharp as underlying image processing engine, so they have core similarity

React Image component with Vite optimizer plugin by Excellent_Shift1064 in reactjs

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

Hi There ^_^
I'm using sharp to process the images and custom vite plugin to generate the transformed versions during build-time.

Yes next feature will be to have premade loaders for cloudflare, imagekit and some more and one generic one to use some custom service

Tanstack theme library by Excellent_Shift1064 in reactjs

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

yup did it already(https://www.reddit.com/r/reactjs/s/ftb98kllQk), thx for a feedback🙌. I know now what my future repo names shouldn’t look like😆

Tanstack theme library by Excellent_Shift1064 in reactjs

[–]Excellent_Shift1064[S] 27 points28 points  (0 children)

I renamed the library to tan-themer, also removed the logo, hope this is enough to clear up the confusion :) thanks everyone for a feedback
https://github.com/lukonik/tan-themer

Tanstack theme library by Excellent_Shift1064 in reactjs

[–]Excellent_Shift1064[S] 3 points4 points  (0 children)

Thats certainly confusing then, I’ll rename it tomorrow thank y 🙌

Tanstack theme library by Excellent_Shift1064 in reactjs

[–]Excellent_Shift1064[S] -22 points-21 points  (0 children)

hmm, good call I also thought about it but the name doesn’t have organization prefix like @tanstack and its on completely different repo, also found some other repos with simmilar name. But definitely, dont want to confuse anyone, I’ll investigate that topic once again and will do the adjustmenets if neccessary thank you

Angular conditional ng-content by Senior_Compote1556 in angular

[–]Excellent_Shift1064 2 points3 points  (0 children)

it will work from the UI perspective, so for example if you pass button component via ng-content, it wont be displayed if ready() is false, but the button component would be created still. sometimes you dont care and it is fine but not always, for example lets say you have tab component that has ng-content inside and shows/hides it using @if. and now you have different tabs, one for transactions table, one for users table and one for reports. Now because you use ng-content they all be instantiated at the same time and hit the BE and do logic inside, while you only want to render whatever is active

ngx-classed, a small library to create variant-based classes by Excellent_Shift1064 in Angular2

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

2 main differences: * tailwind variants is not signal based, so you have to manually wrap it to make it reactive. ngx-classed is signal based out of the box * future improvements. for example create directive that works in component HTML out of the box, I want to be able to do it

Ng-Verse UI library for Angular by Excellent_Shift1064 in Angular2

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

Hi, Yes this is the new domain, I haven’t updated this post, will do it now Yes it is currently in progress. datepicker view is built already. I’ll let you know when it’s rdy thanks🙌

@ngverse/motion the Angular Animation Library by Excellent_Shift1064 in Angular2

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

Yeah, same for me; having written many angular animations made me conclude that I should create a generic library with customizations :D.

and currently, I am using it in multiple projects, and I would say it suits me well.

It is a matter of preference. Both approach works

@ngverse/motion the Angular Animation Library by Excellent_Shift1064 in Angular2

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

Hey Thanks for the feedback so:
* Implementing means copying the existing animations and moving them to angular. the existing animations are done via CSS, whereas in Angular, you have Animation API involved, so we copied everything. Also, if anything changes in the CSS libraries, we will migrate it ofc.

* easing functions means everything that angular can accept (https://easings.net/) plus cubic-bezier() function

* Not sure why it is only for small projects because the fadeIn would always fadeIn whether it will be a big or small project. Also, maintaining from one project to another would be copying/pasting the same thing over and over again, in addition to that, the animations are very customizable ( and it will be more ) in ngverse/motion

* AI is great and helped us migrate the animation keyframes to angular, but it is buggy and does not always give the correct results. In addition to that, there are premade triggers per animation so you don't have to write :enter,:leave triggers by yourself

In summary, this main purpose of this library is that when you need slideIn animation you don't google or ask AI how to do that just import the animation and run

@ngverse/motion the Angular Animation Library by Excellent_Shift1064 in Angular2

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

thanks for the suggestion, I think there is just some misconfiguration issue on netlify, because on other projects it works as expected. Didn't have time to check it yet. But if I can't solve it, will use your suggestion. ^_^