stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

3h 14m 31s logged

Made puzzles page responsive and bugs fixes :dance_moss:

Puzzles page responsive

Most the time was spent making the puzzles page responsive. As always it took more time than expected. There were many issue that popped up and slowly but surely I fixed them. One of the issues was in bigger mobile screens the sidebar was being squished because the chessboard was getting really big but puzzles page has height of 100dvh as the chesboard in mobile phones is calculated according to width. To fix it I tried adding min-height to the sidebar for not getting squished and height of auto to puzzles page but this broke the sidebar when puzzles is not started cuz there’s no chessboard. The height of sidebar is 100% so due to the parent’s height being auto the sidebar height was about as didn’t fill the whole screen. To fix this I used overflow: scroll to puzzles page and it’s height to 100dvh. Another issue came when trying to make chessboard and sidebar look decent in different laptop sizes. I made it somehow work but using clamp, min-height, max-height, min-width and max width. It was kind of a pain to solve all the issues that came while doing this. That’s why I’ve rushed making the puzzles page responsive. My plan is to come and polish it after I’ve made the course page responsive as well. It shouldn’t be too difficult imo as it’s very similar to puzzles page.


Fixed user being able to drag and drop opponent’s pieces

It was a quite dumb bug. I had prevented this for click to move feature but I didn’t think about it in drag and drop. The fix was quite simple as dnd-kit (npm package) provides a disabled property in useDraggble. I disabled it for the pieces for dragging which had the opposite color of chessboard.


Fix next puzzle button not working on second last level

I didn’t actually know about this bug. A friend of mine told me about this issue while testing the website. After level 29 is completed a state is toggled to true which prevents the next button from not working. The next button is now only supposed to not work after completed the last level. I haven’t used fixed values for fixing this so in future if I decide to add or remove puzzles it shouldn’t break. The fix was a little more complex than I anticipated.


9 days of stardance remain now. So, I have to lock in now. Okay bie :bye:

0
116

Comments 0

No comments yet. Be the first!