Closed lan0 closed 3 years ago
Trying to port my older code to this branch and I bumped into a problem that according to the upgrade guide the agendaWeek
and agendaDay
moved to timeGrid
plugin. While this plugin imports @fullcalendar/daygrid
, it does not import @fullcalendar/timegrid
.
I don't know whether it is the intention of this addon to provide all the plugins(?) I fixed the problem in my code by adding:
// package.json
...
"devDependencies": {
"@fullcalendar/timegrid": "~4.3.0",
}
...
// controller.js
import timeGridPlugin from "@fullcalendar/timegrid";
export default Controller.extend({
init() {
this._super(...arguments);
this.plugins = [timeGridPlugin];
}
});
{{full-calendar plugins=plugins}}
In case anyone else bumps into this.
@MichalBryxi you're right, you have to add the plugins you want to use as dependencies yourself.
Did timegrid work for you without importing any css? I implemented a plugins
option for this.
In the meantime I bumped my app to ember@3.15
and went with native classes & angle bracket components. I am not sure if that is related at all, but after the upgrade I also had to add a @fullcalendar/moment
plugin as described in the docs.
@lan0 I can see that you have the hints how to work with the plugins in the readme and maybe it's just me migrating from <v4 and expecting things to just work.
The calendar looks funny without the imported CSS:
When I tried to blindly copy-paste the example config and including my option:
emberFullCalendar: {
plugins: ["core", "daygrid", "list", "timegrid"]
}
I get:
❯ ember server
Cannot find module '@fullcalendar/list/package.json' from 'ui/node_modules/ember-fullcalendar'
Descriptive error message would be nice.
When I fixed all those errors:
Looks good to me. Great work!
@lan0 Any updates here ?
Perhaps the changes can be applied to the main branch?
@lan0 Good work you have there. Some of the views have also been renamed. Perhaps we can update.
month renamed to dayGridMonth basicWeek renamed to dayGridWeek basicDay renamed to dayGridDay agendaWeek renamed to timeGridWeek agendaDay renamed to timeGridDay
🦗 @lan0 ?
The view names are passed in from the app code, no changes needed in the addon.
Sorry. I should have been more specific: Anything blocks merging this? Since @lasantha57 approved, CI is green can someone just hit the "merge" button? @lan0 ?
I don't have write access to this repo so I can't merge, sorry :(
No advancements on the the PR actually being merged? Would love to use the upgraded version...
Hi everyone, sorry for not merging this sooner. Would anyone be willing to update it to 4.4.1 so we're on the latest 4.x version of FC?
@lan0 I've given you write access to the repo. Can you please tag it as a 2.x release? Let me know your NPM info and I can give you publishing access there as well.
Thank you @jamesdixon.
I've bumped the FC version, merged the PR, tagged a new 2.0.0 release and created an account on npm with the same username.
@lan0 thanks! Invite to NPM sent.
Appreciate your help with this
This updates FullCalendar and Scheduler to v4.2.0.
The list of options and events is updated and should be current.
ember-auto-import
is included to import FullCalendar ES6 packages.A config option is added to import CSS files of the FullCalendar plugins.
To update options on the calendar object,
Calendar::mutateOptions()
is used like in the React component (Thanks @jir-f).The test
it supports changes in resources array
is currently getting skipped, I think that the resource plugin doesn't work correctly in the test...