-
Notifications
You must be signed in to change notification settings - Fork 8
Ca 37 - First iteration of Contributors List view, fully functional. #14
base: develop
Are you sure you want to change the base?
Conversation
… by join data for now, will also sort by inactive and style conditionally
…, inactive contrib thumbnail at 50% opacity
…ctioning, needs styles and devTeamIcon Pedal; first iteration
Thanks @rabbitwerks, Can you resolve the merge conflict before I start the review? |
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.
These comments are mostly code style and structure related. I will try to run the app locally tomorrow and provide more feedback.
import { View, Text } from 'native-base'; | ||
import { View } from 'native-base'; | ||
import PageHeader from './pageHeader'; | ||
import ListContainer from './listContainer'; | ||
|
||
const styles = StyleSheet.create({ |
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.
Can this be destructured to
const { content } = StyleSheet.create...
} | ||
|
||
componentDidMount() { | ||
fetch('https://api-dev.coding.garden/contributors') |
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.
We decided to use async/await for all promises on the backend and enforced it with an eslint plugin. I think we should follow that on frontend as well.
fetch('https://api-dev.coding.garden/contributors') | ||
.then(res => res.json()) | ||
.then((data) => { | ||
// sortData(data); |
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.
If we are sure that this isn't being used it should be removed.
.then(res => res.json()) | ||
.then((data) => { | ||
// sortData(data); | ||
console.log(data); |
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.
No lingering console logs should remain in the code.
dataLoaded: true | ||
}); | ||
}) | ||
.catch(error => console.log(error)); |
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.
Should state be explicitly set here as part of the error handling?
countryCode, | ||
active | ||
} = this.props.contributorData; | ||
const { devTeams } = this.props; |
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 can be merged with the index destructure on line 62.
This is the first iteration of the Contributors List view.
This feature will need additional iterations in functionality and design. Profile Icon is a placeholder, no functionality. Each contrib item has a toggle-able more info section. The ovals representing the Dev Teams for each contributor will be replaced with the proper petal icon and color coding.
Right now each main cmp view has a dedicated BG Color to help show the layout of the cmps.
All of this will be refactored into a nicer looking view. The page header will need to be refactored out to a reusable cmp.