g-loot / react-tournament-brackets

React component library for displaying bracket leaderboards
https://sleepy-kare-d8538d.netlify.app/?path=/story/components-bracket--bracket
GNU Lesser General Public License v2.1
219 stars 69 forks source link

Swapped Webpack for ts compiler #64

Open Shenato opened 10 months ago

Shenato commented 10 months ago

This should help with the Nextjs window issues since you wont have to import code that references window useWindowSize isn't imported

Shenato commented 10 months ago

Note: This PR Updates the eslint rulings and tries to enforce a stricter typescript coding standard, a separate PR should be opened after to fix all the issues caught by the new linter

UTkzhang commented 9 months ago

This is great @Shenato, please let me know how we can support to get this merged and released

Shenato commented 9 months ago

I've been trying to make a manual beta release for testing to make sure it works before doing a full release and merging it to main, but I was just made aware that I don't actually have access to the npm package itself. So manually releasing isn't possible for me right now. I'm trying to get it sorted as we're speaking.

For now if you @UTkzhang or anyone else who's interested in helping me test and verify that this branch fixes #56, #34 as well any other Nextjs compatibility tickets that I might've missed, please feel free to do so in the meantime until i fix my npm access issues. I have some suggestions on how you could do so below

Suggested method of testing

You could clone this branch, build it locally and npm pack the dist folder then install it in your NextJS project using one of those two ways:

Otherwise If you manage to find better instructions how to use those two methods OR you have a better suggestion for how to package and test this branch please do so and let me know how you managed.

Shenato commented 9 months ago

Update: I've finally managed to publish a release candidate right here on npm https://www.npmjs.com/package/@g-loot/react-tournament-brackets/v/1.0.31-rc

Please use this version, test it out and let me know if it works with nextjs, regular client-side react and see if it solves #56 and #34 on those two environments.

feldrok commented 8 months ago

It's working for me on Next.js, but have type errors on

matchComponent={Match} Unsafe assignment of an any value.

and

svgWrapper={({ children, ...props }) => ( <SVGViewer width={500} height={500} {...props}> {children} </SVGViewer> )} Binding element 'children' implicitly has an 'any' type.

Shenato commented 8 months ago

Latest update, I just lost access to this repository, since this package is under Stryda's namespace, they just recently had issues at the company and had to remove outside collaborators (including my account) from the organization on Github.

So I will be attempting to make a fork of this repository, npm package and github package under my own account soon.

Shenato commented 8 months ago

as I said before, I lost write access to this repository, so I've mirrored it in my own repository.

The PR is continued here https://github.com/Shenato/react-tournament-brackets/pull/1