-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improved Topic Management #906
Conversation
Instead of passing the topics down through the controller we can get them in the manager and display a spinner before they are loaded. This substantially speeds up the initial page rendering for a course.
Instead of making changes to the subject we store them in a buffer and apply them when saved. Also added a nice spinner icon when saving.
looks fine. ready for code review |
}); | ||
} | ||
|
||
if(this.get('isSession')){ |
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.
suggesting else if
here.
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.
Yea. I'm not sure how to do this right. Ideally I would probably create subclass components for each of these states but that seems like over kill. I felt like else if made it harder to understand because the blocks seemed related. Maybe I should stick a return inside each block so the next one isn't reached? Or move the sets out into functions here? Or I can just go else if, but it seems harder to read that way.
Use an elseIf construct and throw an error if one of the required isCourse, isSession, or isProgramYear are not set
@stopfstedt - how does that look. I added a thrown exception as well if none of them are set. |
LGTM 👍 |
@homu r+ |
Course and Program Year now load much faster since the list of available topics is not loaded until it is needed.
Fixes #820
The topic manager now works with a buffer instead of on the subject directly. So when you pick new topics, but do not save them they don’t show up other places on the page.
I also added a spinner to icon when topics are being saved. I think we can use this on all the managers, see what you think.
Fixes #629
Review link: http://56249ae971e20a33b200001d.zoo-keeper-levels-51188.netlify.com