Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for chakra v3 #88

Open
abrenoch opened this issue Oct 28, 2024 · 7 comments · May be fixed by #89
Open

Support for chakra v3 #88

abrenoch opened this issue Oct 28, 2024 · 7 comments · May be fixed by #89

Comments

@abrenoch
Copy link

Chakra recently released their v3 - would love to see this repo updated to support it!

@aboveyunhai
Copy link
Owner

This library is standalone from chakra UI module-wise as I didn't include chakra as dependency (it might sound weird even though you still need to install chakra).
So unless there is an api breaking change from component or import level, I believe it should work though,
Need to test it out actually.

@abrenoch
Copy link
Author

This library is standalone from chakra UI module-wise as I didn't include chakra as dependency (it might sound weird even though you still need to install chakra). So unless there is an api breaking change from component or import level, I believe it should work though, Need to test it out actually.

Unfortunately there appears to have been substantial changes to both the imports and components of chakra: https://www.chakra-ui.com/docs/get-started/migration

I'm working on a PR at the moment actually, just running into some baffling issue with GH today that isn't allowing me to push changes to my own repo 🤕. Should have something to look at sooner than later!

@abrenoch abrenoch linked a pull request Oct 29, 2024 that will close this issue
@amralsaidy
Copy link

amralsaidy commented Dec 25, 2024

Unfortunately this message with chakra ui 3:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of SingleDatepicker.
Any solution ?

@aboveyunhai
Copy link
Owner

Unfortunately this message with chakra ui 3: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of SingleDatepicker. Any solution ?

Chakra V3 is very different from the V1-2, without a huge rewrite, it's impossible to use this lib in V3.
There is rewrite in progress actually resolves all the runtime error
#91 ,
but the styling changes and the broken behaviors in modal are currently unresolved issues.

@amralsaidy
Copy link

Is there a specific time for this update to be completed?

@nivdam
Copy link

nivdam commented Feb 12, 2025

Hi @aboveyunhai
First of all, thanks for your work on chakra-dayzed-datepicker! We’re using it in a bunch of places in our project, and it’s been super useful.

Now that Chakra UI is on version 3, we’re curious if there are any plans to update the library for it. If not, we might have to look for other options, but we’d really prefer to keep using this package if we can! 🙏

@aboveyunhai
Copy link
Owner

aboveyunhai commented Feb 13, 2025

Hi @aboveyunhai First of all, thanks for your work on chakra-dayzed-datepicker! We’re using it in a bunch of places in our project, and it’s been super useful.

Now that Chakra UI is on version 3, we’re curious if there are any plans to update the library for it. If not, we might have to look for other options, but we’d really prefer to keep using this package if we can! 🙏

Glad to hear the lib is somewhat useful.
Fwiw, I just pushed the old local changes to the PR #91.
To your surprise, the PR contains codes that is "fully ready" for chakra v3 with all the stylings. I cannot 100% mirror the style from v2 since some of them were just gone. The failing test is false positive. (If you just copy paste the source code from /src folder or the entire folder in that PR into your codebase, it shall work)

However, there are several problems, I'm unwillingly to publish it.

1. The Portal behavior in v3 is a bit random comparing to v2. Popover position is random jumping when it's inside a container.
All of those in fact was addressed previously in v2, but now they are all broken again.
(fixed)

  1. There is a huge performance regression from Chakra Component. RangePicker is barely usable based on my testing.
    When I simply swap the chakra button to plain html button with the same logics, everything is blazingly fast.
    It's so slow that I'm hesitated to use it.
    Every single Chakra component (popover.root, tab.root, stack, simple box, style recipe, etc. etc.) constantly re-renders/re-compute once the state from upper chain is changing.
    Those never happened in v2.
    It's getting so bad that I'm not sure it's my own code problem (the code is inside the example file that remains the same structure that I was using for v2 testing and website showcase) or upstream from Chakra.
    If it's from Chakra, I wouldn't migrate from v2 to v3 until they fix in the later version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants