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

Merge day and week view #889

Closed
mattlewis92 opened this issue Feb 20, 2019 · 3 comments · Fixed by #1070
Closed

Merge day and week view #889

mattlewis92 opened this issue Feb 20, 2019 · 3 comments · Fixed by #1070

Comments

@mattlewis92
Copy link
Owner

I kind of just realised that with the changes in 0.26, the day view is now just a week view with [daysInWeek]="1". The day view could just become a very thin wrapper over the week view with that option set and the header hidden and it would allow a lot of code to be deleted and make maintenance a lot easier. Unless people are doing really advanced customisations it shouldn't even be breaking for most users 😄

@mattlewis92 mattlewis92 added this to the 0.28 milestone Mar 17, 2019
@JaxonWright
Copy link
Collaborator

I was just thinking about this. Would eliminate a lot of unneeded code.

mattlewis92 added a commit that referenced this issue Aug 24, 2019
BREAKING CHANGE:

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

Closes #889
@mattlewis92 mattlewis92 mentioned this issue Aug 24, 2019
mattlewis92 added a commit that referenced this issue Sep 4, 2019
BREAKING CHANGE:

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

Closes #889
mattlewis92 added a commit that referenced this issue Sep 4, 2019
BREAKING CHANGE:

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">`

Closes #889
mattlewis92 added a commit that referenced this issue Sep 4, 2019
BREAKING CHANGE:

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">`

Closes #889
mattlewis92 added a commit that referenced this issue Oct 19, 2019
BREAKING CHANGE:

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">`

Closes #889
@rosostolato
Copy link

I have an implementation of day view scheduler. How could I do it now after this merge?

My main problem is in CalendarUtils extends, I used super.getDayView(args) and there is no method near to that now.

@mattlewis92
Copy link
Owner Author

I updated the demo for that in the 0.28 branch: https://github.com/mattlewis92/angular-calendar/tree/0.28/projects/demos/app/demo-modules/day-view-scheduler

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

Successfully merging a pull request may close this issue.

3 participants