Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [0.13.0-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.12.4...v0.13.0-beta.1) (2026-01-22)


### Bug Fixes

* **plugin:** add null check for integrateMiTopBar validation ([df35e2a](https://github.com/mi-examples/pp-dev/commit/df35e2a8a265bd4a6445ec78c9ae94d4c24f105d))


### Features

* **plugin:** enhance integrateMiTopBar with selective configuration options ([cbb9a6c](https://github.com/mi-examples/pp-dev/commit/cbb9a6c59db401201fb2530f46ca47eaaa585526))

## [0.12.4-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.12.3...v0.12.4-beta.1) (2026-01-14)


Expand Down
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default config;
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `miHudLess` | boolean | `false` | Disables Metric Insights navigation bar in development |
| `integrateMiTopBar` | boolean | `false` | Integrates MI Top Bar and script into the App build (requires `miHudLess: true`) |
| `integrateMiTopBar` | boolean \| object | `false` | Integrates MI Top Bar and scripts into the App build (requires `miHudLess: true`). When `true`, enables both `addRootElement` and `addSharedComponentsScripts`. When an object, allows selective enabling: `{ addRootElement?: boolean, addSharedComponentsScripts?: boolean }` |
| `templateLess` | boolean | `false` | Disables template variable transformation |
| `enableProxyCache` | boolean | `true` | Enables caching of proxied requests |
| `proxyCacheTTL` | number | `600000` | Cache TTL in milliseconds (10 minutes) |
Expand All @@ -232,7 +232,24 @@ The `integrateMiTopBar` option allows you to integrate the Metric Insights Top B

**Important**: This option can only be enabled when `miHudLess` is set to `true`.

Example configuration:
#### Configuration Options

`integrateMiTopBar` can be configured in two ways:

**1. Boolean (Simple)**
- `true`: Enables both `addRootElement` and `addSharedComponentsScripts`
- `false`: Disables integration (default)

**2. Object (Advanced)**
- `addRootElement`: Adds `<div id="mi-react-root">` element to the body for React mounting
- `addSharedComponentsScripts`: Adds MI shared component scripts and styles:
- `/auth/info.js` - Authentication info script
- `/js/main.js` - Main MI JavaScript bundle
- `/css/main.css` - MI stylesheet

#### Examples

**Simple boolean configuration:**
```javascript
// pp-dev.config.js
module.exports = {
Expand All @@ -243,6 +260,34 @@ module.exports = {
};
```

**Advanced object configuration (selective features):**
```javascript
// pp-dev.config.js
module.exports = {
backendBaseURL: 'https://mi.company.com',
appId: 1,
miHudLess: true,
integrateMiTopBar: {
addRootElement: true, // Add root element for React
addSharedComponentsScripts: true, // Add MI scripts and styles
},
};
```

**Partial integration (scripts only, manual root element):**
```javascript
// pp-dev.config.js
module.exports = {
backendBaseURL: 'https://mi.company.com',
appId: 1,
miHudLess: true,
integrateMiTopBar: {
addRootElement: false, // Don't add root element
addSharedComponentsScripts: true, // Add MI scripts and styles
},
};
```

### v7Features Details

When enabled (`true`), this option:
Expand Down
Loading
Loading