Conversation
…eview
The guide embedded its markdown body through the FileDef field with @displayContainer={{false}} and reached into the shell markup with :deep() to hide the title and un-clamp the content. Render the body with the exported content-only MarkdownPreview instead, and drop the now-dead .markdown-embedded* overrides (the renderer emits .markdown-content now); keep the reading-column and BFM block-slot layout rules.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GsYGsuCqHJz9GAti4jheG
|
[Claude Code 🤖] Reviewed this in the skills pass across the open PRs: nothing the guidelines mandate, so no push here. It is the change they ask for — the One observation rather than an ask. The two Happy to do that as its own change if you want it — it touches |
What
Migrate the FileDef embedding field guide (
packages/experiments-realm/filedef-fixtures/file-embedding-field-guide.gts) off the shell-chrome-fighting embed pattern and onto the exported content-onlyMarkdownPreview.Before, the guide rendered its markdown body through the FileDef field with
@displayContainer={{false}}and then reached into the shell's markup with:deep()to hide the file title and un-clamp the embedded content. It now renders the body directly withMarkdownPreview(from thefile-formats/indexbarrel), and the dead.markdown-embedded*overrides are gone — the renderer emits.markdown-contentnow, so those selectors matched nothing. The reading-column (.markdown-content) and BFM block-slot (.markdown-bfm-card-slot--block) layout rules are kept, and the leading-H1 dedupe against the masthead is preserved.The render path is equivalent: the 36 inline
::file[…|embedded]fixtures resolve through the markdown's query-backedlinkedFiles/linkedCards, driven byMarkdownTemplate's own field access — the same whether the document arrives via the field shell or as an instance passed toMarkdownPreview.Audit result
A fresh repo sweep (
displayContainer={{false}}occurrences + chrome-hiding:deep()signatures) found this to be the only content-only-FileDef-embedding anti-pattern remaining. MostdisplayContainer={{false}}hits are plain card/atom renders, unrelated to FileDefs. No additional private renderers needed exporting — the sole target was markdown, andMarkdownPreviewwas already exported.Call sites intentionally left on the wrapped/native view (not anti-patterns):
experiments-realm/file-links-example.gts—<@fields.attachments @format='embedded' />with no chrome-fighting: a deliberate wrapped embed.base/skill-plus.gts— styles acontains(MarkdownField)render (.markdown-contentprose), not a FileDef embed; no chrome hidden.operator-mode/preview-panel/rendered-markdown.gts,markdown-embed-chooser/*—<CardRenderer @displayContainer={{false}}>is the BFM slot renderer's own machinery, not a call site fighting chrome.Follow-up (out of scope)
base/workspace.gtsREADME embed still carries a:deep(.markdown-embedded__content)un-clamp block that is now dead (the class was renamed upstream). It's a legitimately wrapped embed with a collapse/expand toggle; the dead CSS also implies the "Read more" clamp no longer engages — a pre-existing behavior change worth its own ticket rather than folding a behavior fix in here.Verification
ember-template-lintclean.Linear: CS-12589