RHCLOUD-50437: Adopt Chrome global breadcrumbs API - #1167
platex-rehor-bot wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1167 +/- ##
==========================================
- Coverage 63.89% 63.85% -0.04%
==========================================
Files 149 149
Lines 5511 5525 +14
Branches 1077 1080 +3
==========================================
+ Hits 3521 3528 +7
- Misses 1688 1696 +8
+ Partials 302 301 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/ok-to-test |
|
Good catch @dominikvagner — the original commit only added the I've force-pushed a fix in
All 34 tests pass and lint is clean. Could you take another look when you get a chance? |
|
Good catch — the Fixed in 243bbd1: added All 14 RepositoriesTable tests pass (including the new breadcrumb one), and the 34 existing breadcrumb-related tests across PackagesTable, PackageDetails, and TemplateDetails still pass. Lint clean. |
|
@platex-rehor-bot |
|
@dominikvagner Thanks for the detailed report! I dug into the Chrome source and found the root cause: Chrome's Could you check whether The code pattern here matches the reference implementation from the Chrome team exactly — so the implementation itself should be correct once the flag is on. If the flag isn't enabled yet and we need working breadcrumbs in the meantime, I can restore the inline PatternFly breadcrumbs as a temporary fallback until the flag rolls out. Let me know how you'd like to proceed. |
|
@platex-rehor-bot the unleash flag should be enabled for the entire stage environment, so we should be seeing it. However good point on this new feature. Can you add feature flag check and if the FF is not enabled use the previous PF breadcrumbs, if it's enabled use the new breadcrumbs? |
|
@karelhala Good point — added a feature flag guard (
Applied to all 4 pages: RepositoriesTable, PackagesTable, PackageDetails, and TemplateDetails. All existing tests pass with the mock defaulting to |
a24d12b to
3194bb9
Compare
|
@platex-rehor-bot looks good and seems to be working now!
but there are some things, that still need changes:
|
|
Thanks for the review and the screenshot, @dominikvagner! I've addressed both points in da15b12: Duplicated 'Lightwell' entries — The breadcrumb title was Full page names — Updated all breadcrumb titles:
Also added Chrome breadcrumb registration to the Beacon and Lens pages (they were missing it entirely). All existing tests updated and passing. |
|
@platex-rehor-bot This PR was merged and it adds a new Example diff (the drop last const should be shared): + const DROP_LAST_CHROME_SEGMENT_OPTIONS = { dropLastChromeSegment: true };
useRemoteHook({
scope: 'chrome',
module: './breadcrumbs/useReplaceBreadcrumbs',
- args: appBreadcrumbsEnabled ? [breadcrumbs] : [[]],
+ args: appBreadcrumbsEnabled ? [breadcrumbs, DROP_LAST_CHROME_SEGMENT_OPTIONS] : [[]],
}); |
|
Thanks @dominikvagner — added the Updated files:
|
|
/ok-to-test |
657f8d0 to
1fb8ed7
Compare
|
/ok-to-test |
…eplaceBreadcrumbs RHCLOUD-50437 Migrate all 3 manual PatternFly Breadcrumb components to Chrome's global breadcrumb bar via useRemoteHook + useReplaceBreadcrumbs. Removes local breadcrumb JSX, cleans up unused imports, and updates existing unit tests to verify the hook integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RHCLOUD-50437 RepositoriesTable (Lightwell root page) was missing the useReplaceBreadcrumbs hook, causing stale breadcrumbs to persist when navigating back from PackagesTable or PackageDetails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RHCLOUD-50437 Gate Chrome breadcrumbs behind platform.chrome.app-breadcrumbs feature flag. When the flag is disabled, fall back to inline PatternFly Breadcrumb components for PackagesTable, PackageDetails, and TemplateDetails pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RHCLOUD-50437 Address review feedback: rename 'Lightwell' breadcrumb to 'Lightwell Repositories' to avoid duplicate entries on reload, and register Chrome breadcrumbs for Beacon and Lens pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dcrumbs RHCLOUD-50437 Use the new dropLastChromeSegment option from Chrome's breadcrumbs API to prevent duplicate 'Lightwell' entries in the breadcrumb trail. Adds the option to all useRemoteHook breadcrumb calls across Lightwell and Templates pages, and updates corresponding test assertions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1fb8ed7 to
34d0392
Compare
|
/ok-to-test |


Summary
Replace manual PatternFly
<Breadcrumb>components with Chrome's globaluseReplaceBreadcrumbshook in all 3 locations specified in the ticket:Uses
useRemoteHookfrom@scalprum/react-corewith scopechromeand module./breadcrumbs/useReplaceBreadcrumbs, following the pattern from insights-chrome#3631 and frontend-starter-app#810.Cleaned up unused PatternFly
Breadcrumb/BreadcrumbItem/Truncateimports from migrated files. RemoveduseLightwellNavigateToandparseSearchParamsfromPackageDetailswhere they were only used for breadcrumb navigation. Updated all existing breadcrumb-related unit tests.RHCLOUD-50437
Testing steps
/insights/content/templates/:uuid)/lightwell/:repoName)/lightwell/:repoName/:packageName)npm test)🤖 Generated with Claude Code