Skip to content

Fix dot placement in previous file name#444

Merged
amadeus merged 1 commit intopierrecomputer:mainfrom
jonatanklosko:jk-prev-name-bdi
Mar 27, 2026
Merged

Fix dot placement in previous file name#444
amadeus merged 1 commit intopierrecomputer:mainfrom
jonatanklosko:jk-prev-name-bdi

Conversation

@jonatanklosko
Copy link
Copy Markdown
Contributor

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.

image

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

@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.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Mar 27, 2026 8:02pm
pierrejs-docs Ready Ready Preview Mar 27, 2026 8:02pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 prevName text 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.

@amadeus amadeus merged commit 819f2a2 into pierrecomputer:main Mar 27, 2026
12 checks passed
@amadeus
Copy link
Copy Markdown
Member

amadeus commented Mar 27, 2026

Thanks for the followup fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants