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

Start adding full calendar #7356

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft

Start adding full calendar #7356

wants to merge 34 commits into from

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Oct 3, 2024

Closes #6953

Focusing only on the view options for now

Not sure how to handle interactions
https://fullcalendar.io/docs/date-clicking-selecting

  • docs
  • tests
  • fix re-rendering
import panel as pn

pn.extension()

cal = pn.widgets.Calendar(sizing_mode="stretch_both")

cal.add_event("2024-10-01 12:00")
cal.show()
image

@holovizbot
Copy link

This pull request has been mentioned on HoloViz Discourse. There might be relevant details there:

https://discourse.holoviz.org/t/how-to-use-jscomponent-with-fullcalendar/8306/11

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 65.75342% with 25 lines in your changes missing coverage. Please review.

Project coverage is 82.22%. Comparing base (87ef019) to head (2ce0c19).

Files with missing lines Patch % Lines
panel/widgets/calendar.py 65.27% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7356      +/-   ##
==========================================
- Coverage   82.23%   82.22%   -0.02%     
==========================================
  Files         337      338       +1     
  Lines       50634    50707      +73     
==========================================
+ Hits        41641    41692      +51     
- Misses       8993     9015      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

philippjfr and others added 24 commits October 18, 2024 16:17
* Fix type hint for oauth_guest_endpoints

* fix pre-commit
* Ensure that autoreload records modules to watch before startup

* Apply suggestions from code review

* Apply suggestions from code review

* Add test

* Fix test
* Various fixes for custom component compilation

* Apply suggestions from code review

---------

Co-authored-by: Philipp Rudiger <philipp.rudiger@blackstone.com>
* limit tabulator height with max height

* use maxHeight config

* reverse logic
* Only attempt loading ESM bundles from URL when running server

* Handle pyodide
* Add CHANGELOG for 1.5.3

* Update CHANGELOG
philippjfr and others added 7 commits October 18, 2024 16:17
Bumps [django](https://github.com/django/django) from 3.2.25 to 4.2.16.
- [Commits](django/django@3.2.25...4.2.16)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@ahuang11
Copy link
Contributor Author

Can this be compiled with the plugins dynamically loaded @philippjfr

@MarcSkovMadsen
Copy link
Collaborator

If loading plugins dynamically means loading modules dynamically then yes. See https://dmitripavlutin.com/ecmascript-modules-dynamic-import/.

@@ -0,0 +1,104 @@
import {Calendar} from "@fullcalendar/core"
Copy link
Collaborator

Choose a reason for hiding this comment

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

To be honest I don't believe this component is "core" Panel. Optimally this would be in a separate package like panel-mermaid.

It increases the complexity of the Panel project. And the download size which is important in for example Pyodide.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If loading plugins dynamically means loading modules dynamically then

I meant part of the compilation.

Is 136 KBs significant?
https://bundlephobia.com/package/@fullcalendar/core@6.1.15

Copy link
Collaborator

Choose a reason for hiding this comment

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

Its not the js I'm "worried" about. Its the panel python package.

Copy link
Member

Choose a reason for hiding this comment

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

I'm also leaning towards splitting this out. That said:

And the download size which is important in for example Pyodide

Pyodide bundles do not and will not ship with the JS bundles.

Copy link
Member

@philippjfr philippjfr Oct 21, 2024

Choose a reason for hiding this comment

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

I guess many people will get Panel directly from PyPI in pyodide. We probably should finally figure out how to split that package, so panel/dist is shipped separately. For backward compatibility we'd probably have to create a new package called panel-core and then make panel a metapackage that depends on panel-core and additionally ships panel/dist.

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

Successfully merging this pull request may close these issues.

Feature Request: CalendarMonthWidget
10 participants