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

0.28 #1070

Merged
merged 34 commits into from
Nov 14, 2019
Merged

0.28 #1070

merged 34 commits into from
Nov 14, 2019

Conversation

mattlewis92
Copy link
Owner

@mattlewis92 mattlewis92 commented Aug 24, 2019

Please try it today and give me feedback before the final release 🎉

npm i angular-calendar@next

There are no more breaking changes planned for 0.28 unless something comes up while testing. The only thing the release is waiting on is to add schematics: #888

Changelog:

0.28.0

Bug Fixes

  • ensure compatibility with angular 9 and ivy (d4fdfb3), closes #1086
  • day-view: expand hour segments across the full calendar width (61aef47), closes #1083
  • week-view: prevent dropping external events on adjacent time slots (494adb5), closes #1062

Build System

  • remove annotateForClosureCompiler option (c23f54c)

Features

  • schematics: support ng add schematics (2dc2f47), closes #888
  • day-view: expose allDayEventsLabelTemplate input (224848c)
  • week-view: add current time marker (d3872b1), closes #1102
  • expose the click or keyboard event that triggers click handlers (d1a2b78), closes #962
  • day-view: merge the week and day view components (2e92b25), closes #889
  • add accessibility support (05c9a9a), closes #941
  • upgrade date-fns to v2 (d4d3873), closes #1064

BREAKING CHANGES

  • day-view: If extending the root week view component to override the template you must make the following changes:

  • Wrap the time events with <div "class='cal-events-container'">

  • Change <div class="cal-time-label-column" *ngIf="view.hourColumns.length > 0"> to <div class="cal-time-label-column" *ngIf="view.hourColumns.length > 0 && daysInWeek !== 1">

  • Add [isTimeLabel]="daysInWeek === 1" to the bottom <mwl-calendar-week-view-hour-segment> elements

  • week-view: if using a custom headerTemplate on the week view, then you must now add let-dragEnter="dragEnter" to the templates variables and (dragEnter)="dragEnter.emit({ date: day.date })" onto the mwlDroppable element.

  • the columnHeaderClicked output on the month view now exposes an object instead of just the ISO day number

Before:

columnHeaderClicked="columnHeaderClicked($event)"

After:

columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)"
  • day-view: The day and week view have now merged. For most users this should be a seamless migration, however there are some edge cases that you may need to take account for:

Any custom styles you used for the day view will need to be adjusted. The cal-day-view-theme sass mixin is now gone as all the styles are shared between the week and day view.

The eventWidth option is removed, events now fill the available width.

If using [daysInWeek]="1" on the week view, the date and title formatters for the day view will be used instead.

The week view now has a border top applied to the top of the component container, rather than the top of the day headers container.

The getDayView and getDayViewHourGrid functions have been removed from the CalendarUtils service.

The following interfaces from calendar-utils were renamed: DayViewHourSegment -> WeekViewHourSegment, DayViewHour -> WeekViewHour, DayViewEvent -> WeekViewTimeEvent

The day view scheduler demo is now based off the week view instead, please check the updated demo code for how to migrate: https://mattlewis92.github.io/angular-calendar/#/day-view-scheduler

If using a custom template for the hourSegmentTemplate, you must pass let-isTimeLabel="isTimeLabel" as a local variable and then change <div class="cal-time"> to <div class="cal-time" *ngIf="isTimeLabel">

  • the dist files are no longer annotated for usage with closure compiler.
  • date-fns v2 or higher is now required as a peer dependency

If implementing a custom adapter, the max function signature has changed to accept an array of dates, instead of an infinite argument list.

The date adapters no longer accept strings as input arguments.

@codecov-io
Copy link

codecov-io commented Aug 24, 2019

Codecov Report

Merging #1070 into master will increase coverage by 0.36%.
The diff coverage is 96.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1070      +/-   ##
==========================================
+ Coverage   95.77%   96.14%   +0.36%     
==========================================
  Files          37       39       +2     
  Lines         758      726      -32     
  Branches      127      119       -8     
==========================================
- Hits          726      698      -28     
+ Partials       32       28       -4
Impacted Files Coverage Δ
...gular-calendar/src/date-adapters/date-fns/index.ts 100% <ø> (ø) ⬆️
...ndar/src/modules/common/calendar-utils.provider.ts 100% <ø> (ø) ⬆️
...modules/common/calendar-date-formatter.provider.ts 100% <ø> (ø) ⬆️
.../common/calendar-event-title-formatter.provider.ts 100% <ø> (ø) ⬆️
...ar-calendar/src/modules/day/calendar-day.module.ts 100% <ø> (ø) ⬆️
...c/modules/common/calendar-event-title.component.ts 100% <ø> (ø) ⬆️
...-calendar/src/modules/week/calendar-week.module.ts 100% <ø> (ø) ⬆️
...modules/common/calendar-event-actions.component.ts 80% <ø> (ø) ⬆️
...ts/angular-calendar/src/modules/calendar.module.ts 100% <100%> (ø) ⬆️
...endar/src/modules/common/calendar-common.module.ts 100% <100%> (ø) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 031e4bb...783bec9. Read the comment docs.

@kyleabens
Copy link

I just installed "angular-calendar": "^0.28.0-beta.3" and "date-fns": "^2.0.1" and all is working well so far.

@mattlewis92
Copy link
Owner Author

I just installed "angular-calendar": "^0.28.0-beta.3" and "date-fns": "^2.0.1" and all is working well so far.

