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

The polyfill functions in @paprika/helpers should be in a separated package as a peer dependency #937

Open
allison-c opened this issue Feb 10, 2021 · 8 comments
Labels
Editor's Choice Highlight an issue as something that would be great to be solve Medium Priority →

Comments

@allison-c
Copy link
Contributor

Bug Report

E.g elementScroll.js is the polyfill for Element.scroll(), Element.scrollTo(), Element.scrollBy(), but it's very common that a consuming app has paprika components in different ages, most of them will have different versions of @paprika/helpers package, which means we'll have multiple versions of elementScroll.js .

However, each polyfill is an IIFE, the later executed elementScroll.js will override the previous one. Element.scroll(), Element.scrollTo(), Element.scrollBy() will keep changing until everything loaded and executed. It will be very hard to debug when needed.

Expected behavior

Polyfills should be peer dependencies, or maybe because IE 11 will be unsupported soon, we can remove them?

Current behavior

Multiple versions of polyfills in consuming apps.

Screenshots / Gifs / Codepens

Include media to help illustrate the bug. Gifs help a lot!

Additional context

cc @AndreyChernykh

@nahumzs
Copy link
Contributor

nahumzs commented Mar 17, 2021

I think would be better to have specific packages for polyfills? also we are no longer supporting ie11 🤔 would this still be relevant?

@nahumzs nahumzs added the Editor's Choice Highlight an issue as something that would be great to be solve label Mar 17, 2021
@allison-c
Copy link
Contributor Author

I think would be better to have specific packages for polyfills? also we are no longer supporting ie11 🤔 would this still be relevant?

Yeah we definitely don't need this after September, maybe we need some cleanup at that time

@AndreyChernykh
Copy link
Contributor

@nahumzs that depends on a polyfill. We'll need to check the compatibility for each feature and decide if we still need some polyfills or not.

@oscarkwan
Copy link
Contributor

@allison-c Do you think this is still needed?

@nahumzs
Copy link
Contributor

nahumzs commented Sep 23, 2021

some of the polyfills are no longer need it if ie11 is not needed it, might as well be possible to just delete the polyfill for the newest versions.

@oscarkwan
Copy link
Contributor

Hi @nahumzs LOL

@allison-c
Copy link
Contributor Author

haha hi Nahum!

@oscarkwan
Copy link
Contributor

Sounds like this is still relevant for cleaning up the polyfills! Will leave this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editor's Choice Highlight an issue as something that would be great to be solve Medium Priority →
Projects
None yet
Development

No branches or pull requests

4 participants