Fix dot placement in previous file name#444
Conversation
|
@jonatanklosko is attempting to deploy a commit to the Pierre Computer Company Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Updates the diffs header rendering so the previous filename in renamed-file headers gets the same bidirectional isolation fix already applied to the current filename, preventing leading-dot files from visually “moving” the dot under the RTL/ellipsis styling used in the header.
Changes:
- Wrap
prevNametext in a<bdi>element in the default header renderer. - Add a snapshot test case covering the default “renamed file” header AST output.
- Update snapshots to reflect the new
<bdi>wrapper in the previous-name node.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/diffs/src/utils/createFileHeaderElement.ts | Wraps prevName in <bdi> to isolate bidi rendering under RTL header styling. |
| packages/diffs/test/createFileHeaderElement.test.ts | Adds a new snapshot test for the default renamed-file header output. |
| packages/diffs/test/snapshots/createFileHeaderElement.test.ts.snap | Records the updated AST shape including the new <bdi> node for prevName. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for the followup fix! |
In #434 I missed that the same problem applies to previous file name, this PR applies the same fix. After the change, no tests failed, so I added a new one to cover it.