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

Suggestion for Enhancing select Consistency with Popper.js Integration #521

Closed
wants to merge 1 commit into from

Conversation

PruthviPraj00
Copy link
Contributor

Hello @olegpix,

This is a suggestive pull request.

In the new example for select where users can use "dropdownScope": "window", they currently need to explicitly include Popper.js on their page. However, this step is unnecessary for dropdown and tooltip, as they already utilize Popper.js internally.

Screenshot 2024-12-06 at 12 11 06 PM

To ensure consistency across components and improve user experience, I propose integrating Popper.js with select internally, just like dropdown and tooltip. This change will eliminate the need for users to include Popper.js separately on their pages.

Before Changes

When Popper.js is not included in the page:

Screenshot 2024-12-06 at 11 34 33 AM

After Changes

With updates to select/index.ts, Popper.js is used internally without requiring explicit inclusion:

Screenshot 2024-12-06 at 12 16 17 PM

I believe this change improves consistency and simplifies implementation for users.
Thank you!

@olegpix
Copy link
Collaborator

olegpix commented Dec 18, 2024

@PruthviPraj00 Hi,
Thank you for your suggestion and for taking the time to consider improvements to our approach. We truly appreciate your feedback and willingness to contribute.

We generally strive to keep our plugins as flexible and independent as possible, avoiding direct dependencies on external libraries whenever we can. Instead, we implement checks in the code to detect if a required plugin is present. If it isn’t, we clearly document which additional plugins need to be included for certain features to function as intended.

Our goal is for each plugin to stand on its own, minimizing unnecessary dependencies. For the select component, Popper.js is only needed for specific options, as noted in the documentation. Another key reason we don’t integrate Popper.js directly into select is that the select component can also be used independently, outside of our main bundle. In contrast, dropdown and tooltip rely fundamentally on Popper.js, making it essential for their basic functionality.

While we appreciate your initiative, we feel that your suggested changes don’t quite align with our overall approach, and we won’t be able to merge your pull request at this time. Please don’t be discouraged—your ideas are valuable, and we encourage you to continue contributing and sharing your thoughts. It’s through open dialogue that we’re able to improve together.

@olegpix olegpix closed this Dec 18, 2024
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.

2 participants