ibrahimdenizz / vue-chessboard

vue-chessboard is Vue component. It provides FEN based chessboard view and functionality to your projects.
https://vue-chessboard.vercel.app/
MIT License
4 stars 1 forks source link

awesome work! Any chance you could add a prop for orientation? #2

Closed vesper8 closed 2 years ago

vesper8 commented 2 years ago

First of all! You're a life saver! Your chessboard is one of the only chessboards that works problem-free on Vue 3 / Vite!

Any chance you could add a prop to see the orientation (black faces up vs white faces up)

And it also would be nice if you could make it a bit easier to modify the board colours. If not through props, then at least show an example of how to do it?

Many thanks!

ibrahimdenizz commented 2 years ago

It warms my heart to hear such amazing feedback!

I made this chessboard for my graduation thesis. Nowadays, I have focused on my thesis delivery so I am sorry for the late reply. After my graduation ( three or four days later), i will focus these issues.

Also i have a chess library in javascript. if you want to look at it.

Thank you for your feedback :).

ibrahimdenizz commented 2 years ago

https://github.com/ibrahimdenizz/vue-chessboard/commit/329618ecd1777c382ec4940cb764d841cbba9590 Orientation property named as blackFaceUp is added

vesper8 commented 2 years ago

Thanks for adding this!

I think you could have stuck to something more simple such as orientation="white" (default) or orientation="black"

Similar to how https://github.com/justinfagnani/chessboard-element implements it (the other modern chessboard implementation that I'm using which doesn't work perfectly with Vue 3 but still works with a bit of workaround.

But I appreciate you adding it even though the blackFaceUp is a bit wordy and verbose for my taste ;-)

ibrahimdenizz commented 2 years ago

Hi, I published a new version https://github.com/ibrahimdenizz/vue-chessboard/commit/b619ed9aea859fac714b19c34a560ff3693594cb . Thanks for the advice. I looked at the library's documentation and it gave me a lot of ideas for future properties. But in this version, I added CSS color variables and removed the scope of CSS. Now, there is an implementation of color in the documentation and I will add CSS classes to the documentation asap. Finally, You are right about the blackFaceUp property that has not been given much thought :). I updated as orientation.

vesper8 commented 2 years ago

That's wonderful! Thank you for making the customization of colours much easier : )

Looking forward to future updates! Cheers!