Skip to content

Commit 249e2ab

Browse files
committed
Move the banner of deprecation notice to HomePage
This PR will move the banner from Header to HomePage as it was blocking the page scrolling functionality Signed-off-by: Shiv Verma <[email protected]>
1 parent c55743a commit 249e2ab

File tree

7 files changed

+41
-42
lines changed

7 files changed

+41
-42
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.hub-banner-text{
2+
text-align: center;
3+
}

ui/src/components/HomePage/__snapshots__/HomePage.test.tsx.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
exports[`should render the home page component 1`] = `
44
"<Fragment>
5+
<Banner variant=\\"warning\\" isSticky={true}>
6+
<TextContent>
7+
<Text component=\\"h1\\" className=\\"hub-banner-text\\">
8+
Tekton Hub is deprecated and will be shutdown on January 2026, the 7th.
9+
</Text>
10+
</TextContent>
11+
</Banner>
512
<Background />
613
<PageSection>
714
<Grid hasGutter={true}>

ui/src/components/HomePage/index.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
import React from 'react';
2-
import { Grid, GridItem, PageSection } from '@patternfly/react-core';
2+
import {
3+
Banner,
4+
Grid,
5+
GridItem,
6+
PageSection,
7+
TextContent,
8+
TextVariants,
9+
Text
10+
} from '@patternfly/react-core';
311
import LeftPane from '../LeftPane';
412
import Background from '../Background';
513
import Resources from '../../containers/Resources';
6-
14+
import './HomePage.css';
715
const HomePage = () => {
816
return (
917
<>
18+
<Banner variant="warning" isSticky={true}>
19+
<TextContent>
20+
<Text component={TextVariants.h1} className="hub-banner-text">
21+
Tekton Hub is deprecated and will be shutdown on January 2026, the 7th.
22+
</Text>
23+
</TextContent>
24+
</Banner>
1025
<Background />
1126
<PageSection>
1227
<Grid hasGutter>

ui/src/containers/App/__snapshots__/App.test.tsx.snap

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,6 @@ exports[`App should render the component correctly and match the snapshot 1`] =
6464
</PageHeaderTools>
6565
</header>
6666
</PageHeader>
67-
<Banner variant=\\"warning\\" isSticky={true}>
68-
<div className=\\"pf-c-banner pf-m-warning pf-m-sticky\\">
69-
<TextContent>
70-
<div className=\\"pf-c-content\\">
71-
<Text component=\\"h1\\" className=\\"hub-background-heading\\">
72-
<h1 data-ouia-component-type=\\"PF4/Text\\" data-ouia-safe={true} data-ouia-component-id=\\"OUIA-Generated-Text-2\\" data-pf-content={true} className=\\"hub-background-heading\\">
73-
Tekton Hub is deprecated and will be shutdown on January 2026, the 7th.
74-
</h1>
75-
</Text>
76-
</div>
77-
</TextContent>
78-
</div>
79-
</Banner>
8067
<Modal variant=\\"small\\" title=\\"Search tips:\\" isOpen={false} onClose={[Function: onClose]} className=\\"\\" titleIconVariant={{...}} titleLabel=\\"\\" aria-label=\\"\\" showClose={true} aria-describedby=\\"\\" aria-labelledby=\\"\\" id={[undefined]} actions={{...}} hasNoBodyWrapper={false} appendTo={[Function: appendTo]} ouiaSafe={true}>
8168
<Portal containerInfo={{...}}>
8269
<ModalContent variant=\\"small\\" isOpen={false} onClose={[Function: onClose]} className=\\"\\" showClose={true} id={[undefined]} actions={{...}} hasNoBodyWrapper={false} boxId=\\"pf-modal-part-0\\" labelId=\\"pf-modal-part-1\\" descriptorId=\\"pf-modal-part-2\\" title=\\"Search tips:\\" titleIconVariant={{...}} titleLabel=\\"\\" aria-label=\\"\\" aria-describedby=\\"\\" aria-labelledby=\\"\\" bodyAriaLabel={[undefined]} bodyAriaRole={[undefined]} ouiaId=\\"OUIA-Generated-Modal-small-1\\" ouiaSafe={true} />
@@ -92,6 +79,19 @@ exports[`App should render the component correctly and match the snapshot 1`] =
9279
<Routes>
9380
<RenderedRoute match={{...}} routeContext={{...}}>
9481
<HomePage>
82+
<Banner variant=\\"warning\\" isSticky={true}>
83+
<div className=\\"pf-c-banner pf-m-warning pf-m-sticky\\">
84+
<TextContent>
85+
<div className=\\"pf-c-content\\">
86+
<Text component=\\"h1\\" className=\\"hub-banner-text\\">
87+
<h1 data-ouia-component-type=\\"PF4/Text\\" data-ouia-safe={true} data-ouia-component-id=\\"OUIA-Generated-Text-2\\" data-pf-content={true} className=\\"hub-banner-text\\">
88+
Tekton Hub is deprecated and will be shutdown on January 2026, the 7th.
89+
</h1>
90+
</Text>
91+
</div>
92+
</TextContent>
93+
</div>
94+
</Banner>
9595
<Background>
9696
<div className=\\"hub-background-image\\" style={{...}}>
9797
<TextContent>

ui/src/containers/Header/Header.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,3 @@
6262
.pf-c-backdrop {
6363
backdrop-filter: blur(1px);
6464
}
65-
66-
.hub-page {
67-
display: block;
68-
}

ui/src/containers/Header/__snapshots__/Header.test.tsx.snap

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,6 @@ exports[`Header should render the header component and find Search component 1`]
5656
</PageHeaderTools>
5757
</header>
5858
</PageHeader>
59-
<Banner variant=\\"warning\\" isSticky={true}>
60-
<div className=\\"pf-c-banner pf-m-warning pf-m-sticky\\">
61-
<TextContent>
62-
<div className=\\"pf-c-content\\">
63-
<Text component=\\"h1\\" className=\\"hub-background-heading\\">
64-
<h1 data-ouia-component-type=\\"PF4/Text\\" data-ouia-safe={true} data-ouia-component-id=\\"OUIA-Generated-Text-2\\" data-pf-content={true} className=\\"hub-background-heading\\">
65-
Tekton Hub is deprecated and will be shutdown on January 2026, the 7th.
66-
</h1>
67-
</Text>
68-
</div>
69-
</TextContent>
70-
</div>
71-
</Banner>
7259
<Modal variant=\\"small\\" title=\\"Search tips:\\" isOpen={false} onClose={[Function: onClose]} className=\\"\\" titleIconVariant={{...}} titleLabel=\\"\\" aria-label=\\"\\" showClose={true} aria-describedby=\\"\\" aria-labelledby=\\"\\" id={[undefined]} actions={{...}} hasNoBodyWrapper={false} appendTo={[Function: appendTo]} ouiaSafe={true}>
7360
<Portal containerInfo={{...}}>
7461
<ModalContent variant=\\"small\\" isOpen={false} onClose={[Function: onClose]} className=\\"\\" showClose={true} id={[undefined]} actions={{...}} hasNoBodyWrapper={false} boxId=\\"pf-modal-part-0\\" labelId=\\"pf-modal-part-1\\" descriptorId=\\"pf-modal-part-2\\" title=\\"Search tips:\\" titleIconVariant={{...}} titleLabel=\\"\\" aria-label=\\"\\" aria-describedby=\\"\\" aria-labelledby=\\"\\" bodyAriaLabel={[undefined]} bodyAriaRole={[undefined]} ouiaId=\\"OUIA-Generated-Modal-small-1\\" ouiaSafe={true} />

ui/src/containers/Header/index.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ import {
1616
TextListItem,
1717
Button,
1818
AlertVariant,
19-
Divider,
20-
Banner
19+
Divider
2120
} from '@patternfly/react-core';
2221
import logo from '../../assets/logo/logo.png';
2322
import { IconSize } from '@patternfly/react-icons';
@@ -100,14 +99,6 @@ const Header: React.FC = observer(() => {
10099
}
101100
headerTools={headerTools}
102101
/>
103-
<Banner variant="warning" isSticky={true}>
104-
<TextContent>
105-
<Text component={TextVariants.h1} className="hub-background-heading">
106-
Tekton Hub is deprecated and will be shutdown on January 2026, the 7th.
107-
</Text>
108-
</TextContent>
109-
</Banner>
110-
111102
<Modal
112103
variant={ModalVariant.small}
113104
title="Search tips:"

0 commit comments

Comments
 (0)