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

Introduce useTimezoneSelect hook #81

Merged
merged 5 commits into from
Mar 30, 2023
Merged

Conversation

DreierF
Copy link
Contributor

@DreierF DreierF commented Dec 28, 2022

Description

This PR implements a solution for the issue discussed in #64.
I basically extracted a hook named useTimezoneSelect out of TimezoneSelect that exposes the options creation and the parseTimezone function to allow using other UI implementations for the Select dropdown (Semantic UI in our case).

Also added some documentation to the README and made the example use it as well.

Linked Issues

#64

@DreierF DreierF changed the title Implemented draft for #64 Introduce useTimezoneSelect hook Dec 28, 2022
@ndom91
Copy link
Owner

ndom91 commented Mar 27, 2023

Love this use-case!

If you could take a look at the merge conflicts, we can get this merged soon.

Sorry its taken me forever to get back around to these!

@DreierF DreierF force-pushed the extract_hook branch 3 times, most recently from e514532 to 1354f2d Compare March 27, 2023 16:59
@DreierF
Copy link
Contributor Author

DreierF commented Mar 27, 2023

I rebased the changes on main.
The build is now also failing (just like main) because due to the prepublishOnly the dist folder is no longer built before running the tests.

I also got rid of the .d.ts files, because they just duplicate all the types with the .ts files. Is there any reason why those are checked in that I missed?

@ndom91
Copy link
Owner

ndom91 commented Mar 27, 2023

I rebased the changes on main. The build is now also failing (just like main) because due to the prepublishOnly the dist folder is no longer built before running the tests.

I also got rid of the .d.ts files, because they just duplicate all the types with the .ts files. Is there any reason why those are checked in that I missed?

Ahh I guess thats why I was having issues with the prepublish script, for example, earlier too. I wasn't aware that pnpm doesn't run pre/post scripts by default.

Also, no I'm not sure what the deal with the .d.ts files is. Must have pushed them at some point by accident, thanks for cleaning that up too 🙏

Anyway, I just pushed a small commit to main enabling pre/post scripts with pnpm via an .npmrc config option. If you update your branch from current main, we shuold be good to go 👍

EDIT: Did it for you 😊

@ndom91
Copy link
Owner

ndom91 commented Mar 29, 2023

Removed the .d.ts files and made react-select a peer dep in 2.0.0 (#94) 🥳

As soon as we get this PR out it should be good to go then 👍

@ndom91
Copy link
Owner

ndom91 commented Mar 30, 2023

GH Actions has been stuck, so we can't run the tests here 😅

image

Hopefully it'll time out soon 🤞

@ndom91
Copy link
Owner

ndom91 commented Mar 30, 2023

Okay so tests pass, lets merge! 🥳

@ndom91 ndom91 merged commit ec0b028 into ndom91:main Mar 30, 2023
@ndom91
Copy link
Owner

ndom91 commented Mar 30, 2023

Released in v2.1.0. Thanks again! 🙏

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 this pull request may close these issues.

None yet

2 participants