Skip to content

Commit 9aad360

Browse files
Merge branch 'PROD-1515_sorting' into PROD-1943_css-refactor
2 parents 80aad4d + b142765 commit 9aad360

File tree

193 files changed

+4879
-3342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+4879
-3342
lines changed

src-ts/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Routes } from 'react-router-dom'
33
import { toast, ToastContainer } from 'react-toastify'
44

55
import { Header } from './header'
6-
import { ProfileProvider, routeContext, RouteContextData } from './lib'
6+
import { routeContext, RouteContextData } from './lib'
77

88
const App: FC<{}> = () => {
99

@@ -13,7 +13,7 @@ const App: FC<{}> = () => {
1313
.map(route => getRouteElement(route))
1414

1515
return (
16-
<ProfileProvider>
16+
<>
1717
<Header />
1818
<Routes>
1919
{routeElements}
@@ -29,7 +29,7 @@ const App: FC<{}> = () => {
2929
draggable
3030
pauseOnHover
3131
/>
32-
</ProfileProvider>
32+
</>
3333
)
3434
}
3535

src-ts/config/constants.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@ export enum ToolTitle {
22
settings = 'Account Settings',
33
work = 'Work',
44
}
5+
6+
export enum FooterSocialConfig {
7+
facebook = 'https://www.facebook.com/topcoder',
8+
youtube = 'https://www.youtube.com/channel/UCFv29ANLT2FQmtvS9DRixNA',
9+
linkedin = 'https://www.linkedin.com/company/topcoder',
10+
twitter = 'https://twitter.com/topcoder',
11+
instagram = 'https://www.instagram.com/topcoder',
12+
}

src-ts/header/Header.module.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@
1919
grid-template-columns: $header-height 1fr $header-height;
2020
align-items: center;
2121
}
22-
}
22+
}
23+
24+
.subheader {
25+
width: 100%;
26+
position: relative;
27+
}

src-ts/header/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const Header: FC<{}> = () => {
1414
<ToolSelectors isWide={true} />
1515
<UtilitySelectors />
1616
</header>
17+
<div id='page-subheader-portal-el' className={styles.subheader}></div>
1718
</div>
1819
)
1920
}

src-ts/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
border-top: 1px solid $black-60;
1414
padding: $pad-lg 0;
1515
color: $tc-white;
16-
@include font-weight-medium;
16+
font-weight: $font-weight-medium;
1717
background-color: $black-100;
1818

1919
svg {

src-ts/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import classNames from 'classnames'
2-
import { FC, MutableRefObject, useContext } from 'react'
3-
import { Link, NavigateFunction, useNavigate } from 'react-router-dom'
2+
import { FC, useContext } from 'react'
3+
import { NavigateFunction, useNavigate } from 'react-router-dom'
44

55
import {
66
authUrlLogout,
@@ -37,9 +37,7 @@ const ProfilePanel: FC<ProfilePanelProps> = (props: ProfilePanelProps) => {
3737
const name: string = `${profile.firstName} ${profile.lastName?.substring(0, 1)}${!!profile.lastName ? '.' : undefined}`
3838

3939
return (
40-
<div
41-
className={styles['profile-panel']}
42-
>
40+
<div className={styles['profile-panel']}>
4341
<div className={styles['arrow-tip']}>
4442
<TooltipArrowIcon />
4543
</div>

src-ts/index.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
export { default as AppNextGen } from './App'
22
export { EnvironmentConfig } from './config'
3-
export { logInitialize, ProfileProvider, RouteProvider } from './lib'
3+
export {
4+
Breadcrumb,
5+
ChallengeMetadataName,
6+
ContactSupportModal,
7+
logInitialize,
8+
OrderContractModal,
9+
PageFooter,
10+
PrivacyPolicyModal,
11+
ProfileProvider,
12+
RouteProvider,
13+
TabsNavbar,
14+
TermsModal,
15+
workContext,
16+
WorkStatusItem,
17+
} from './lib'
418
export * from './utils'
519
export * from './tools'

src-ts/lib/avatar/Avatar.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $border-size-xl: $pad-xs;
5050
align-items: center;
5151
color: $tc-white;
5252
background-color: $blue-100;
53-
@include font-weight-medium;
53+
font-weight: $font-weight-medium;
5454

5555
&.sm {
5656
@extend .medium-subtitle;

src/components/Breadcrumb/style.scss renamed to src-ts/lib/breadcrumb/Breadcrumb.module.scss

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,56 @@
1-
@import "styles/include";
1+
@import '../styles/includes';
2+
@import '../styles/typography';
3+
4+
.breadcrumb-wrap {
5+
width: 100%;
6+
background: $black-5;
7+
}
28

39
.breadcrumb {
4-
padding: 12px 24px;
5-
background: $grey-bg;
10+
padding: $pad-md 0;
11+
max-width: $xxl-min;
12+
margin: 0 auto;
13+
@include pagePaddings;
14+
615
ol {
716
display: flex;
17+
818
> li {
919
display: inline-flex;
1020
align-items: center;
1121
padding: 0;
22+
1223
a {
1324
@extend .overline;
1425
display: block;
15-
padding: 12px;
16-
color: $gray-80;
26+
padding: $pad-md;
27+
color: $black-80;
1728
cursor: pointer;
1829
}
30+
31+
&:first-child a {
32+
padding-left: 0;
33+
}
34+
1935
&:not(:last-child)::after {
2036
content: '';
21-
display:inline-block;
22-
width: 8px;
23-
height: 8px;
37+
display: inline-block;
38+
width: $pad-sm;
39+
height: $pad-sm;
2440
border-style: solid;
25-
border-width: 1px 1px 0 0;
41+
border-width: $border-xs $border-xs 0 0;
2642
border-color: $black-60;
27-
transform:rotate(45deg)
43+
transform: rotate(45deg)
2844
}
45+
2946
&:last-child a:last-child {
3047
pointer-events: none;
3148
}
49+
3250
&:last-child,
3351
&:hover {
3452
a {
35-
color: $grey-text;
53+
color: $black-100;
3654
}
3755
}
3856
}

src-ts/lib/breadcrumb/Breadcrumb.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { FC } from 'react'
2+
import { createPortal } from 'react-dom'
3+
4+
import { BreadcrumbItem, BreadcrumbItemModel } from './breadcrumb-item'
5+
import styles from './Breadcrumb.module.scss'
6+
7+
interface BreadcrumbProps {
8+
items: Array<BreadcrumbItemModel>
9+
}
10+
11+
const Breadcrumb: FC<BreadcrumbProps> = (props: BreadcrumbProps) => {
12+
const portalRootEl: HTMLElement|null = document.getElementById('page-subheader-portal-el')
13+
14+
if (!portalRootEl) {
15+
return <></>
16+
}
17+
18+
return createPortal((
19+
<div className={styles['breadcrumb-wrap']}>
20+
<nav className={styles.breadcrumb}>
21+
<ol>
22+
{props.items.map((item, index) =>
23+
<BreadcrumbItem
24+
index={index + 1}
25+
item={item}
26+
key={index}
27+
/>
28+
)}
29+
</ol>
30+
</nav>
31+
</div>
32+
), portalRootEl)
33+
}
34+
35+
export default Breadcrumb

0 commit comments

Comments
 (0)