11import { useMemo , useState , useEffect , createRef } from 'react' ;
22import type { FC , ReactElement , JSXElementConstructor , MouseEvent } from 'react' ;
33import type { TabProps , TabContentProps } from '@patternfly/react-core' ;
4- import { Tabs , Tab , TabTitleText , TabContent , PageSection } from '@patternfly/react-core' ;
4+ import {
5+ Tabs ,
6+ Tab ,
7+ TabTitleText ,
8+ TabContent ,
9+ PageSection ,
10+ Sidebar ,
11+ SidebarContent ,
12+ SidebarPanel ,
13+ } from '@patternfly/react-core' ;
514import { useTranslation } from 'react-i18next' ;
615import { useParams , useNavigate } from 'react-router' ;
716import {
@@ -19,14 +28,14 @@ import { useQueryParams } from '@console/shared/src/hooks/useQueryParams';
1928import { orderExtensionBasedOnInsertBeforeAndAfter } from '@console/shared/src/utils/order-extensions' ;
2029import { isModifiedEvent } from '@console/shared/src/utils/utils' ;
2130import { USER_PREFERENCES_BASE_URL } from './const' ;
31+ import './UserPreferencePage.scss' ;
2232import type {
2333 UserPreferenceTabGroup ,
2434 ResolvedUserPreferenceItem ,
2535 ResolvedUserPreferenceGroup ,
2636} from './types' ;
2737import UserPreferenceForm from './UserPreferenceForm' ;
2838import { getUserPreferenceGroups } from './utils/getUserPreferenceGroups' ;
29- import './UserPreferencePage.scss' ;
3039
3140const UserPreferencePage : FC = ( ) => {
3241 // resources and calls to hooks
@@ -78,6 +87,7 @@ const UserPreferencePage: FC = () => {
7887 ) ;
7988 acc [ 1 ] . push (
8089 < TabContent
90+ className = "pf-v6-u-w-75-on-lg pf-v6-u-w-50-on-xl"
8191 key = { id }
8292 eventKey = { id }
8393 id = { id }
@@ -117,7 +127,7 @@ const UserPreferencePage: FC = () => {
117127 } ;
118128 const activeTab = sortedUserPreferenceGroups . find ( ( group ) => group . id === activeTabId ) ?. label ;
119129 return (
120- < div className = "co-user-preference-page" >
130+ < >
121131 < DocumentTitle >
122132 { activeTab
123133 ? t ( 'console-app~User Preferences {{activeTab}}' , { activeTab } )
@@ -131,8 +141,8 @@ const UserPreferencePage: FC = () => {
131141 />
132142 < PageSection >
133143 { userPreferenceItemResolved ? (
134- < div className = "co-user-preference-page-content" >
135- < div className = "co-user-preference-page-content__tabs " >
144+ < Sidebar hasGutter >
145+ < SidebarPanel variant = "sticky" className = "co-user-preferences__sidebar-panel " >
136146 < Tabs
137147 activeKey = { activeTabId }
138148 onSelect = { handleTabClick }
@@ -142,17 +152,17 @@ const UserPreferencePage: FC = () => {
142152 >
143153 { userPreferenceTabs }
144154 </ Tabs >
145- </ div >
146- < div className = "co-user-preference-page-content__tab-content" >
155+ </ SidebarPanel >
156+ < SidebarContent >
147157 { userPreferenceTabContents }
148158 { spotlight && spotlightElement && < Spotlight selector = { spotlight } interactive /> }
149- </ div >
150- </ div >
159+ </ SidebarContent >
160+ </ Sidebar >
151161 ) : (
152162 < LoadingBox />
153163 ) }
154164 </ PageSection >
155- </ div >
165+ </ >
156166 ) ;
157167} ;
158168
0 commit comments