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

Calendar tweaks #1675

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Conversation

SpikedKira
Copy link
Contributor

@SpikedKira SpikedKira commented May 5, 2016

This change is Reviewable

… fixed week count. Added support for locales where the week does not start on Sunday. Added support for today and removed marking various things by data; replaced with marking them by current selection.
…nents into calendar-tweaks

Conflicts:
	addon/components/sl-calendar.js
…ndar

property names to be 'showingMonth' instead of 'currentMonth' to separate
selection functionality from view functionality. Changed 'setMonth' naming
to 'selectMonth' naming for my concise conveyance of function. Modified
sl-calendar-month to yield and removed the idea that it should know its
own name since that should come from calendar and locale. Commented out
several properties in sl-calendar-month. Modified the sl-calendar-day
click action to send the date as well as any content or data it may have.

Separated changeMonth style functions from setMonth style functions so
that one will use the other. Added a selectDate action for when days are
clicked. Sl-calendar now has a separation of selectedDate vs viewingDate.
showingMonth and showingYear are based on viewingDate. Active months and
years are now based on the selectedDate and not arbitrary data points.

Added sl-calendar as subcomponent on sl-date-picker. Added an action to
sl-date-picker to listen for the calendar date selection. Added locale
awareness to sl-date-picker. Commented old datepicker plugin
initialization code in sl-date-picker.
Added aria-role attributes to calendar.
Added tabIndex to allow the calendar to be focused.
Added focusIn, focusOut, and keyDown events.
Added focusable and hasFocus properties.
SetDate() now sets viewingDate as well.
Added a temporary style for checking focus.
Added support for focused day.

**CALENDAR DAY**
Added support for tabIndex.
Added support for aria-selected.
Added aria-role.
Added support for focus.

**DATE PICKER**
Added a temporary inline style to correctly place the popover.
Changed isOpen to hasFocus.
Added focus-in, focus-out, and key-up actions to the input helper.
Added focusIn, focusOut, and keyPress events.
Removed default format value as it should be seeded from Moment.js using
locale.
Added a losingFocus property to hold onto an Ember.run.next scheduled
event.
Added an observer for date selection.
Added checkInput() method to validate input value as it is typed.
Added parseFormats property to pre-seed with Moment.js locale strings to
validate against.
Added selectDate() method that will set the selectedDate to a passed date.
Added viewingDate property that enforces the calendar viewingDate to be
the selectedDate.
Removed jQuery event hooks.
Added updateValue() method for setting the input value if the current
input is a valid date.
Temporary addition of selection constraints in dummy app.

**CALENDAR**
Started removing unnecessary dom structure.
Added support for selection constraint.
First run of styles.

**CALENDAR DAY**
Fix for focusing the day (wai-aria support).
Added support for disabled days.

**DATE PICKER**
Initial support for selection constraint.
Removed datepicker plugin from bower.json.
Removed datepicker plugin import from build script.
Removed datepicker plugin from readme.
Removed datepicker plugin from blueprint.

**CALENDAR**
Changed month and year list generation to be nested array based.
Streamlined the logic for next and prev month marking.
Reworked the dom structure to allow easier use of TWBS styling.
First run of TWBS styles on new calendar.

**CALENDAR MONTH**
Changed tagName to TD.
Changed active className.

**CALENDAR YEAR**
Changed tagName to TD.
Changed active className.

**DATE PICKER**
Added some temporary debug statements.

**DATE RANGE PICKER**
Changed format to default to null.
Commented most of the code.
Added selectConstraint object.
Temporarily removed one of the date pickers.
** CALENDAR **
Fixed a bug that allowed restricted dates to be selected.

** DATE PICKER **
Added seeded date to demo.
Commented three unused properties.
Moved default format logic from init() to a computed property.
Added date constraint logic for typed dates.

** DATE RANGE PICKER **
Added seeded dates to the demo.
Temporarily added an init() to force constraints as dates.
Commented two unused properties.
Added two private properties.
Added locale property.
Added computed properties for the selectConstraints to be
  passed to each date-picker.
Re-added the removed second date picker to the template.
Seeded values should now be done via selectedDate properties.
selectedDate properties no longer try to parse string.

** CALENDAR **
Moved viewMode to an Enum.
Reworked changeDecade action to drop use of showingYear.
Rephrased docblocks.
Removed commented code blocks.
Removed console debug code.
Optimized render of days view by adding two observers to update
    properties on the days themselves instead of rebuilding when
    selectedDate or viewingDate changed.
Added a single function for generating calendar titles for each view.
Removed decadeEnd and decadeStart; replacing them with viewingDate.
Added tabIndex=-1 to controls.
Changed template to use sl-calendar-day block form.

** CALENDAR DAY **
Removed the need for a layout/template by using block format.
Moved application of focus to an observer.

** DATE PICKER **
Commented several unused properties.
Removed unneeded events.
Removed commented code blocks.
Changed value property to a computed based on selected.

** DATE RANGE PICKER **
Removed temporary init() event.
Removed commented code blocks.
Commented out end and start date value properties.
** CALENDAR **
Reorganized file to conform with alphabetic order.
Changed "controls" class to "calendar-controls".
Changed "datepicker-days" class to "calendar-days"
        for each viewMode.

** CALENDAR YEAR **
Added "year" class name.
** DATE PICKER **
Re-added missed sendAction.
Commented more unneeded properties.
Alphabetized methods.
Temporarily added action to demo for testing.
Integration tests.

** DATE RANGE PICKER **
Commented unneeded properties.
Added defined three missing properties.
Integration tests.
Unit tests.
Added integration test for sl-calendar-month.
Added integration test for sl-calendar-year.
Cleaned up unit test for sl-calendar-day.
Cleaned up unit test for sl-calendar-month.
Cleaned up unit test for sl-calendar-year.

** CALENDAR DAY **
Alphabetically organized properties.

** DATE PICKER **
Added autoClose property.
Changed startView to viewMode and hooked it up.
Removed commented properties (unused).
Alphabetically organized properties.
…veral tests that were failing. Reverted a commented piece of code for focus on day (it is needed).
** CALENDAR **
Removed locked state.
Removed today property.
Removed dateValuePath.
Cleaned up docblocks.
Added showControls property.
Added observer to ensure days have correct events.
Removed old contentDates property.
Added css to support events on day.
Added events to the demo app route.

** CALENDAR DAY **
Added hasEvents property.
Changed content property to events.
Added actions hash to allow events property to exist.
Added test for hasEvents.
** CALENDAR **
Fix for multiple events on a single date.
Added test for passing events.
Added test for application of events.

** DATE RANGE PICKER **
End date will now get focus when start date is selected.
Fixed action tests for calendar sub components.

** CALENDAR **
Added wai-aria keyboard navigation test.
Removed control+end and control+home navigation these
        were removed in most recent wai-aria spec.
Changed shift+pageup and shift+pagedown to use control
        key instead, in accordance with wai-aria.
Removed commented code.
Removed console logs.

** CALENDAR DAY **
Changed tabIndex to return -1 instead of null due to an
        issue where Ember is not removing the attribute.
…ents into calendar-tweaks

Conflicts:
	addon/components/sl-calendar-month.js
	addon/components/sl-calendar.js
	addon/components/sl-date-picker.js
	addon/components/sl-date-range-picker.js
	app/styles/sl-calendar.less
	bower.json
	tests/integration/components/sl-calendar-test.js
	tests/integration/components/sl-date-picker-test.js
	tests/unit/components/sl-calendar-day-test.js
	tests/unit/components/sl-calendar-month-test.js
	tests/unit/components/sl-calendar-test.js
	tests/unit/components/sl-date-picker-test.js
	tests/unit/components/sl-date-range-picker-test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants