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

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

Closed
CodeWithOz opened this issue Feb 7, 2022 · 6 comments
Assignees
Labels
enhancement Extra attention is needed question Further information is requested

Comments

@CodeWithOz
Copy link

CodeWithOz commented Feb 7, 2022

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:

  • put the plugins in unique scripts that must be imported (using esm) or loaded separately (using umd). This is fairly common, and dayjs is a good example (I'm currently using it)
  • provide a cli build step to create the final bundle, with the option of specifying which plugins to include in addition to the core package. This may require more work

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 roman-rr self-assigned this Feb 7, 2022
@roman-rr roman-rr added enhancement Extra attention is needed question Further information is requested labels Feb 7, 2022
@roman-rr
Copy link
Collaborator

roman-rr commented Feb 7, 2022

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
Copy link
Author

Okay great thanks, looking forward to it.

roman-rr added a commit that referenced this issue May 17, 2022
roman-rr added a commit that referenced this issue May 21, 2022
@roman-rr
Copy link
Collaborator

@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
Copy link
Author

Hey @roman-rr awesome work on the modules 👍 , 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
Copy link
Author

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

@roman-rr
Copy link
Collaborator

roman-rr commented Jun 8, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants