Skip to content

Help System Concept ​

Help in LaravelUi5 is written as Markdown, compiled at build time, and served as static HTML. Each document is identified by a UUID rather than by its path or its title — so you may rename it, move its module, or restructure your app, and every link to it keeps working.

A document is a directory named by a UUID, holding one Markdown file per locale and whatever assets it needs:

ui5/Orders/
├── src/OrdersModule.php
└── doc/
    └── 8f3e6b1c-0a44-4a7e-9a1f-27e5c4b90d11/
        ├── en.md          ← the authoring locale
        ├── de.md          ← optional
        └── states.png     ← flat assets, copied as they are

The doc/ directory sits beside your module's src/, not at the namespace root — which is what makes help travel with the package: a module installed into vendor/ carries its documents along, and the host compiles them from there without any configuration. The whole of production help on pragmatiqu.io is compiled out of vendor/.

Every document in doc/ is compiled ​

This is the rule that decides whether your document reaches a reader:

An installation has one help. Every module contributes every document in its doc/, and the compiled output in storage/ is the whole picture across the modules. Nothing has to name a document for it to be built.

changed in 3.0Before 3.0 a folder was compiled only when the module's root or a catalog row named its UUID, and every other folder was skipped in silence.

What a module needs is #[Help]:

php
use LaravelUi5\Sdk\Help\Attributes\Help;

#[Help(locale: 'en', uuid: 'c55ea118-751d-483f-929f-3fc30f8195cc')]
class OrdersModule extends AbstractUi5Module { /* … */ }

#[Help] goes on the module, once; a second is a build error. Its uuid is the module's root document, the module's entry in the table of contents. Its locale is the module's authoring locale: the one whose frontmatter is validated, and the only one that reaches the table of contents and the search index.

A module with documents but no #[Help] has no locale and no root. Its documents are not compiled, and the build warns.

A reference stays in its module ​

Three things can point at a document: the root of #[Help], the helpUuid() of a Customizing entry, and the Context control in a view. None of them decides whether the document is built. They are references, and the build checks them.

The Context control is how a view asks for help: wrap a region in it, give it a UUID, and the region's indicator and F1 open that document (Help Surface).

xml
<lux:Context uuid="c55ea118-751d-483f-929f-3fc30f8195cc">
    <Table id="ordersTable"><!-- … --></Table>
</lux:Context>

ui5:help reads your app's views: the files of a project in your workspace, and the views inside Component-preload.js of a package. For each literal uuid:

  • The document must exist in the same module. Otherwise the build fails and names the view and the folder it expected.
  • A document of another module is an error, even if it exists. The message names both modules. Write a document of your own and link to the other one from it.
  • The same UUID in two modules is an error that names both folders. A UUID names one document.

A bound uuid="{help_uuid}" is skipped. The value arrives at runtime from a catalog row, and that row is validated on its own.

How F1 finds a page ​

F1 always answers, in one of three ways:

  1. the nearest Context around what has focus: a region of the screen, with every Context above it shown as a breadcrumb;
  2. failing that, the root document of the running app's module;
  3. failing that, for an app without help, the table of contents.
changed in 3.0Before 3.0 F1 outside every `Context` went straight to the table of contents.

A dialog or a value help is a view, so it answers the same way: give it a Context of its own. Without one, F1 opens the root of the running app, also when the dialog comes from another module. An action has no screen, and a report renders in an iframe where F1 does not reach the shell; both are found through the table of contents and search.

A help indicator does the same for the one context it sits in, and search reaches every compiled document in its authoring locale.

Cross-links between documents are ordinary Markdown links whose target is the other document's UUID (Authoring).

What the UUID buys, and what it doesn't ​

It survives: renaming the document's title, renaming or moving the module's class, renaming the app root, restructuring your views. Nothing in the pipeline derives an identifier from a heading, a filename or a namespace.

It does not survive: moving the folder into another module's doc/ directory. A catalog row's document must live in the module that declares the row — the compiler checks that and refuses.

What help is not ​

  • It is not access-controlled. The help routes require a signed-in user and nothing else: anyone who can log in can fetch any compiled document by its UUID. Keep customer-specific figures, credentials and internal notes out of help documents.
  • It is not negotiated per user. F1 opens the locale configured installation-wide, and there is no server-side fallback from de to en — an uncompiled locale is a 404, not a substitution.
  • It is not rendered at request time. Markdown never reaches the request path. If a change is not visible, the compiler has not run (Build Pipeline).

What ships with the SDK today ​

Partners ships a root document and six documents on its relationship types, in English. The Settings and Launchpad apps ship no help yet — F1 on them opens the table of contents. Their topics are on the SDK's roadmap; the pages here describe the mechanism, not a filled corpus.

See also ​

  • Authoring: the recipe, frontmatter, links and assets
  • Build Pipeline: ui5:help, what it writes, and every message it can give you
  • Runtime: the endpoints and the storage layout
  • Help Surface: F1, the viewer, and binding help in a view