Loading...
Loading...
Wires Fusion Help Center into app pages — creates article slug constants, adds useHelpCenter hook, and connects PageLayout props so users can open contextual help articles. USE FOR: add help button to page, wire useHelpCenter, create helpArticles constants, integrate Fusion Help in app, connect PageLayout to help center, add openHelpArticle to page. DO NOT USE FOR: authoring markdown help articles (use fusion-help-docs), direct Help REST API calls (use fusion-help-api), modifying @fra/ui shared components.
npx skill4agent add equinor/fusion-skills fusion-help-integrationuseHelpCenterPageLayoutPageLayoutopenHelpArticlefusion-help-docsfusion-help-api@fra/uiPageLayoutPageHeaderFusionHelpButton| Input | Required | Default | Description |
|---|---|---|---|
| App name | Yes | — | The app directory name under |
| Target pages | Yes | — | Which page(s) to wire up, or |
| Article slugs | Yes | Auto-derive | Slug strings for each page. If not provided, derive as |
| Include release notes | No | | Whether to also pass |
| Constants file location | No | | Path for the |
fhelpapps/{app-name}/src/**/helpArticles.ts
apps/{app-name}/src/**/fusionHelpArticles.tsuseHelpCenter{app-name}-{page-kebab}| App | Convention | Example |
|---|---|---|
| | |
| Unprefixed page name | |
| | |
src/constants/helpArticles.tsexport const FUSION_HELP_ARTICLES = {
PAGE_NAME: '{app-name}-{page-kebab}',
};SCREAMING_SNAKE_CASEPageLayout@fra/*@/*import { useHelpCenter } from '@equinor/fusion-framework-react-app/help-center';
import { PageLayout } from '@fra/ui';
import { FUSION_HELP_ARTICLES } from '@/constants/helpArticles';const { openArticle, openReleaseNotes } = useHelpCenter();{ openArticle }PageLayout<PageLayout
title="Page Title"
openHelpArticle={() => openArticle(FUSION_HELP_ARTICLES.PAGE_NAME)}
openReleaseNotes={openReleaseNotes}
>openHelpArticle() => openArticle(slug)openArticlepnpm --filter {app-name} exec tsc --noEmitpnpm --filter {app-name} exec eslint src/FUSION_HELP_ARTICLESfusion-help-docsslughelp-articles.jsonfhelpuseHelpCenterPageLayoutfusion-help-docs@fra/uiPageLayoutPageHeaderFusionHelpButton@equinor/fusion-framework-react-app@/*src/*typeuseHelpCenter