-
Notifications
You must be signed in to change notification settings - Fork 190
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
Feat: made cards and developed event section (anitab-org#123) #171
Conversation
@tichnas can you review this one? |
src/Components/Events/Cards/index.js
Outdated
import { withCard } from './../../../Decorators/Card'; | ||
import Badge from './CardBadge'; | ||
|
||
const EventCard = ({ props, isOver }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isOver
is not being used anywhere. Please remove it if not required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isOver is required
<Badge text={props.location} link={require('./../../../assets/events_and_highlights/location.png')} /> | ||
<Badge text={props.timings} link={require('./../../../assets/events_and_highlights/time.png')} /> | ||
<View style={{marginTop: 32}}> | ||
{props.description.map((detail,index) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use index
as a key to the child when using map
(refer the warnings in the console)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call with index as key.
}} | ||
onPress={() => {Linking.openURL(props.know_more.link)}} | ||
> | ||
{props.know_more.par} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just the words Know More >
and not a full paragraph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
know more has to substituted by para given in content i have asked it in issue
src/Components/Events/index.js
Outdated
|
||
const events_highlight = getevents_highlights(); | ||
|
||
class Events extends React.Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Functional components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please tell me what difference it will make as class component are better as for further usage of states
src/Components/Events/Cards/index.js
Outdated
<ScaledImage width={286} source={props.highlights.source} /> | ||
<Text style={styles.title}>{props.title}</Text> | ||
<Badge text={props.date} link={require('./../../../assets/events_and_highlights/calendar.png')} /> | ||
<Badge text={props.location} link={require('./../../../assets/events_and_highlights/location.png')} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using Icons instead of images (in Badge
component)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this we have to to install a dependency can i can do that like material or others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move it to content js so each card have one source of truth regards the content. Thanks.
src/Components/Events/Cards/index.js
Outdated
color: '#103B81', | ||
fontWeight: '400', | ||
fontSize: 16, | ||
marginTop: 12, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 16
instead of 12
src/Components/Events/Cards/index.js
Outdated
borderRadius: 4, | ||
overflow: 'hidden', | ||
}, | ||
cardContent: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used anywhere
src/Components/Events/index.js
Outdated
style={{ | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
marginTop: 30, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a power of 2, maybe 32
src/Components/Events/index.js
Outdated
key={event_detail.title} | ||
props={event_detail} | ||
backgroundColor="#e7edfd" | ||
padding={12} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a power of 2, maybe 16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Bucky25 Thanks for the PR. I've requested some changes which I think you should do before an admin review.
@tichnas i have made all changes suggested by you and only one thing should i install any dependency to to make present icons but same type icons are in projects card so i did same as there and and about the functional component is is working fine |
@nandini45 do i have to use another dependency to add icons of calendar , location or images that i have done is fine |
@Bucky25 the project card one is fine |
so do i have to change any thing else in this or its fine |
|
||
const events_highlight = getevents_highlights(); | ||
|
||
function Events () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use arrow function here for consistency as it's being used everywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no arrow function in other component index.js so i have also made the same .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, leave it like this only then. Sorry for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete package-lock.json
file as it isn't required for yarn package manager (which we are using).
@nandini45 To be honest, the cards look weird to me. Can you please take a look at the deployed website (https://bucky25.github.io/anitab-org.github.io/ > Events) to make sure that this was the design that was thought initially? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Icons are too big and in wrong colors, apart from that I left several comments. Thanks
src/Components/Events/Cards/index.js
Outdated
<View style={{marginTop: 32}}> | ||
{props.description.map((detail,index) => ( | ||
<Text | ||
style={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep styles separately
<Badge text={props.location} link={require('./../../../assets/events_and_highlights/location.png')} /> | ||
<Badge text={props.timings} link={require('./../../../assets/events_and_highlights/time.png')} /> | ||
<View style={{marginTop: 32}}> | ||
{props.description.map((detail,index) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call with index as key.
src/Components/Events/Cards/index.js
Outdated
<ScaledImage width={286} source={props.highlights.source} /> | ||
<Text style={styles.title}>{props.title}</Text> | ||
<Badge text={props.date} link={require('./../../../assets/events_and_highlights/calendar.png')} /> | ||
<Badge text={props.location} link={require('./../../../assets/events_and_highlights/location.png')} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move it to content js so each card have one source of truth regards the content. Thanks.
is this the same PR as #173 ? |
no both are different issues and thanks for reviewing it |
Thanks @Bucky25 please change the label whenever it's ready to review :) |
@annabauza please review it once . |
@Bucky25 Please resolve conflicts and squash your commits !! |
Description
I have implemented the Events card Component ,taking the data from events_and_highlights.js which will reflected on the events page of the web-app.
Fixes #123
Type of Change:
Delete irrelevant options.
Code/Quality Assurance Only
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality pre-approved by mentors)
How Has This Been Tested?
I have tested the implementation and responsiveness.
here is the deployed link.
https://bucky25.github.io/anitab-org.github.io/
Checklist:
Delete irrelevant options.
Code/Quality Assurance Only