Frontmatter
| id | 8573 |
| title | Refactor Portal Learn MainContainer to use Structural Injection Pattern |
| state | Closed |
| labels | enhancementairefactoring |
| assignees | tobiu |
| createdAt | Jan 12, 2026, 3:20 AM |
| updatedAt | Jan 12, 2026, 8:08 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8573 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 12, 2026, 3:28 AM |
Refactor Portal Learn MainContainer to use Structural Injection Pattern

tobiu
Jan 12, 2026, 3:28 AM
Input from Gemini 3 Pro:
✦ Refactoring complete.
- Updated
Learn.MainContainerto use the Structural Injection Pattern.- Fixed a bug in
Shared.ContainerandPageContainerwherebeforeSetItemslogic was overwriting references with object keys (e.g.,sectionsvspage-sections-container). Renamed keys to match references.Closing as completed.
tobiu closed this issue on Jan 12, 2026, 3:28 AM
tobiu assigned to @tobiu on Jan 12, 2026, 8:08 AM
Portal.view.learn.MainContainerextendsPortal.view.shared.content.Containerbut still uses the old configuration pattern (definingcontentComponentas a top-level config).Since
Shared.Containerhas been refactored to use the Structural Injection Pattern (viamergeFromandpageContainerConfig_),Learn.MainContainermust be updated to conform to this new API.Changes:
contentComponentconfig.pageContainerConfigto inject theContentComponent.treeConfig) are handled if needed (default is null, which is fine here if not used, or if used it should be configured).Learnsection likely uses the tree.Current Code:
class MainContainer extends SharedContainer { static config = { // ... contentComponent: ContentComponent, // ... } }New Code:
class MainContainer extends SharedContainer { static config = { // ... pageContainerConfig: { contentConfig: { module: ContentComponent } }, // ... } }