From 842e0c127901e9782466a2b752d5962341b4ee17 Mon Sep 17 00:00:00 2001 From: Rim Zabarov Date: Tue, 10 Nov 2026 13:47:34 +0300 Subject: [PATCH 1/3] Keep example links, language and code blocks inside their examples; write bg-surface-page A #part link in an example frame scrolls the example instead of loading the frame's base folder; a frame document starts in the page's lang and dir; Docara's code-block header skips pre code inside inline HTML examples; the renamed Framework page surface replaces bg-surface-0, which layouts may still name. Co-Authored-By: Claude Opus 5.5 --- .../content/en/settings/layout-and-regions.md | 6 +- docs/site/content/en/start/first-component.md | 4 +- .../content/ru/settings/layout-and-regions.md | 6 +- docs/site/content/ru/start/first-component.md | 4 +- resources/framework/view-utilities.json | 12 ++- resources/portable/declarative-shell.js | 11 ++- resources/publisher/templates/page.php | 2 +- .../templates/side-panel.php | 4 +- src/PortableSite/PortableMarkdownRenderer.php | 76 +++++++++++++++++-- src/PortableSite/SurfacePresentation.php | 4 +- tests/PortableSiteBuilderTest.php | 12 +-- .../Unit/DeclarativeRegionCompositionTest.php | 14 ++-- tests/Unit/DocumentationContractTest.php | 2 +- tests/Unit/EffectiveComponentCatalogTest.php | 2 +- tests/Unit/ExampleRuntimeContractTest.php | 34 ++++++++- tests/Unit/PortableMarkdownRendererTest.php | 42 +++++++++- tests/Unit/RendererFrameworkUtilityTest.php | 14 ++-- 17 files changed, 199 insertions(+), 50 deletions(-) diff --git a/docs/site/content/en/settings/layout-and-regions.md b/docs/site/content/en/settings/layout-and-regions.md index f6339a3d..ca1daffc 100644 --- a/docs/site/content/en/settings/layout-and-regions.md +++ b/docs/site/content/en/settings/layout-and-regions.md @@ -290,10 +290,10 @@ HTML, event handlers, JavaScript URLs, style or class strings, callbacks and template paths stay out of reach. The allowed utilities are listed in `resources/framework/view-utilities.json`; -these are SIMAI Framework classes, for example `bg-surface-0` for the surface +these are SIMAI Framework classes, for example `bg-surface-page` for the page background and the pair `border-bottom-1 border-bottom-solid` for a bottom -border. The former names `surface-0` and `border-bottom` do not exist in the -Framework, but Docara still accepts them: the page gets these Framework +border. The former names `surface-0`, `bg-surface-0` and `border-bottom` are +gone from the Framework, but Docara still accepts them: the page gets these Framework classes instead, and the replacement is noted in the page plan (`deprecated_utilities`). Write the Framework names in new files. diff --git a/docs/site/content/en/start/first-component.md b/docs/site/content/en/start/first-component.md index 01bd142f..0436c224 100644 --- a/docs/site/content/en/start/first-component.md +++ b/docs/site/content/en/start/first-component.md @@ -88,7 +88,7 @@ declare(strict_types=1); $title = htmlspecialchars((string) ($props['title'] ?? ''), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); $text = htmlspecialchars((string) ($props['text'] ?? ''), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); -echo '