tech-systems / panes

🎉📱 Create dynamic modals, cards, panes for your applications in few steps. One instance – Thousands solutions. Any framework and free.
https://panejs.com
MIT License
687 stars 40 forks source link

[FEAT] better way to add new features without increasing the size of the core of the library #174

Closed CodeWithOz closed 2 years ago

CodeWithOz commented 2 years ago

What are you trying to add to Cupertino-Pane?

Describe your feature request detailed I want to start a discussion on how extend the functionality of the package without increasing the size of the bundle. When I first started using the package in October 2020 (version 1.1.83), the minified size was 26.8kb. Now the latest version 1.2.8 has a minified size of 42.1kb. That's a ~57% increase in size. Smaller size was one of the main reasons I started using this awesome library, so I'd like to preserve that as much as possible. My suggestion is to start a plugin system where new functionality is added as separate plugins and devs can decide on which plugin they want to install if they need more functionality. Another benefit of this method is that devs can create their own custom plugins to achieve the functionality they need, maybe with some guidance from the maintainer. Two possible ways to do this:

Is there an alternative at the latest version?

[ ] Yes (descripe the alternative) [x] No

Is this related to an issue?

[ ] Yes (Give a link to the issue) [x] No

roman-rr commented 2 years ago

Thank you @CodeWithOz Good issue. As well, as others. I'm under consideration here of modules system and good implemenation to get lower bundle sizes. Some part like Z-Stack are might be rarely in use, but take a lot of space. I looking for solution.

CodeWithOz commented 2 years ago

Okay great thanks, looking forward to it.

roman-rr commented 2 years ago

@CodeWithOz Thank you very much! Modules are implemented and welcome everyone who would like to create your own modules 🥳 Description can be found here

CodeWithOz commented 2 years ago

Hey @roman-rr awesome work on the modules :+1: , I've switched over to using them. Do you have any documentation for the new changes you've made to other parts of the code? I'm seeing a new problem that started since I upgraded so I'm just curious to know if the changes are documented somewhere because they're not in the changelog. I've already switched to the events property so I know the problem is not from there.

CodeWithOz commented 2 years ago

I've isolated the issue I'm having and created a sample reproduction. I posted about it in #181.

roman-rr commented 2 years ago

@CodeWithOz the only changes required after modulation is events property. If there something changes in panes behavior - it is a bug that i been not found yet with basic tests. Feel free to open issues.