Awesome, thanks for testing! 😄

@JaxonWright
Copy link
Collaborator

Everything checks out for me on 0.28.0-beta.3 and date-fns 2.0.1 as well.

@kyleabens
Copy link

kyleabens commented Aug 27, 2019

The only small thing I've noticed style wise is the outline being applied to all .cal-cell and .cal-event classes when focused. Easy to override but thought I'd point it out since it wasn't there in the past.

@mattlewis92
Copy link
Owner Author

The only small thing I've noticed style wise is the outline being applied to all .cal-cell and .cal-event classes when focused. Easy to override but thought I'd point it out since it wasn't there in the past.

Yeah I noticed that as well, it's caused by the new accessibility stuff, I think it should be there by default and then you can just removed it yourself with outline: 0

Everything checks out for me on 0.28.0-beta.3 and date-fns 2.0.1 as well.

Awesome! 😄

@JaxonWright
Copy link
Collaborator

JaxonWright commented Aug 28, 2019

When I have a custom hourSegmentTemplate on the Day View, it shows two segments per row.

See screenshot here

Stackblitz

@mattlewis92
Copy link
Owner Author

mattlewis92 commented Aug 28, 2019

It sounds like you're missing *ngIf="isTimeLabel"? https://github.com/mattlewis92/angular-calendar/blob/master/projects/angular-calendar/src/modules/week/calendar-week-view-hour-segment.component.ts#L21

edit: ah, looks like the previous day view didn't have that, I'll mark it as a breaking change

@JaxonWright
Copy link
Collaborator

It sounds like you're missing *ngIf="isTimeLabel"?

That is indeed it. Definitely should be mentioned in the changelog as a breaking change.

@JaxonWright
Copy link
Collaborator

I am also getting flooded by warnings saying:

date-fns doesn't accept strings as arguments. Please use parseISO to parse strings.

As far as I can tell, I am not even using date-fns in my code. The problems seem to lie within calendar-utils.

@mattlewis92
Copy link
Owner Author

I am also getting flooded by warnings saying:

date-fns doesn't accept strings as arguments. Please use parseISO to parse strings.

As far as I can tell, I am not even using date-fns in my code. The problems seem to lie within calendar-utils.

Are you passing any strings as dates on events? e.g. start: '2019-08-29T07:24:28.844Z'

@kyleabens
Copy link

I noticed that the time slots on the left hand side on the day view are no longer clickable. This is an issue for me because If I want to schedule an event which is set to begin at the same time as another event, I am unable to click a time since the existing event takes up the width of of that day. If you would like me to make this a separate issue let me know.

@mattlewis92
Copy link
Owner Author

I noticed that the time slots on the left hand side on the day view are no longer clickable. This is an issue for me because If I want to schedule an event which is set to begin at the same time as another event, I am unable to click a time since the existing event takes up the width of of that day. If you would like me to make this a separate issue let me know.

Nice catch! Yeah please make a separate issue and I'll get that fixed up

@mattlewis92 mattlewis92 force-pushed the 0.28 branch 4 times, most recently from ca0a0f8 to d0aaa83 Compare September 4, 2019 14:03
@kyleabens
Copy link

#1083

@rabidpaul
Copy link

I left a comment on #1083 , but the changes to width calculation on the Day View are a pretty big breaking change design-wise if you have more than just a few events:
image
Could this be a toggle-able config option to continue to allow side-scrolling fixed-width events rather than percentage-width events in a fixed with day calendar view?

@mattlewis92
Copy link
Owner Author

Yeah sure, I'll see if there's a way of preserving it.

Side note: having that many events on one line isn't really a great UX, I'd highly recommend grouping similar events and then when you click the group it shows all of them in popover or something (you can implement this via a custom event template). That might solve your problem better.

@rabidpaul
Copy link

I'll admit, this is somewhat of an edge-case. Grouping is definitely a UX improvement I'll suggest for this visualization. The templating system is very elegant to use to help work around issues like this.

vandents and others added 3 commits October 19, 2019 12:00
BREAKING CHANGE: date-fns v2 or higher is now required as a peer dependency

If implementing a custom adapter, the `max` function signature has changed to accept an array of dates, instead of an infinite argument list.

The date adapters no longer accept strings as input arguments.

Closes #1064
@mattlewis92
Copy link
Owner Author

mattlewis92 commented Oct 19, 2019

Ah, so I realised that displaying events on a fixed width won't actually work with drag and drop or resizing. So I think grouping events is the way to go to solve it, I just pushed up a new demo that shows you how you can go about doing it: https://mattlewis92.github.io/angular-calendar/#/group-similar-events

Screenshot 2019-10-19 at 13 32 54

and here's what it looks like on the 0.28 branch with the day view:

Screenshot 2019-10-19 at 13 47 12

@mattlewis92
Copy link
Owner Author

I just cut the rc release for 0.28, please can people update to it and verify everything is working ok in their apps? If I don't get any issues reported then I will cut the final release a week from today 🎉

@mattlewis92 mattlewis92 merged commit 0f434e5 into master Nov 14, 2019
@mattlewis92
Copy link
Owner Author

0.28 final is out! 🎉 Thanks again to everyone that contributed to and tested this release ❤️

@mattlewis92 mattlewis92 deleted the 0.28 branch March 1, 2020 19:31
@shalini-github
Copy link

major break!!! custom hourSegmentTemplate using async events not working from this version 0.28.0 - 0.28.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment