Skip to content

Move Docara's own interface parts onto SIMAI Framework parts (DC-1 to DC-5) - #72

Closed
zabarov wants to merge 1 commit into
mainfrom
fix/framework-parts-dc1-dc5
Closed

zabarov wants to merge 1 commit into
mainfrom
fix/framework-parts-dc1-dc5

Conversation

@zabarov

@zabarov zabarov commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Docara's own interface parts move onto SIMAI Framework parts (DC-1 to DC-5, letter msg-2d95500c, audit docara-316-audit-study). Colours, heights, spacing and radii now come from Framework tokens and classes, and the shell CSS has no hex colours left.

What changes

  • DC-1, navigation.
    • The top bar list is sf-menu--horizontal sf-menu--navigation, and its items are Framework menu elements. The shell no longer adds its own h-d0, radius-1 or weight-5 utilities or the grey current plate.
    • The sidebar link, the label, NavigationContextAdapter and the template view model drop radius-1 and weight-5.
    • The shell buttons (reading actions, header actions, preferences side panel, previews, the install-builder stub, and the CTA, hero and promo actions) drop radius-default and radius-rounded.
    • The .docara-navigation-link colour rule (lines 1–3 of navigation.css) is deliberately left untouched. The Docara thread has the :not([aria-current]) fix on its local main (d9214c0), so this branch does not conflict with it.
  • DC-2, example frame and log.
    • The frame head and the log head are sf-tabs sf-tabs--underline sf-tabs--size-1, with sf-tabs-top-container and sf-tabs-top. The tabs are sf-button with sf-button-text-container, and the log counts are sf-tabs-count.
    • The shell's own tab indicator, its positioning script and its tab CSS are removed.
    • The script now also toggles selected.
  • DC-3, code blocks.
    • A block is a static Framework highlight: sf-highlight sf-code-surface with data-sf-highlight-chrome="static".
    • The head is sf-highlight__head. The language or file name sits in sf-highlight__language, and the wrap and copy controls are size 1/2 icon buttons, as the Framework's own head draws them.
    • The scroll area is sf-code-surface__scroll.
    • Numbered lines use sf-code-line, sf-code-line__number (the number is aria-hidden text, no longer generated content) and sf-code-line__content.
  • DC-4, tree and steps.
    • A static :::tree is sf-tree sf-tree--static (sf-tree-group, sf-tree-item, sf-tree-item-container, sf-tree-node-icon, sf-tree-item-name).
    • :::steps is sf-procedure with sf-procedure-step, --complete, --current and sf-procedure-content (C194). The Framework numbers the steps.
    • The .docara-tree* and .docara-step* CSS is removed.
  • DC-5, credit, icon and preferences.
    • The "Made with SIMAI" colours are Framework tokens.
    • An icon with a container (the landing feature icon) is sf-featured-icon, with its size, square or circle shape, tone and soft or solid look.
    • In preferences.css, the menu-view rules (.docara-preferences-menu*) are deleted. git grep finds nothing that produces them.
    • The file itself stays: the side-panel view (templates/side-panel.php) still uses its first rules.

Before and after (ui-doc, pair ui-078a4b4c6f6e, headless Chrome)

Measured on a scratch copy of ui-doc. The "before" build uses vendor docara 3.16.0 (78c3590, which equals base 68cbd1d for src and resources). The "after" build uses this branch. Tree, steps, the feature icon and numbered code are measured on a probe page built from the same page shell.

Item 1440 light 1440 dark 390 light 390 dark
Example frame head height 57 → 41 57 → 41 53 → 36 53 → 36
Example tab font Arial → Inter (16/24) Arial → Inter Arial → Inter (14/20) Arial → Inter
Selected tab line on-surface → primary (0,91,190) → 172,199,255 → primary → primary
Log head height 56 → 40 56 → 40 52 → 36 52 → 36
Log tab font Arial → Inter Arial → Inter Arial → Inter Arial → Inter
Log count (sf-tabs-count) 12px → 16px 12px → 16px 12px → 14px 12px → 14px
Code head height 57 → 40 57 → 40 53 → 36 53 → 36
Code label 16/24 → 14/20 16/24 → 14/20 14/20 → 12/16 14/20 → 12/16
Code text 14/20 → 14/20 14/20 → 14/20 12/16 → 12/16 12/16 → 12/16
Line number generated ::before → text in sf-code-line__number same same same
Top bar current item grey plate, weight 400 → no plate, weight 500, 2px primary line (Framework C30 header look), 40 tall same, line 172,199,255 in panel: 36 → 36 36 → 36
Sidebar current plate radius 8px → 0 (Framework sf-menu--documentation-tree) same same same
Sidebar current text 26,27,31; becomes 0,26,64 (on-primary-container) with d9214c0 227,226,231 → 215,226,255 same same
Credit colours #505050 / #F7F7F7 / colour-mix → --sf-on-surface-variant, --sf-surface-0 tokens same same same
Static tree row / level step 24 / 36 → 24 / 36 same 20 / 32 → 20 / 32 same
Steps marker own marker 24 → sf-procedure counter 24; current step is now the Framework tint same 20 → 20 same
Feature icon 30, radius 8, icon 14 → sf-featured-icon 32, radius 4, icon 20 same 28 → 28 same
Page errors none → none none → none none → none none → none

The sidebar text after d9214c0 was measured on a build that omitted the colour rule, which is the state that commit produces.

Tests

  • vendor/bin/pint --test passes.
  • vendor/bin/phpunit tests/Unit: OK, 1023 tests, 18772 assertions, 5 skipped.
  • tests/PortableDocumentationSiteTest.php: OK, 3 tests, 8938 assertions. The built file count moves 3309 → 3313 because pages now use Framework tabs, procedure, featured-icon and highlight parts.
  • tests/PortableSiteBuilderTest.php: 60 of 61 pass. clean_cli_install_and_build_work_without_legacy_scaffold hits its 60-second build timeout on this machine under load, and base origin/main times out the same way in a parallel run, so it is environmental.
  • InitTemplateBuildTest, NotFoundPageBuildTest and PortableAuthorWorkflowTest pass: 12 tests.
  • Tests updated to the new markup: CodeBlockOptionsTest, PortableMarkdownRendererTest, FrameworkNativeSurfaceTest, PageExampleTest, SurfaceRuntimeTest and RendererFrameworkUtilityTest.
    • RendererFrameworkUtilityTest names sf-highlight__language and sf-highlight__copy as Framework highlight runtime hooks: the script uses them and no CSS selects them.
  • Frozen byte hashes in PageBuilderTest and SharedSurfaceAdoptionTest were re-pinned. Their diffs against base contain only the intended changes: the dropped radius-default, the code head, the example tabs and the featured icon.

Still open

  • DC-3 file name (C285) is not in the Framework pair. Neither 078a4b nor the bundled 141822 has a data-title head. Docara writes the Framework head itself, in static chrome, and puts the file name in sf-highlight__language.
    • Diff, highlight, focus and prompt line marks have no Framework classes yet, so they stay Docara rules on sf-code-line.
    • Line numbers are written at build time with Framework classes, not the data-lines runtime: the runtime cannot number a file region that does not start at 1.
  • Framework defect: the head label's utility pushes the next control down. .sf-text-1/2 + * gives the next head control a 16px top margin, which made the head 48 tall. Docara resets it with .docara-code-block>.sf-highlight__head>*{margin-block:0}. Framework's own runtime head has the same markup, so this needs a Framework fix.
  • The bundled pair limits the copy button look. Docara's bundled runtime is ui-141822, which has no sf-icon-button--plain, so the copy button uses --link until the repin.
  • Sidebar current plate has square corners (radius 0). This is the Framework sf-menu--documentation-tree look, which no longer gets radius-1 from the shell. Rounding it is a Framework decision.
  • preferences.css stays for the side panel. preferences.js still sets --docara-preferences-top and --docara-preferences-end, which are now unused. That is a leftover to remove separately.
  • CHANGELOG goes under [Unreleased]. The Docara thread rebases it for 3.17.0.

🤖 Generated with Claude Code

… DC-5)

- Navigation: the top bar is sf-menu--navigation; the shell drops its own
  h-d0, radius-1, weight-5, radius-default and radius-rounded utilities and
  the grey current plate. The sidebar link colour rule is left as is for
  the separate fix on main.
- Example frame and log heads are sf-tabs (underline, size 1) with
  sf-button tabs and sf-tabs-count; the shell tab indicator is removed.
- Code blocks are a static Framework highlight: sf-highlight__head with the
  label in sf-highlight__language, size 1/2 head controls,
  sf-code-surface__scroll and sf-code-line rows with text numbers.
- Static :::tree is sf-tree--static; :::steps is sf-procedure.
- Contained icons are sf-featured-icon; the credit line takes Framework
  tokens and the shell CSS has no hex colours; the unused preferences menu
  rules are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zabarov

zabarov commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Taken into main as d3c71b2 and shipped in Docara 3.18.0 (https://github.com/simai/docara/releases/tag/v3.18.0). Closing as superseded.

@zabarov zabarov closed this Nov 20, 2026
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