-
Notifications
You must be signed in to change notification settings - Fork 163
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
Added flatpickr for better date/time picker #1236
base: master
Are you sure you want to change the base?
Conversation
Removed some styling not necessary after bootstrap 5 integration that break themes
02471bc
to
ad3afe4
Compare
@josaphatim Let's try to align Tiki and Cypht dependencies: |
Great! As Flatpickr is not longer maintained I think to go with https://github.com/t1m0n/air-datepicker as it is the only supporting date and time. What do you think about this ? |
@jacob-js please advise. |
Cypht can consume the same component used in Tiki. It would only require getting the bundle of the file datetime-picker.ce.js somewhere accessible so it can be installed in Cypht. |
Note that we need to distribute the package if we want to allow users to install standalone cypht. They can't randomly link to a remote server lib or download it manually. It should be bundled either as part of the dependencies (composer) or in the source itself. Since that's a vue component that requires a build process, it is better to build it externally and bundle as a package. |
If we were to use it, nothing would prevent Tiki from distributing the package. It's a Vue web component, so it doesn't depend on a Vue environment to execute. |
What do you mean Tiki to distribute it? How do we handle dependencies/upgrades? How do we link to the distribution package in Cypht? |
vue-widgets/datetime-picker is a package which can be published to npm and accessible from there. Thus, dependencies and upgrades can be managed. |
https://gitlab.com/tikiwiki/tiki/-/tree/master/src/js/vue-widgets/datetime-picker?ref_type=heads is part of a source tree of Tiki in a particular branch. I would like to avoid bundling such packages into 3rd party software like Cypht as maintaining these in the future will be tricky - e.g. Cypht has multiple branches, each depend on a particular Tiki version of the package, someone updates something in the Tiki package - they don't even know that something external depends on it, etc. If we bundle as a package, it should be composer. Cypht has no node dependencies and installing via npm is not something the current installer can do. Why don't we bundle the vuedatetimepicker lib as a composer package and make cypht rely on that + versioning? |
I don't necessarily mean to fetch the package directly from Tiki. We could extract it from Tiki, bundle it as a standalone package, and then re-inject it into Tiki via npm and into Cypht via CDN. The component itself isn't restricted to Tiki domains. In fact, this applies to everything in https://gitlab.com/tikiwiki/tiki/-/tree/master/src/js/vue-widgets. |
Let's do it like this then, I like the idea! |
@jacob-js Can you make this happen ? |
Yes, let's wait until Tiki 28 is released, then we'll make this happen. |
I think Cypht development must be independent from Tiki. |
I don't know if it's a viable option here, but here is what we used for many JS dependencies for Tiki before the new build system: https://asset-packagist.org/ |
Added https://flatpickr.js.org/ for a beautiful and single design browser cross date picker.