Skip to content

Commit 6275261

Browse files
authored
Merge pull request #8 from mi-examples/develop
Merge develop into main - Release 0.13.0-beta.1
2 parents 83f2507 + c477444 commit 6275261

8 files changed

Lines changed: 949 additions & 1657 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# [0.13.0-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.12.4...v0.13.0-beta.1) (2026-01-22)
2+
3+
4+
### Bug Fixes
5+
6+
* **plugin:** add null check for integrateMiTopBar validation ([df35e2a](https://github.com/mi-examples/pp-dev/commit/df35e2a8a265bd4a6445ec78c9ae94d4c24f105d))
7+
8+
9+
### Features
10+
11+
* **plugin:** enhance integrateMiTopBar with selective configuration options ([cbb9a6c](https://github.com/mi-examples/pp-dev/commit/cbb9a6c59db401201fb2530f46ca47eaaa585526))
12+
113
## [0.12.4-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.12.3...v0.12.4-beta.1) (2026-01-14)
214

315

README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export default config;
210210
| Option | Type | Default | Description |
211211
|--------|------|---------|-------------|
212212
| `miHudLess` | boolean | `false` | Disables Metric Insights navigation bar in development |
213-
| `integrateMiTopBar` | boolean | `false` | Integrates MI Top Bar and script into the App build (requires `miHudLess: true`) |
213+
| `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 }` |
214214
| `templateLess` | boolean | `false` | Disables template variable transformation |
215215
| `enableProxyCache` | boolean | `true` | Enables caching of proxied requests |
216216
| `proxyCacheTTL` | number | `600000` | Cache TTL in milliseconds (10 minutes) |
@@ -232,7 +232,24 @@ The `integrateMiTopBar` option allows you to integrate the Metric Insights Top B
232232

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

235-
Example configuration:
235+
#### Configuration Options
236+
237+
`integrateMiTopBar` can be configured in two ways:
238+
239+
**1. Boolean (Simple)**
240+
- `true`: Enables both `addRootElement` and `addSharedComponentsScripts`
241+
- `false`: Disables integration (default)
242+
243+
**2. Object (Advanced)**
244+
- `addRootElement`: Adds `<div id="mi-react-root">` element to the body for React mounting
245+
- `addSharedComponentsScripts`: Adds MI shared component scripts and styles:
246+
- `/auth/info.js` - Authentication info script
247+
- `/js/main.js` - Main MI JavaScript bundle
248+
- `/css/main.css` - MI stylesheet
249+
250+
#### Examples
251+
252+
**Simple boolean configuration:**
236253
```javascript
237254
// pp-dev.config.js
238255
module.exports = {
@@ -243,6 +260,34 @@ module.exports = {
243260
};
244261
```
245262

263+
**Advanced object configuration (selective features):**
264+
```javascript
265+
// pp-dev.config.js
266+
module.exports = {
267+
backendBaseURL: 'https://mi.company.com',
268+
appId: 1,
269+
miHudLess: true,
270+
integrateMiTopBar: {
271+
addRootElement: true, // Add root element for React
272+
addSharedComponentsScripts: true, // Add MI scripts and styles
273+
},
274+
};
275+
```
276+
277+
**Partial integration (scripts only, manual root element):**
278+
```javascript
279+
// pp-dev.config.js
280+
module.exports = {
281+
backendBaseURL: 'https://mi.company.com',
282+
appId: 1,
283+
miHudLess: true,
284+
integrateMiTopBar: {
285+
addRootElement: false, // Don't add root element
286+
addSharedComponentsScripts: true, // Add MI scripts and styles
287+
},
288+
};
289+
```
290+
246291
### v7Features Details
247292

248293
When enabled (`true`), this option:

0 commit comments

Comments
 (0)