-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): branding should be applied after loading plugins
It is because plugins may customise hawtconfig, so otherwise the customisation may be ignored.
- Loading branch information
Showing
3 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
import { PageSection, PageSectionVariants, Text, TextContent } from '@patternfly/react-core' | ||
import { CodeBlock, CodeBlockCode, PageSection, PageSectionVariants, Text, TextContent } from '@patternfly/react-core' | ||
import React from 'react' | ||
|
||
export const Example2: React.FunctionComponent = () => ( | ||
<PageSection variant={PageSectionVariants.light}> | ||
<TextContent> | ||
<Text component='h1'>Example 2</Text> | ||
<Text component='p'>This is another example plugin.</Text> | ||
<Text component='p'> | ||
This is another example plugin that demonstrates how you can customise <code>hawtconfig.json</code> from an | ||
external plugin. | ||
</Text> | ||
<Text component='p'> | ||
See: <code>app/src/examples/example2/index.ts</code> | ||
</Text> | ||
<CodeBlock> | ||
<CodeBlockCode> | ||
{`configManager.configure(config => { | ||
if (!config.about) { | ||
config.about = {} | ||
} | ||
const description = config.about.description | ||
config.about.description = (description ?? '') + ' This text is added by the example 2 plugin.' | ||
if (!config.about.productInfo) { | ||
config.about.productInfo = [] | ||
} | ||
config.about.productInfo.push({ name: 'Example 2', value: '1.0.0' }) | ||
})`} | ||
</CodeBlockCode> | ||
</CodeBlock> | ||
</TextContent> | ||
</PageSection> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters