Skip to content

feat(types,emitter): carry source root attributes — LayoutFamily.root_attrs (finding #7, 36.4→100) - #138

Merged
ABB65 merged 1 commit into
mainfrom
feat/root-attrs
Aug 25, 2026
Merged

feat(types,emitter): carry source root attributes — LayoutFamily.root_attrs (finding #7, 36.4→100)#138
ABB65 merged 1 commit into
mainfrom
feat/root-attrs

Conversation

@ABB65

@ABB65 ABB65 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Ne

Bulgu #7: İçeriği kusursuz ama düzeni bozuk sayfa — klonda <body class="wp-singular post-template-default single … wp-theme-…"> ve <html class="js wf-…"> varken üretilen sayfada ikisi de boştu; tema CSS'i tam bu sınıflara bağlı. Elle eklenince 36.4 → 100.

  • types (minor): yeni RootAttrs + LayoutFamily.root_attrs?: { html?, body? }
  • emitter (minor): nitelikler chrome verisiyle taşınır (html_attrs / body_attrs) ve üretilen sayfaya <html {...htmlAttrs}> / <body {...bodyAttrs}> olarak yazılır. Değerlerde @@mark@@ doldurma çalışır (postid-@@wp_id@@ gibi sayfa-özel sınıflar için fillAttrs). Kaynakta açık lang varsa proje varsayılanını ezer (spread sırası).

Neden koşulsuz taşınıyor: aynı test bir sitede 36.4 → 100, başka bir sitede 36 → 36 (o tema gövde sınıflarına bağlı değil). Belirti siteye göre değiştiği için "gerekirse taşı" diye bir heuristik yok — her zaman taşınır. Bu gerekçe sözleşmenin doc-comment'ine de yazıldı.

Migrate induction sözleşmesi: klonun <html>/<body> niteliklerini LayoutFamily.root_attrs'a koy; sayfa-özel parçaları (ör. postid-123) mark'a çevirebilirsin.

Test

lint 0/0 · tsc · 8/8 paket build+test; 3 yeni test (nitelik taşınması + mark doldurma, root_attrs'sız ailede boş harita, lang'in spread içindeki önceliği).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NjgQYCFqwZjJt97yioyjnS

…bulgu #7)

Tema CSS'i <body class="wp-singular single …"> ve <html class="js wf-…">
sınıflarına bağlı; nitelikler düşünce içerik doğru olsa bile düzen tamamen
kayboluyor (ölçülen: 36.4 → 100). types: RootAttrs + LayoutFamily.root_attrs.
emitter: chrome verisinde html_attrs/body_attrs, üretilen sayfada spread ile
basılır; nitelik değerlerinde @@mark@@ doldurma (fillAttrs) — postid-123 gibi
sayfa-özel sınıflar için. Kaynaktaki açık lang proje varsayılanını ezer.

Koşulsuz taşınır: aynı test ikinci sitede 36 → 36 verdi (o tema gövde
sınıflarına bağlı değil), yani belirti siteye göre değişiyor ve "gerekirse
taşı" diye güvenilir bir heuristik yok.
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit ca62ade
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6a8d62478e7bfb00080a99e4
😎 Deploy Preview https://deploy-preview-138--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ABB65
ABB65 merged commit 0a32714 into main Aug 25, 2026
6 checks passed
@ABB65
ABB65 deleted the feat/root-attrs branch August 25, 2026 09:40
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant