acl-services / acl-services/paprika

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

Open
#937 8 comments 0 reactions 0 assignees View on GitHub
Editor's Choice Medium Priority →
Dominant language
JavaScript
Stars
54
Forks
10
Avg merge
1d 12h
Merged PRs (30d)
6

Description

# 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.