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

Improved Topic Management #906

Merged
merged 3 commits into from
Oct 20, 2015
Merged

Conversation

jrjohnson
Copy link
Member

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

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.
@saschaben
Copy link
Member

looks fine. ready for code review

});
}

if(this.get('isSession')){
Copy link
Member

Choose a reason for hiding this comment

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

suggesting else if here.

Copy link
Member Author

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
@jrjohnson
Copy link
Member Author

@stopfstedt - how does that look. I added a thrown exception as well if none of them are set.

@stopfstedt
Copy link
Member

LGTM 👍

@stopfstedt
Copy link
Member

@homu r+

saschaben added a commit that referenced this pull request Oct 20, 2015
@saschaben saschaben merged commit d858f2b into ilios:master Oct 20, 2015
@jrjohnson jrjohnson deleted the 820-topicloading branch October 20, 2015 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants