Conversation
Merge develop into main
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Enhance integrateMiTopBar with Selective Configuration Options
Summary
This PR enhances the
integrateMiTopBarconfiguration option to support both boolean and object-based configuration, allowing users to selectively enableaddRootElementandaddSharedComponentsScriptsfeatures independently. Additionally, fixes a null validation bug that could cause crashes.Changes
✨ Feature Enhancement
integrateMiTopBarconfiguration: Now supports both boolean (true/false) and object-based configurationtrueenables both features,falsedisables (backward compatible){ addRootElement?: boolean, addSharedComponentsScripts?: boolean }miTopBarPluginnow accepts configuration and conditionally injects HTML elements and scripts🔧 Bug Fix
integrateMiTopBarisnulltypeof null === "object"quirk was causing crashes when accessing properties on null values📚 Documentation
🧪 Testing
Technical Details
Files Changed
src/plugin.ts- Enhanced validation logic and type definitionssrc/plugins/mi-topbar-plugin.ts- Updated plugin to accept and use configurationsrc/index.ts- Pass configuration to plugintests/unit/plugin/plugin.normalize.spec.ts- Added comprehensive test coverageREADME.md- Updated documentationStatistics
Commits
cbb9a6c- feat(plugin): enhance integrateMiTopBar with selective configuration optionse0c3175- test(plugin): add tests for integrateMiTopBar object configurationfe14999- docs(readme): update integrateMiTopBar configuration documentationdf35e2a- fix(plugin): add null check for integrateMiTopBar validationBreaking Changes
✅ None - Fully backward compatible. Existing boolean configurations continue to work as before.
Usage Examples
Simple Boolean (Backward Compatible)
Advanced Object Configuration
Partial Integration
Testing
Ready for Review ✅