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

Progress: populate table with real student names #21609

Merged
merged 2 commits into from Apr 3, 2018

Conversation

Erin007
Copy link
Contributor

@Erin007 Erin007 commented Apr 2, 2018

Use real data about section students to populate the name column for the detail view of the progress table, following the same structure as SectionScriptProgress.
screen shot 2018-04-02 at 1 45 47 pm

Copy link
Contributor

@caleybrock caleybrock left a comment

Choose a reason for hiding this comment

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

👨‍🎓 👩‍🎓 👨‍🎓 👩‍🎓 👨‍🎓 👩‍🎓 yay students!


getColumnWidth({index}) {
return columnWidths[index];
}

render() {
const {section} = this.props;
const rowCount = section.students.length + 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

a comment here would be helpful to explain why you're adding two

const columnWidths = [150, 50, 100, 300, 50];

export default class VirtualizedDetailView extends Component {

static propTypes = {
Copy link
Contributor

Choose a reason for hiding this comment

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

not required for this PR, but once the structure of our data is totally settled, we should pull this prop shape out as a constant so we can import and use the same thing everywhere.

{(rowIndex === 1 && columnIndex === 0) && (
<span style={styles.cell}>Level Type</span>
)}
{(rowIndex >= 2 && columnIndex === 0) && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Having students[rowIndex-2] being calculated in multiple places feels like it'll be easy to make a mistake. Might be worth having a const studentIndex = rowIndex - 2; at the top so that can be used everywhere.

@Erin007 Erin007 merged commit ceebc54 into staging Apr 3, 2018
@Erin007 Erin007 deleted the real-data-to-multigrid branch July 23, 2018 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants