Skip to content

[diffs] CodeView item metrics validation#665

Merged
amadeus merged 1 commit into
beta-1.2from
amadeus/layout-validation
May 11, 2026
Merged

[diffs] CodeView item metrics validation#665
amadeus merged 1 commit into
beta-1.2from
amadeus/layout-validation

Conversation

@amadeus
Copy link
Copy Markdown
Member

@amadeus amadeus commented May 11, 2026

Since valid item metrics are so important, I've added a new prop to help validate any use of custom CSS, a prop that runs only in dev mode the validate this logic.

Additionally this got me thinking that viewerMetrics was not a good name for this prop as it really actually controlled layout things (like paddings and gap) and to be named similarly to itemMetrics was confusing (since itemMetrics should ONLY be used with unsafeCSS and doesn't actually control the values specfied).

Also added and updated docs as necessary.

* Also renamed viewerMetrics to layout (since it differs from itemMetrics intent)
* Also improved docs around explaining this
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

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

Project Deployment Actions Updated (UTC)
pierre-docs-diffshub Ready Ready Preview May 11, 2026 10:04pm
pierre-docs-trees Ready Ready Preview May 11, 2026 10:04pm
pierrejs-diff-demo Ready Ready Preview May 11, 2026 10:04pm
pierrejs-docs Ready Ready Preview May 11, 2026 10:04pm

Request Review

@amadeus
Copy link
Copy Markdown
Member Author

amadeus commented May 11, 2026

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 904b69f071

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/diffs/src/components/CodeView.ts
Comment thread packages/diffs/src/components/CodeView.ts
@amadeus amadeus merged commit ce6894b into beta-1.2 May 11, 2026
12 checks passed
@amadeus amadeus deleted the amadeus/layout-validation branch May 11, 2026 22:24
amadeus added a commit that referenced this pull request May 12, 2026
Add a feature to help validate itemMetrics

* Also renamed viewerMetrics to layout (since it differs from itemMetrics intent)
* Also improved docs around explaining this
amadeus added a commit that referenced this pull request May 16, 2026
Add a feature to help validate itemMetrics

* Also renamed viewerMetrics to layout (since it differs from itemMetrics intent)
* Also improved docs around explaining this
amadeus added a commit that referenced this pull request May 20, 2026
Add a feature to help validate itemMetrics

* Also renamed viewerMetrics to layout (since it differs from itemMetrics intent)
* Also improved docs around explaining this
amadeus added a commit that referenced this pull request May 20, 2026
Add a feature to help validate itemMetrics

* Also renamed viewerMetrics to layout (since it differs from itemMetrics intent)
* Also improved docs around explaining this
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.

1 participant