Fix move animation clipping beneath board border#191
Conversation
Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
|
|
@copilot when moving from one side to the other side the piece starting animation position is off the edge of the screen |
|
@copilot some of the points are animating off the right edge of the screen now I don't think it was doing that before and now the animation is showing up below the pieces. İncrease the dialogue Z index |
…oard edge Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com> Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/c49561ee-6e2b-40de-aa09-138d1478b152
The root cause was that Fixed in 592e9ad by:
The z-index fix ( |
…ise dialog z-index Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com> Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/8ac6e086-2d7f-4433-8d84-2eb4f6fb9eac
Fixed in cad0af6 with three changes:
|
|
@copilot animating piece should be higher z index than regular board pieces but lower than dialogue |
…d pieces, below dialog Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com> Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/00e647c5-2d2c-455e-b986-2a96d267be2a
Done in 5ff2963 — |
|
@copilot animation does not appear above border |
… the border Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com> Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/ec66ed3b-3f8d-4976-a5f2-73d473c0e1e4
Fixed in 26dbae4. The overlay was positioned with |
There was a problem hiding this comment.
Pull request overview
Adjusts the board move animation overlay so animated pieces can render above the board border (without being clipped) while keeping the dialog UI layered above the animation.
Changes:
- Introduces
--board-borderand uses it for the board border width. - Expands the move animation overlay to the board border-box area and updates coordinate calculations accordingly.
- Moves
<MoveAnimation>to the end of#boardchildren and raises dialog z-index to keep dialogs above the overlay.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/index.tsx | Moves <MoveAnimation> to the end of the board DOM for paint order. |
| src/Dialogues/Dialogues.css | Raises dialog z-index to stay above the overlay. |
| src/Board/MoveAnimation.tsx | Aligns animation coordinate origin with the overlay’s new placement. |
| src/Board/MoveAnimation.css | Expands overlay via negative inset and sets overlay z-index/overflow. |
| src/Board/Board.css | Extracts border width into --board-border and uses it for the board border. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| const boardStyle = getComputedStyle(board); | ||
| const overlayLeft = boardRect.left + parseFloat(boardStyle.borderLeftWidth); | ||
| const overlayTop = boardRect.top + parseFloat(boardStyle.borderTopWidth); | ||
| const overlayLeft = boardRect.left; | ||
| const overlayTop = boardRect.top; |
There was a problem hiding this comment.
Done in f7bcc02 — reverted to boardRect.left + parseFloat(boardStyle.borderLeftWidth) / boardRect.top + parseFloat(boardStyle.borderTopWidth).
Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com> Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/37dc4af9-a89e-49f5-9d01-c02df503df13
|
@copilot when a piece is on the bar (hit) the animations for the opposite color of the piece on the bar looks the wrong size. if a black piece is on the bar, the white pieces are too big in the animation. same for the opposite scenario |
Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/dd332c38-f685-42e4-8bd2-58f53adfcd82 Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Fixed in cc12102. The root cause: bar pieces come before point pieces in the DOM, so when a piece is on the bar, |

<MoveAnimation>to be last child of#board— paint order fixdialog { z-index }from 1 → 100.move-animation-overlay { z-index }from 0 → 10 — above board pieces, below dialoginset: calc(-1 * var(--board-border)),width: auto,height: auto,overflow: hidden) so animated pieces can paint over the visual borderboardRect + borderWidth) per review feedbacksamplePiecequery to.point .pieceso bar pieces (which are narrower) are not used for size samplingOriginal prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.