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
Project widget V1 #16248
Project widget V1 #16248
Conversation
I added this to a page by adding the following:
To a js file:
^This is not a super clean way to pass data in, just a way to prove we have the data setup in a way that will work with our components. This work item didn't include adding this to pages yet, but the student page and course overview pages might be ones to come. Component is 970px wide, our new width going forward, so it should work well on other pages, but was tested on the projects page. |
return ( | ||
<div style={styles.fullsize}> | ||
<div style={styles.description}>{i18n.projectStartNew()}</div> | ||
{this.renderButtons()} |
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.
I would prefer just inlining renderButtons here
return ( | ||
<div style={styles.grid}> | ||
<div style={styles.description}>{i18n.projectsContinueWorking()}</div> | ||
{this.renderProjectCardList(this.props.projectList)} |
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.
I would again recommend inlining renderProjectCardList.
{(this.props.currentGallery !== 'personal' && projectData.publishedAt) && | ||
<div style={styles.lastEdit}> | ||
{i18n.published()}: | ||
<time style={styles.bold} className="versionTimestamp" dateTime={projectData.publishedAt}> {this.getLastModifiedTimestamp(projectData.publishedAt)}</time> |
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.
nit: would prefer to break up these long lines (here and 263)
{this.props.projectList.length > 0 && | ||
<PersonalRecentProjects projectList={this.props.projectList} /> | ||
} | ||
<NewProjectButtons /> |
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.
nit: space before />
grid: { | ||
width: '100%' | ||
}, | ||
link: { |
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 we use the styling for the linkToViewAll in ContentContatiner here, so it's consistent?
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 was unused CSS, removed.
publishedToPublic: true | ||
}; | ||
|
||
const PUBLISHED_CLASS = { | ||
...defaultData, | ||
const publishedToClassPersonal = { |
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.
I'm confused about why some of these const are CAPS_SNAKE and some are lowerCamel. Should they be consistent?
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.
I was also confused. Updating to all lowerCamel.
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.
Thanks for doing all of the work to move ContentContainer out of studioHomepages!
Is the goal to be able to just have something like: <ProjectWidget/>
on the student homepage and /courses? Data for that will be the next step?
Data exists but will probably be different because not all pages are set up the same. I'll talk to poorva/tanya about if we want the V1 version on any pages, before implementing V2. |
@Bjvanminnen updated based on review. |
<FontAwesome icon={icon} style={styles.arrowIcon} onClick={this.toggleActionBox}/> | ||
if (!this.props.hideActions) { | ||
// Only the student can access the menu options when viewing their personal projects. | ||
let icon = this.state.actionsOpen ? 'chevron-up' : 'chevron-down'; |
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.
nit: could be const
Recent projects and static new project list.
Moved ContentContainer to make it more generalized.