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

added small group generator #851

Merged
merged 3 commits into from
Oct 9, 2015
Merged

added small group generator #851

merged 3 commits into from
Oct 9, 2015

Conversation

djvoa12
Copy link
Contributor

@djvoa12 djvoa12 commented Oct 5, 2015

Added an editor that can create a single offering or multiple offerings at once (small groups).

  • Fixed AM/PM bug in time-picker
  • Switched out old learner group editor with the new one in offering-manager
  • Tests:
    • Unit
    • Integration
    • Acceptance (creating/editing single/multiple offering(s))

fixes #697
fixes #758 (may need to replace time-picker with other addons due to rigid data-binding)

@jrjohnson jrjohnson deployed to ilios-frontend-demo-pr-851 October 6, 2015 05:46 Active
@saschaben
Copy link
Member

some squiggly time issues:

first, the bug in #758 is still apparent here.
Second, the time displayed in the session list for "first offering" is showing current time rather than the earliest date/time offering available when the session is an ILM. This is a quirky issue but we should resolve how to address it.

UPDATED: that second issue occurs only when the default form value displayed for instructional hours and due date are not updated; if due date is re-set it shows the correct due date (but time shows 12am). We should address this with a separate ticket -- if there isn't one already -- regarding how to display independent learning properly (due date instead of time block, labeled as independent, etc). See #810

classNames: ['offering-editor-learnergroups'],

revisedLearnerGroups: computed('learnerGroups', {
get() {
Copy link
Member

Choose a reason for hiding this comment

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

How does having a get() method and a readonly() extension work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the latest getter for CPs. You can also have a set but we are not explicitly setting the CP so not necessary. readonly() will block all attempts to set it.

http://emberjs.com/api/classes/Ember.ComputedProperty.html

@jrjohnson
Copy link
Member

I think we're missing a piece of functionality from the learner group chooser. The selected learner groups (on the left) is a flat list with the parent group shown via the name, but not indented. This is OK except it means we're missing the ability to remove a whole set of children by clicking their parent.
Does that make sense? @saschaben can you take a look? Do we need that ability, or can users just clickety click all the child groups away?

isMultiDay: false,
filter: '',

startDate: new Date().setHours(8, 0, 0),
Copy link
Member

Choose a reason for hiding this comment

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

These properties should probably be called defaultStartDate / defaultEndDate unless they are getting set somewhere?

@saschaben
Copy link
Member

@jrjohnson The chooser is flattened knowingly: there are some usability challenges which are obviated by doing this, and it simplifies both code and patterns. I think the additional clickety click to remove selected groups rather than bulk deselecting is for now worth the upside of the change.

instructorGroups: [],
learnerGroups: [],
startDate: moment().format('MM/DD/YYYY'),
endDate: moment().add(1, 'days').format('MM/DD/YYYY')
Copy link
Member

Choose a reason for hiding this comment

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

endDate should default to one hour after start date.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default end-date should be whichever the date that comes after the default start-date (or even maybe a picked-date).

@saschaben
Copy link
Member

this is looking great. we are still a little challenged in the time-picker area as noted. a couple of things:

  1. when an offering is created, and then opened in edit mode, the time selector should display the existing start/end times for the offering. currently selectors are defaulting to 1pm.
  2. when an offering is created, if the start/end time is left at the default display (8/9), it will save as 12am regardless.

If we can't get around this problem with the current control, can we add a default blank value for time, and use form validation to force a selection?

Also, assuming we will do this on the form validation side as well, but we need to make sure we don't allow end times which precede start times.

@@ -1,7 +1,12 @@
import moment from 'moment';

/* global moment */
Copy link
Member

Choose a reason for hiding this comment

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

global moment can go away as the import statement is on line 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jrjohnson
Copy link
Member

👍

@jrjohnson
Copy link
Member

@saschaben please review and merge if ready. @djvoa12 will work separately on the remaining time / date issues, but I want to get the majority of this merged so we can be certain it will be in the release next week and so the time / date can be a more focused discrete PR.

@saschaben
Copy link
Member

@jrjohnson OK. Will eview fo primary functionality and UX less the time bug.

dartajax added a commit that referenced this pull request Oct 9, 2015
@dartajax dartajax merged commit b75ffd2 into ilios:master Oct 9, 2015
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.

Offering Time am/pm set is buggy Add the offerings Small Group Generator
4 participants