Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile Detail View UI #753

Merged
merged 27 commits into from
Apr 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f8cc6d0
Merge branch 'develop' of https://github.com/Meghana-12/Ignitus-clien…
meghanacosmos Apr 8, 2020
6e17eeb
Merge branch 'develop' of https://github.com/Ignitus/Ignitus-client i…
meghanacosmos Apr 8, 2020
87be670
Added Profile View UI
meghanacosmos Apr 8, 2020
c35056d
removed unused import
meghanacosmos Apr 8, 2020
49c57db
Update profileDetailView.tsx
meghanacosmos Apr 8, 2020
d628a49
Update profileDetailView.tsx
meghanacosmos Apr 8, 2020
df9e8bb
Merge branch 'profileUI' of /Users/varanasimeghana/Project/Ignitus-cl…
meghanacosmos Apr 8, 2020
e941fd7
did the changes requseted
meghanacosmos Apr 8, 2020
d783155
Merge branch 'develop' into profileUI
divyanshu-rawat Apr 10, 2020
92b1b67
Merge branch 'develop' into profileUI
divyanshu-rawat Apr 10, 2020
b76d357
push test.
divyanshu-rawat Apr 10, 2020
034ff8e
Reverting changes 🔨
divyanshu-rawat Apr 10, 2020
6c44c3f
added more components
meghanacosmos Apr 17, 2020
07e3398
removed unused imports
meghanacosmos Apr 17, 2020
9c7a911
Update src/ignitus-Profile/ignitus-StudentProfile/Components/profileD…
divyanshu-rawat Apr 18, 2020
26c39bd
Refactoring 🔨
divyanshu-rawat Apr 18, 2020
f1356c8
Merge branch 'develop' into profileUI
divyanshu-rawat Apr 18, 2020
ec11e20
Refactoring 🎯
divyanshu-rawat Apr 18, 2020
1ba1ec1
Refactoring 🎯
divyanshu-rawat Apr 18, 2020
3a86c9b
Refactoring 🔨
divyanshu-rawat Apr 18, 2020
7507212
Contribution section refactoring 🔨
divyanshu-rawat Apr 18, 2020
10ce4e9
Refactoring 🔨
divyanshu-rawat Apr 18, 2020
4396810
Further refactoring & cleanup 🎯
divyanshu-rawat Apr 18, 2020
19875ce
Refactoring 🎯
divyanshu-rawat Apr 18, 2020
6db2dfe
Final cleanup 👋
divyanshu-rawat Apr 18, 2020
703d0f0
Minor Fixes 🎯
divyanshu-rawat Apr 18, 2020
c8b96d5
DeepScan fixes 🔨
divyanshu-rawat Apr 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
269 changes: 73 additions & 196 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions src/ignitus-AboutPage/ignitus-Team/Components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ import React, {useEffect} from 'react';
import {withErrorBoundary} from '../../../ignitus-Shared/ignitus-ErrorHandlingComponents/errorBoundary';
import {TeamPropType, GitHubDataType} from '../types';
import * as S from '../Styles';
import {AppIcon} from '../../../ignitus-Shared/types/iconsTypes/iconEnums';

const PureTeam = ({contributors}: any) => (
<S.Section>
<S.GithubContributorsContainer>
<S.Container>
<S.TitleWrapper>
<S.GithubContributorsTitle>
<S.Plus />
<S.Title>
<S.Icon name={AppIcon.PlusIcon} />
{contributors.length} Contributors
</S.GithubContributorsTitle>
</S.Title>
<S.StyledParagraph>
This project was made possible by these contributors. 🎉 🎨
</S.StyledParagraph>
</S.TitleWrapper>
<S.GithubContributors>
<S.ContributorsWrapper>
<S.Contributors>{contributors}</S.Contributors>
<S.GithubContributorsLink href="https://github.com/Ignitus/Ignitus-client/graphs/contributors">
View All <S.Chevron />
</S.GithubContributorsLink>
</S.GithubContributors>
</S.GithubContributorsContainer>
<S.Link href="https://github.com/Ignitus/Ignitus-client/graphs/contributors">
View All <S.Icon name={AppIcon.KeyBoardArrowDown} />
</S.Link>
</S.ContributorsWrapper>
</S.Container>
</S.Section>
);

Expand All @@ -37,13 +38,11 @@ export const Team = withErrorBoundary(
}, []);

if (isFetching) {
return (
<S.Loader />
);
return <S.Loader />;
}

const contributors = presets.map((item: GitHubDataType) => (
<S.Link
<S.AvatarLink
key={item.id}
target="_blank"
rel="noopener noreferrer"
Expand All @@ -54,7 +53,7 @@ export const Team = withErrorBoundary(
width="100%"
alt={`avatar ${item.login}`}
/>
</S.Link>
</S.AvatarLink>
));

return <PureTeam contributors={contributors} />;
Expand Down
57 changes: 22 additions & 35 deletions src/ignitus-AboutPage/ignitus-Team/Styles/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import styled from '@emotion/styled';
import * as T from '../../../ignitus-Shared/ignitus-DesignSystem/shared';
import * as C from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/colors';
import PlusIcon from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Assets/ignitus-Icons/plusIcon/plusIcon';
import KeyBoardArrowDown from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Assets/ignitus-Icons/keyBoardArrowDown';

import {Paragraph} from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/typography';
import {Loading} from '../../../ignitus-Shared/ignitus-Utilities/Components/loader';
import {Normal} from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/fonts';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A space is required after '{' object-curly-spacing
A space is required before '}' object-curly-spacing

import {default as I} from '../../../ignitus-Shared/ignitus-Utilities/Components/icon';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A space is required after '{' object-curly-spacing
A space is required before '}' object-curly-spacing
Use default import syntax to import 'I' import/no-named-default


import * as T from '../../../ignitus-Shared/ignitus-DesignSystem/shared';
import * as C from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/colors';

export const GithubContributorsContainer = styled(T.Container)`
export const Container = styled(T.Container)`
display: flex;
flex-wrap: wrap;
align-items: center;
Expand All @@ -17,31 +19,22 @@ export const GithubContributorsContainer = styled(T.Container)`

export const TitleWrapper = styled(T.flexibleColDiv)``;
export const Section = styled(T.flexibleColDiv)``;

export const GithubContributorsTitle = styled(T.Title)`
i {
font-size: 1.2rem;
margin-right: 3px;
}
`;

export const GithubContributors = styled.div`
export const Title = styled(T.Title)``;
export const ContributorsWrapper = styled.div`
max-width: 80rem;
margin-top: 2rem;
width: 100%;
`;

export const Contributors = styled.div`
display: flex;
flex-wrap: wrap;
justify-content: center;
`;

export const StyledParagraph = styled(Paragraph)`
text-align: center;
`;

export const Link = styled(T.Link)`
export const AvatarLink = styled(T.Link)`
width: 7.5rem;
background: none;
margin: 10px;
Expand All @@ -54,24 +47,23 @@ export const Link = styled(T.Link)`
top: 3px;
width: calc(8rem - 10px);
height: calc(8rem - 10px);
border: 2px solid #fff;
border: 2px solid ${C.White};
border-radius: 50%;
box-sizing: unset;
}
&:hover {
img {
border-radius: 50%;
border: 4px solid #fff;
box-shadow: 0 0 20px #000066;
border: 4px solid ${C.White};
box-shadow: 0 0 20px ${C.IgnitusBlue};
opacity: 1;
}
}
`;

export const Avatar = styled(T.Avatar)`
border-radius: 50%;
border: 4px solid #000066;
box-shadow: 0 0 0 #000066;
border: 4px solid ${C.IgnitusBlue};
box-shadow: 0 0 0 ${C.IgnitusBlue};
transition: border 0.5s, box-shadow 0.5s;
opacity: 0.9;
`;
Expand All @@ -83,20 +75,15 @@ export const Loader = styled(Loading)`
}
`;

export const GithubContributorsLink = styled(T.Link)`
display: block;
padding: 0.5rem 3rem;
font-weight: 300;
text-align: right;
export const Link = styled(T.Link)`
display: flex;
justify-content: flex-end;
align-items: center;
padding: 2rem;
font-weight: ${Normal};
color: ${C.IgnitusBlue};
`;

export const Plus = styled(PlusIcon)`
export const Icon = styled(I)`
height: 1.2rem;
fill: ${C.IgnitusBlue};
`;

export const Chevron = styled(KeyBoardArrowDown)`
height: 1.5rem;
fill: ${C.IgnitusBlue};
`;
1 change: 0 additions & 1 deletion src/ignitus-Dashboard/ignitus-StudentDashboard/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from '@emotion/styled';
import {BootStrapSection} from '../../ignitus-Shared/ignitus-DesignSystem/shared';
import { White } from '../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/colors';

export const Container = styled.div`
Expand Down
11 changes: 8 additions & 3 deletions src/ignitus-HomePage/ignitus-Testimonial/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import styled from '@emotion/styled';
import {maximumWidthQuery} from '../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/media';
import {Heading2} from '../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/typography';
import {IgnitusBlue} from '../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/colors';
import {flexibleRowDiv, flexibleColDiv} from '../../ignitus-Shared/ignitus-DesignSystem/shared';
import {
flexibleRowDiv,
flexibleColDiv,
} from '../../ignitus-Shared/ignitus-DesignSystem/shared';
import {
MD,
SemiBold,
Expand Down Expand Up @@ -30,14 +33,16 @@ export const Carousel = styled(flexibleColDiv)`
export const Text = styled.div`
&::before {
color: ${IgnitusBlue};
content: '\f10d';
content: '❝';
font-size: 1.5rem;
display: inline-block;
font-family: 'FontAwesome';
vertical-align: top;
}
::after {
color: ${IgnitusBlue};
content: '\f10e';
content: '❞';
font-size: 1.5rem;
display: inline-block;
font-family: 'FontAwesome';
vertical-align: bottom;
Expand Down
160 changes: 160 additions & 0 deletions src/ignitus-Profile/ignitus-StudentProfile/Components/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import React, {Fragment} from 'react';
import * as P from '../styles';
import {AppIcon} from '../../../ignitus-Shared/types/iconsTypes/iconEnums';
import {
ButtonBottomRight,
RoundedButton,
} from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import {
AboutProps,
EducationProps,
HeadingProps,
RecommendationsProps,
} from '../types';
import {Paragraph} from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/typography';
import {GreySecondaryText, Black} from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/colors';

export const StudentProfile = () => (
<P.ParentContainer>
<P.TopSection>
<ButtonBottomRight size="large" category="primary">
{' '}
Edit Profile
</ButtonBottomRight>
</P.TopSection>
<P.MiddleSection>
<P.ElementContainer>
<About content="Well-versed in over a dozen literary genres and can teach to any range of students. Adept at creating a lesson plan that engages students helping students to see the beauty in literature and encouraging students to read on their own. Specializes in high school and junior college level classes." />
</P.ElementContainer>

<P.ElementContainer>
<Education
university="Graham Junior College"
address="New Parkland,CA"
batch="2015 – 2019"
/>
</P.ElementContainer>

<P.ElementContainer>
<Heading title="Research Fields" icon={AppIcon.LocalLibraryIcon} />
<P.Content>
<RoundedButton size="medium" category="grey">
Psycholinguistics{' '}
</RoundedButton>
<RoundedButton size="medium" category="grey">
Modernist Literature{' '}
</RoundedButton>
</P.Content>
</P.ElementContainer>

<P.ElementContainer>
<Heading title="Publications" icon={AppIcon.LibraryBooksIcon} />
<P.Content>
<Heading
title="Shakespeare and Elizabethan Poetry: A Study of His Earlier Work in Relation to the Poetry of the Time."
icon={AppIcon.PdfIcon}
fontStyle="paragraph"
/>
<Heading
title="Practice in a second language: Perspectives from applied linguistics and cognitive psychology."
icon={AppIcon.PdfIcon}
fontStyle="paragraph"
/>
</P.Content>
</P.ElementContainer>

<P.ElementContainer>
<Heading title="Contributions" icon={AppIcon.ContributionIcon} />
<P.Content>
<P.ContributionsWrapper>
<Heading
title="5 Articles"
icon={AppIcon.LibraryBooksIcon}
fontStyle="paragraph"
/>
<Heading
title="5 Polls"
icon={AppIcon.PollIcon}
fontStyle="paragraph"
/>
<Heading
title="2 Publications"
icon={AppIcon.PdfIcon}
fontStyle="paragraph"
/>
<Heading
title="3 Videos"
icon={AppIcon.VideoLibIcon}
fontStyle="paragraph"
/>
</P.ContributionsWrapper>
</P.Content>
</P.ElementContainer>

<RecommendationsSection
name="Nicholas Young"
designation="Professor"
date="December 19, 2018"
experience="I worked with Sophia in a research paper, for 2 years. She has the ability to understand toughest things effortlessly that skill often takes time to develop, but it seemed to come perfectly naturally to her. It's my privilege to recommend her even I found myself lucky that I got a chance to be in touch with Sophia."
/>
</P.MiddleSection>
<P.BottomSection>
<RoundedButton size="medium" category="grey">
Download as PDF
</RoundedButton>
</P.BottomSection>
</P.ParentContainer>
);

const Heading = ({title, icon, fontStyle}: HeadingProps) => (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing error: Unexpected token :

<P.TitleWrapper>
<P.Icon name={icon} />
<P.Title fontStyle={fontStyle}>{title}</P.Title>
</P.TitleWrapper>
);

const About = ({content}: AboutProps) => (
<Fragment>
<Heading title="About" icon={AppIcon.InfoIcon} />
<P.Content>
<Paragraph color={GreySecondaryText}>{content}</Paragraph>
</P.Content>
</Fragment>
);

const Education = ({university, address, batch}: EducationProps) => (
<Fragment>
<Heading title="Education" icon={AppIcon.GraduationCapIcon} />
<P.Content>
<P.University color={Black}>{university}</P.University>
<P.Address>{address}</P.Address>
<P.Date>{batch}</P.Date>
</P.Content>
</Fragment>
);

const RecommendationsSection = ({
name,
designation,
date,
experience,
}: RecommendationsProps) => (
<P.ElementContainer>
<Heading title="Recommendations" icon={AppIcon.StarCircleIcon} />
<P.Content>
<P.RecommendationsRow>
<P.LeftRow>
<P.Avatar src="https://storage.googleapis.com/ignitus_assets/ig-avatars/eugene.png" />
<div>
<P.Name>{name}</P.Name>
<P.Designation>{designation}</P.Designation>
<P.Date>{date}</P.Date>
</div>
</P.LeftRow>
<P.RightRow>
<Paragraph color={GreySecondaryText}>{experience}</Paragraph>
</P.RightRow>
</P.RecommendationsRow>
</P.Content>
</P.ElementContainer>
);
Loading