fix: restore NFS header migration regressions
Restore page theming and header metadata for the migrated NFS pages so the new BUI headers preserve the same context and navigation as before. This also makes the DevTools landing tab deterministic and adds focused regression coverage for the scaffolder and TechDocs fixes. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
import {
|
||||
createFrontendPlugin,
|
||||
coreExtensionData,
|
||||
discoveryApiRef,
|
||||
fetchApiRef,
|
||||
ApiBlueprint,
|
||||
@@ -50,11 +51,34 @@ export const devToolsApi = ApiBlueprint.make({
|
||||
});
|
||||
|
||||
/** @alpha */
|
||||
export const devToolsPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/devtools',
|
||||
routeRef: rootRouteRef,
|
||||
title: 'DevTools',
|
||||
export const devToolsPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { inputs }) {
|
||||
const pages = [...inputs.pages].sort((left, right) => {
|
||||
const leftPath = left.get(coreExtensionData.routePath);
|
||||
const rightPath = right.get(coreExtensionData.routePath);
|
||||
|
||||
if (leftPath === 'info' && rightPath !== 'info') {
|
||||
return -1;
|
||||
}
|
||||
if (leftPath !== 'info' && rightPath === 'info') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
});
|
||||
|
||||
return originalFactory(
|
||||
{
|
||||
path: '/devtools',
|
||||
routeRef: rootRouteRef,
|
||||
title: 'DevTools',
|
||||
},
|
||||
{
|
||||
inputs: {
|
||||
pages,
|
||||
},
|
||||
},
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user