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
Conversation
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.
👨🎓 👩🎓 👨🎓 👩🎓 👨🎓 👩🎓 yay students!
|
||
getColumnWidth({index}) { | ||
return columnWidths[index]; | ||
} | ||
|
||
render() { | ||
const {section} = this.props; | ||
const rowCount = section.students.length + 2; |
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.
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 = { |
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.
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) && ( |
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.
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.
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
.