spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug]: Add the posibility to inject new icons in toasts

Open AndreiBaicu26 opened this issue 1 year ago • 1 comments
trafficstars

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

sp-toast

Expected behavior

The express app uses different icons than spectrum classic. Additionally, there are requests for a "premium" toast that involves a "premium" icon. The toast component should provide a way to add custom icons. Example : https://www.figma.com/file/k5FYSaFhxiLUuPjvWfPSpi/Express-DS--%3E-Atoms?node-id=13%3A14026&mode=dev

Actual behavior

Currently, the icon is rendered only by the toast element.

Screenshots

No response

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

No response

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

AndreiBaicu26 avatar Feb 12 '24 12:02 AndreiBaicu26

Express Icon customization generally should occur with less developer interference. See https://github.com/adobe/spectrum-web-components/issues/2845. The team has yet to commit resourcing to completing the work, but the way that it addresses all icons and not just icons in one pattern may change the priority of work you are addressing here?

If the work above is completed, the idea of the "premium" icon becomes more clear. The idea of a single "variant" wherein the icon is fully customizable simplified the element API here for a diversity of consumers. Wether that is a new variant or the default variant is a good conversation to have with design.

Westbrook avatar Feb 12 '24 13:02 Westbrook

Closing this issue as https://github.com/adobe/spectrum-web-components/pull/4200 will add the capability to automatically switch to express icons when neede 💯

AndreiBaicu26 avatar Mar 26 '24 07:03 AndreiBaicu26