Feat: made cards and developed event section (anitab-org#123)#171
Feat: made cards and developed event section (anitab-org#123)#171annabauza merged 6 commits intoanitab-org:developfrom
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.
isOver is not being used anywhere. Please remove it if not 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.
Use index as a key to the child when using map (refer the warnings in the console)
There was a problem hiding this comment.
good call with index as key.
| }} | ||
| onPress={() => {Linking.openURL(props.know_more.link)}} | ||
| > | ||
| {props.know_more.par} |
There was a problem hiding this comment.
I think it's just the words Know More > and not a full paragraph
There was a problem hiding this comment.
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.
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.
I suggest using Icons instead of images (in Badge component)
There was a problem hiding this comment.
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.
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.
This should be 16 instead of 12
src/Components/Events/Cards/index.js
Outdated
| borderRadius: 4, | ||
| overflow: 'hidden', | ||
| }, | ||
| cardContent: { |
src/Components/Events/index.js
Outdated
| style={{ | ||
| flexDirection: 'row', | ||
| flexWrap: 'wrap', | ||
| marginTop: 30, |
There was a problem hiding this comment.
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.
Make this a power of 2, maybe 16
|
@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.
Use arrow function here for consistency as it's being used everywhere else.
There was a problem hiding this comment.
there is no arrow function in other component index.js so i have also made the same .
There was a problem hiding this comment.
Ok, leave it like this only then. Sorry for this.
tichnas
left a comment
There was a problem hiding this comment.
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? |
annabauza
left a comment
There was a problem hiding this comment.
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.
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.
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.
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