Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
289 stars 76 forks source link

Enhancement: Calcite-icon option for adornments #1767

Open TheBlueDog opened 3 years ago

TheBlueDog commented 3 years ago

Description

Enhance the calcite-icon component by adding the option to display an adornment layer over the chosen icon.

There are cases where an icon needs additional definition, but is not interactive like a button.

Icon library will not require additional versions of every icon to be created each time the adornment is needed by a product.

Acceptance Criteria

Relevant Info

This will bring a familiar pattern from Pro into the web platform. See: ArcGIS Pro Style Guide Icon Adornments

Dependency - The adornments will need to be created by the icon team. It is unknown where the adornments would be stored (part of Calcite UI Icon library?)

Which Component

Calcite Icon

Example Use Case

Implementation code suggestion:

<calcite-icon icon="file-xls" scale="m" adornment="expired" adornment-fill="ui-danger"></calcite-icon>

Screen Shot 2021-03-16 at 8 56 20 PM

dozer76 commented 3 years ago

This will be an awesome addition for Site Scan's upcoming feature - Enterprise Fleet Management. We need to use icons to represent certain actions like this in interactive tables, which can be thought of as activity feeds. examples include:

macandcheese commented 3 years ago

I think the use case makes sense, especially when considering a table view or some kind of feed layout with many line items... couple thoughts:

@dozer76 - do you have screenshots of the above so we can take a look at what the implementation is?

griffgriffindor commented 3 years ago

@macandcheese I wanted to tackle those points, because I had some the same thoughts. You brought up some great questions.

griffgriffindor commented 3 years ago
  • Some of the above already have calcite-ui-icons that could just use a fill color? (layer-add, layer-broken, check-layer, lock, etc.) - by adding more iconography on top of any underlying icon - are we making is easy for folks to create confusion for their users

Yeah, also, layer-broken and check-layer could be removed if we have these adornments implemented. We'd just have to make sure that people who are using those icons aren't using them as actionable icons. In that case, we should keep them as is.

paulcpederson commented 3 years ago

@johnmgriffith do we have these glyphs available? Assuming you would want these drawn to fit the 11x11 artboard right?

Could also have a calcite-adornment component which you could pass as the default slot to an icon. This would enable you to use an adornment with other components as well like calcite-avatar or calcite-action

jul11557 commented 3 years ago

I'm 7 months behind here, but figured I'd add a comment, as this enhancement would be really helpful for our team's upcoming release -- specifically for user with avatars (re @paulcpederson's last comment). Here are a few examples where we would be interested in using this, if possible:

  1. A status circle on a user avatar to indicate the user's status (online, offline, away). Right now we display a dot next to avatars, which doesn't match how apps generally display user status. We can customize this ourselves, but would be helpful if it were available with the calcite-avatar component.

  2. An icon on a team avatar. We use an avatar component for teams and need a way to represent which team somebody is a part of. We are considering displaying a star icon on the avatar to denote this.

  3. Potentially showing a dot or adornment on the filter icon to show that filters have been applied. (I think there may be better ways to display this and am not entirely sold on this pattern, but could be worth considering.)

We are currently using a custom avatar in our app and haven't switched to calcite-avatar. If the adornment options were available and extended to the calcite-avatar it would be a good switch for us.

macandcheese commented 2 years ago

@paulcpederson @jul11557 - We are looking at this again and are wondering:

jul11557 commented 2 years ago

@macandcheese glad this enhancement is resurfacing!

ArcGIS Mission would also require an icon with a custom color option, yes. We use avatars for both individual users and mission teams. For teams, we chose to display a star to denote "My Team", which looks like this:

Screen Shot 2022-05-11 at 8 35 42 AM

That being said, it seems unnecessary to allow product teams to put any icon whatsoever on top of another icon or avatar. In many cases, the adorning icon is very difficult to discern without a border or background. If the calcite team were to offer a couple icons as a small set available for adornments, that would seem perfectly reasonable to me (for example, perhaps a plus/minus icon to show that this person could be added or removed from something, a key for a key person, a badge to denote someone is a top contributor, etc.).