cloudscape-design / components

React components for Cloudscape Design System
https://cloudscape.design/
Apache License 2.0
2.36k stars 156 forks source link

[Feature Request]: Support customer icon for ButtonDropdown icon variants #2639

Open phuctm97 opened 2 months ago

phuctm97 commented 2 months ago

Description

Currently when ButtonDropdown is set to variant icon or inline-icon, the icon is hard-coded to be the ellipsis icon. It would be great if we can customize the icon as well (by accepting iconName, iconUrl, etc.)

Code of Conduct

YueyingLu commented 2 months ago

Hey @phuctm97 thanks for reaching out and requesting the feature. Could you share more context why you need custom the icon and ellipsis icon not suitable?

phuctm97 commented 2 months ago

Hey @phuctm97 thanks for reaching out and requesting the feature. Could you share more context why you need custom the icon and ellipsis icon not suitable?

For example: I have a "Settings" dropdown, a Settings icon would look a lot better and is more recognizable than an ellipsis.

rolanday commented 1 month ago

+1. I'm actually curious why maintainers feel the request requires explanation why ellipsis icon not suitable. There are times, for example, a hamburger icon my be more suitable than ellipse. Also. afaict, Cloudscape does not provide a general purpose popover menu control, so this is all we have to work with and ellipse-only forces hand to pull in alternate component libraries to fill the gap.

just-boris commented 1 month ago

It is done this way for consistency. It is a single familiar shape, all users know what happens when clicking on it, no side effects attached.

With custom icons, it becomes unpredictable experience. If we add configurable icon, the very next feature request will be to add tooltip, because various icons are confusing. We will add tooltip – more corner cases will show up and need addressing.

Why going all this way if we can keep the UI plain and simple with consistent icons?

phuctm97 commented 1 month ago

It is done this way for consistency. It is a single familiar shape, all users know what happens when clicking on it, no side effects attached.

With custom icons, it becomes unpredictable experience. If we add configurable icon, the very next feature request will be to add tooltip, because various icons are confusing. We will add tooltip – more corner cases will show up and need addressing.

Why going all this way if we can keep the UI plain and simple with consistent icons?

This makes sense but I feel like a couple extra options would a good balance without compromising consistency so much.

just-boris commented 1 month ago

Sure, we can discuss, which one of our icons could be useful there without compromising consistency