Skip to content

Commit 68cb7be

Browse files
authored
fix(global-header): added some changes for integration with rhdh (#270)
1 parent 0e17490 commit 68cb7be

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# please keep this in sync with rhdh/dynamic-plugins.default.yaml
2+
dynamicPlugins:
3+
frontend:
4+
red-hat-developer-hub.backstage-plugin-global-header:
5+
mountPoints:
6+
- mountPoint: application/header
7+
importName: GlobalHeader
8+
config:
9+
layout:
10+
position: above-main-content

workspaces/global-header/plugins/global-header/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
"react-use": "^17.2.4"
5353
},
5454
"peerDependencies": {
55+
"@backstage/core-components": "0.15.1",
56+
"@backstage/core-plugin-api": "^1.10.0",
57+
"@backstage/plugin-search": "1.4.18",
58+
"@backstage/plugin-search-react": "1.8.1",
59+
"@backstage/theme": "0.6.0",
5560
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
5661
"react-router-dom": "^6.0.0"
5762
},

workspaces/global-header/plugins/global-header/src/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';
17+
18+
ClassNameGenerator.configure(componentName => {
19+
return componentName.startsWith('v5-')
20+
? componentName
21+
: `v5-${componentName}`;
22+
});
1623

1724
export { globalHeaderPlugin, GlobalHeader } from './plugin';

workspaces/global-header/plugins/global-header/src/plugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const GlobalHeader = globalHeaderPlugin.provide(
3535
createComponentExtension({
3636
name: 'GlobalHeader',
3737
component: {
38-
lazy: () => import('./components').then(m => m.GlobalHeader),
38+
lazy: () => import('./components/GlobalHeader').then(m => m.GlobalHeader),
3939
},
4040
}),
4141
);

workspaces/global-header/yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -10001,6 +10001,11 @@ __metadata:
1000110001
react-router-dom: ^6.0.0
1000210002
react-use: ^17.2.4
1000310003
peerDependencies:
10004+
"@backstage/core-components": 0.15.1
10005+
"@backstage/core-plugin-api": ^1.10.0
10006+
"@backstage/plugin-search": 1.4.18
10007+
"@backstage/plugin-search-react": 1.8.1
10008+
"@backstage/theme": 0.6.0
1000410009
react: ^16.13.1 || ^17.0.0 || ^18.0.0
1000510010
react-router-dom: ^6.0.0
1000610011
languageName: unknown

0 commit comments

Comments
 (0)