Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Ca 37 - First iteration of Contributors List view, fully functional. #14

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

rabbitwerks
Copy link
Member

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.

rabbitwerks and others added 24 commits March 2, 2019 23:28
… by join data for now, will also sort by inactive and style conditionally
…ctioning, needs styles and devTeamIcon Pedal; first iteration
@spiray
Copy link
Contributor

spiray commented Jun 11, 2019

Thanks @rabbitwerks, Can you resolve the merge conflict before I start the review?

Copy link
Contributor

@spiray spiray left a 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({
Copy link
Contributor

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')
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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));
Copy link
Contributor

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;
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants