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

Fix: position of child matches #46

Open IlliaHreben opened 1 year ago

IlliaHreben commented 1 year ago

Hey, thank you for your work! I want to improve it a bit. The point is when the parent element has only one child (like on the screenshot) column doesn't care about it and shifts it to the top. So I place the empty value on the index when the match shouldn't be. It's just my implementation, it works, but you can change it however you want. I just wanted to present the issue and idea of how to solve it.

https://github.com/g-loot/react-tournament-brackets/pull/45

image

Shenato commented 1 year ago

Hey thank you so much for bringing up this issue and providing a PR solving it, could you provide an example snippet of how you managed to get this state so i can recreate this locally? My thinking is if this is a bug we should probably add a test case against it so i can review your PR more properly 👍

I'm in the process of making test cases so the library can be further improved more easily by the community.

Diday commented 7 months ago

I do agree with this idea, sample in my case to optimize the matches (without a bye position) like in challonge.com

Screen Shot 2024-01-25 at 14 46 25