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

Add backend calendar controller #1313

Draft
wants to merge 8 commits into
base: wip/calendar-widget
Choose a base branch
from

Conversation

damsfx
Copy link
Contributor

@damsfx damsfx commented Feb 20, 2025

Original PR #970

FullCalendar docs

  • update to fullcalendar v6.1.15
  • add all available locales
  • make use of package.json

Notes :

  • firstDay can be set by fullcalendar according to his configured locale see docs but it doesn't seems to work in our case

CalendarController

  • Config :
    • add widget theme color for buttons (default, primary or secondary)
    • add widget initial view
    • add widget first day of week
    • add model attribute for all day event

damsfx and others added 4 commits February 20, 2025 00:26
-add widget initial view config
-add widget first day of week config
-add model attribute config for all day event
@LukeTowers LukeTowers added the enhancement PRs that implement a new feature or substantial change label Feb 20, 2025
$this->recordEnd,
];

// $this->validateModel();
Copy link
Member

Choose a reason for hiding this comment

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

Why is this commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to add it based on the ListController but I get an error.
Need to take a closer look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LukeTowers If I try to validate the model (as in Lists widget), then this error in throw :
Typed property Backend\Widgets\Calendar::$model must not be accessed before initialization.

Same if I try to add model to the fillFromConfig()method in plugin initialization.

@LukeTowers
Copy link
Member

@damsfx can you take a stab at pulling and compiling the assets with vite so that they're pulled in with package.json rather than including the vendor assets in the code directly? We're trying to move away from including the raw vendor assets as the source of truth (although we'd still be committing the compiled results and including those), it's mostly just to make it easier to update the dependencies in the future. Let me know if you need any help with that.

- remove unused files
- remove comments
@damsfx
Copy link
Contributor Author

damsfx commented Feb 21, 2025

I wouldn't mind a little help on this one.
I don't have much experience with Vite, I'm just starting to integrate it into my own plugins/themes.

- add calendar less file to ServiceProvider
- use fullcalendar css variables for theming
- add option to chosse calendar theme for buttons style base on Winter's ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that implement a new feature or substantial change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants