Skip to content

Commit 08db379

Browse files
authored
fix(global-header): updated dependencies version and fixed UI issues (#275)
* fix(global-header): updated dependencies version and fixed UI issues Signed-off-by: Yi Cai <[email protected]> * yarn dedupe Signed-off-by: Yi Cai <[email protected]> --------- Signed-off-by: Yi Cai <[email protected]>
1 parent c0d5dab commit 08db379

File tree

6 files changed

+323
-85
lines changed

6 files changed

+323
-85
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-global-header': patch
3+
---
4+
5+
Updated dependencies version to match rhdh, and fixed some UI issues

workspaces/global-header/plugins/global-header/dev/index.tsx

+20-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,30 @@ import React from 'react';
1818
import { createDevApp } from '@backstage/dev-utils';
1919
import { globalHeaderPlugin } from '../src/plugin';
2020
import { ExampleComponent } from '../src/components/ExampleComponent';
21+
import { TestApiProvider } from '@backstage/test-utils';
22+
import { MockSearchApi, searchApiRef } from '@backstage/plugin-search-react';
23+
24+
const mockSearchApi = new MockSearchApi({
25+
results: [
26+
{
27+
type: 'software-catalog',
28+
document: {
29+
title: 'example search result',
30+
text: 'this is an example search result',
31+
location: 'https://example.com',
32+
},
33+
},
34+
],
35+
});
2136

2237
createDevApp()
2338
.registerPlugin(globalHeaderPlugin)
2439
.addPage({
25-
element: <ExampleComponent />,
40+
element: (
41+
<TestApiProvider apis={[[searchApiRef, mockSearchApi]]}>
42+
<ExampleComponent />
43+
</TestApiProvider>
44+
),
2645
title: 'Global Header',
2746
path: '/global-header',
2847
})

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

+13-18
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,24 @@
3333
"postpack": "backstage-cli package postpack"
3434
},
3535
"dependencies": {
36-
"@backstage/core-components": "^0.16.1",
37-
"@backstage/core-plugin-api": "^1.10.1",
38-
"@backstage/plugin-search": "1.4.21",
39-
"@backstage/plugin-search-backend": "^1.8.0",
40-
"@backstage/plugin-search-backend-module-catalog": "^0.2.6",
41-
"@backstage/plugin-search-backend-module-pg": "^0.5.39",
42-
"@backstage/plugin-search-backend-module-techdocs": "^0.3.4",
43-
"@backstage/plugin-search-common": "^1.2.16",
44-
"@backstage/plugin-search-react": "1.8.4",
45-
"@backstage/theme": "^0.6.2",
36+
"@backstage/core-components": "^0.15.1",
37+
"@backstage/core-plugin-api": "^1.10.0",
38+
"@backstage/plugin-search": "1.4.18",
39+
"@backstage/plugin-search-backend": "1.6.1",
40+
"@backstage/plugin-search-backend-module-catalog": "^0.2.4",
41+
"@backstage/plugin-search-backend-module-pg": "0.5.37",
42+
"@backstage/plugin-search-backend-module-techdocs": "^0.3.1",
43+
"@backstage/plugin-search-common": "^1.2.15",
44+
"@backstage/plugin-search-react": "^1.8.1",
45+
"@backstage/theme": "^0.6.0",
4646
"@mui/icons-material": "5.16.13",
4747
"@mui/material": "5.16.13",
4848
"@mui/styled-engine": "5.16.13",
49-
"react-dom": "16.13.1 || ^17.0.0 || ^18.0.0",
50-
"react-router-dom": "^6.3.0",
51-
"react-use": "^17.2.4"
49+
"react-dom": "18.3.1",
50+
"react-router-dom": "^6.26.2",
51+
"react-use": "^17.5.0"
5252
},
5353
"peerDependencies": {
54-
"@backstage/core-components": "0.15.1",
55-
"@backstage/core-plugin-api": "^1.10.0",
56-
"@backstage/plugin-search": "1.4.18",
57-
"@backstage/plugin-search-react": "1.8.1",
58-
"@backstage/theme": "0.6.0",
5954
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
6055
"react-router-dom": "^6.0.0"
6156
},

workspaces/global-header/plugins/global-header/src/components/HeaderDropdownComponent/MenuSection.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ const MenuSection: React.FC<MenuSectionConfig> = ({
7373
'&:hover': { background: 'transparent' },
7474
}}
7575
>
76-
<Typography
77-
variant="body2"
78-
sx={{ ml: 2, fontSize: '0.875em', color: 'text.disabled' }}
79-
>
76+
<Typography variant="body2" sx={{ pl: 2, color: 'text.disabled' }}>
8077
{sectionLabel}
8178
</Typography>
8279
<MenuItem

workspaces/global-header/plugins/global-header/src/components/SearchComponent/SearchInput.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const SearchInput = ({
4949
pt: '6px',
5050
input: { color: '#fff' },
5151
button: { color: '#fff' },
52+
'& fieldset': { border: 'none' },
5253
}}
5354
/>
5455
);

0 commit comments

Comments
 (0)