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

Added flatpickr for better date/time picker #1236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josaphatim
Copy link
Member

Added https://flatpickr.js.org/ for a beautiful and single design browser cross date picker.

Removed some styling not necessary after bootstrap 5 integration that break themes
@marclaporte
Copy link
Member

@josaphatim
Copy link
Member Author

@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 ?

@marclaporte
Copy link
Member

@jacob-js please advise.

@jacob-js
Copy link
Member

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.

@kroky
Copy link
Member

kroky commented Sep 16, 2024

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.

@jacob-js
Copy link
Member

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.

@kroky
Copy link
Member

kroky commented Sep 16, 2024

What do you mean Tiki to distribute it? How do we handle dependencies/upgrades? How do we link to the distribution package in Cypht?

@jacob-js
Copy link
Member

vue-widgets/datetime-picker is a package which can be published to npm and accessible from there. Thus, dependencies and upgrades can be managed.

@kroky
Copy link
Member

kroky commented Sep 16, 2024

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?

@jacob-js
Copy link
Member

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.

@kroky
Copy link
Member

kroky commented Sep 17, 2024

Let's do it like this then, I like the idea!

@josaphatim
Copy link
Member Author

@jacob-js Can you make this happen ?

@jacob-js
Copy link
Member

@jacob-js Can you make this happen ?

Yes, let's wait until Tiki 28 is released, then we'll make this happen.

@josaphatim
Copy link
Member Author

I think Cypht development must be independent from Tiki.
I think we can't wait a Tiki release to do something in Cypht.

@marclaporte
Copy link
Member

marclaporte commented Sep 24, 2024

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/

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.

4 participants