-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue #2526] Lazy evaluate navigation sub-items on demand #2527
base: main
Are you sure you want to change the base?
Conversation
Updates `NavigationItemImpl` constructor to accept a `Supplier` which supplies a list of children instead of passing the list its self in the constructor. This allows the work of constructing a navigation sub-tree to be deferred and only completed if the `NavigationItem#getChildren()` method is called. ---- refs adobe#2526
Updates the V1 and V2 `NavigationImpl` models to pass a `Supplier` to their respective `NavigationItemImpl` constructors. Removes `Navigation#getExportedType()` because it is exactly the same as the super method. ---- refs adobe#2526
Updates the breadcrumb model implementations by removing the `children` field from `BreadcrumbItemImpl` constructor because it is always set to empty list (i.e. breadcrumb items never have children). The `BreadcrumbItemImpl` will now pass a `Supplier` which supplies an empty list to the super class `NavigationItemImpl`. Removes `BreadcrumbImpl#getExportedType()` because it is exactly the same as the super method. ---- refs adobe#2526
…tructors Updates the V1 and V2 `LanguageNavigationImpl` models to pass a `Supplier` to their respective `LanguageNavigationItemImpl` constructors Fixes a possible NPE in `LanguageNavigationImpl` if navigation root is not set in either properties or policy. Removes `LanguageNavigationImpl#getExportedType()` because it is exactly the same as the method from the super class. Update how titles are determined for language navigation items to reuse the logic used for all other navigation items. ---- refs adobe#2526
Kudos, SonarCloud Quality Gate passed! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2527 +/- ##
============================================
+ Coverage 87.18% 87.21% +0.03%
- Complexity 2669 2673 +4
============================================
Files 233 233
Lines 7124 7118 -6
Branches 1090 1086 -4
============================================
- Hits 6211 6208 -3
+ Misses 362 361 -1
+ Partials 551 549 -2 ☔ View full report in Codecov by Sentry. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
Changes
Navigation
andNavigationItem
Sling models so that the children are passed as aSupplier
instead of theList
.This means that a full traversal and evaluation of the navigation tree does not need to be performed before the
Navigation
model returns theList<NavigationItem>
to the caller. Evaluating deeper levels of the navigation structure will occur on demand if required.