-
Notifications
You must be signed in to change notification settings - Fork 2
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
[WIP] Revisions list on course modal #2289
base: trunk
Are you sure you want to change the base?
Conversation
I'd like to iterate on this to make things cleaner and more componentized. Feedback would be much appreciated. |
Also, flow is about to yell. |
return ( | ||
<ul key={index}> | ||
<RevisionTitle>{revisionDate}</RevisionTitle> | ||
{Object.keys(items).map( |
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.
Use lodash.toPairs here, instead of iterating over the keys, so that you have easy access to both the keys and values.
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.
lodash.toPairs
throws Object(...) is not a function
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.
You will need to look at the documentation
Lodash's toEntries plays nicer with flow. Please use it. |
db883e9
to
e7e2dfd
Compare
@@ -30,17 +31,17 @@ export class Revisions extends React.Component<Props> { | |||
) | |||
|
|||
return ( | |||
<ul key={index}> | |||
<BulletedList key={index}> | |||
<RevisionTitle>{revisionDate}</RevisionTitle> |
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 needs to be in a ListItem as well, if you go this route. You should have
- Date
- enrolled: 31
- max: 32
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 still applies
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.
Right. I was updating the branch to match master, so I haven't attempted this yet. It looks like we'll need to build in indented list-item support to the list module.
I'd like something like this, maybe ## October 2, 2017
Key | Before | After
-------- | ------ | -----
enrolled | 31 | 32
max | 15 | 35
## October 1, 2017
Key | Before | After
-------- | ------ | -----
enrolled | 30 | 31
max | 30 | 15 I'd like to be able to see what changed on each day, without having to mentally cross-reference the days. I'm not tied to the table, but something like that to present all the information compactly. |
e7e2dfd
to
e5b9260
Compare
# Conflicts: # modules/gob-web/modules/course/expanded.js
Part of #946
This lists the revisions in a collapsed details/summary element.
Known Issues: