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

ENH-000170675 How to extend the icon component #4803

Open
webmapLee opened this issue Jun 27, 2022 · 5 comments
Open

ENH-000170675 How to extend the icon component #4803

webmapLee opened this issue Jun 27, 2022 · 5 comments
Labels
0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. estimate - 8 Requires input from team, consider smaller steps. p - medium Issue is non core or affecting less that 60% of people using the library resolution: refine For issues we support, but additional details are needed prior to dev work. Support Issues accepted from Esri Support.
Milestone

Comments

@webmapLee
Copy link

webmapLee commented Jun 27, 2022

Description

i want to define a custom icon,but i don't know how to do it ? i find nothing about it in the documentation

Blocked issues: #9743

Acceptance Criteria

define custom icon

Relevant Info

No response

Which Component

calcite-icon

Example Use Case

No response

Esri Support context

Request for allowing custom icons to be used in the Menu Item component in Calcite Design System v 2.12


Salesforce ID: ENH-000170675

Salesforce Submitter: Disha Jha

Salesforce Submit Date: 9/11/2024 5:14 PM

Salesforce Bug Type: Product

Salesforce Severity: Low

Use Case:

Primary Audience:

Developer, Viewers


What does the customer want?

The customer wants to be able to use custom icons (PNG, JPG and SVG formats) in the Calcite Menu Item.


Why does the customer want this?

The customer has a Calcite-Menu in their web application in which they want to incorporate icons such as the ‘Facebook’ icon which is not available under the default Calcite icons. Hence, they would like to be able to use their own icons by adding the custom icon URLs. If they can do so, they would be able to use a wider range of icons in their custom applications.


Attached Files: Yes



Description of Enhancement: Currently, the Calcite Menu Item only supports the icons available here: https://developers.arcgis.com/calcite-design-system/icons/ The above icons can be added by passing corresponding strings to the iconStart and iconEnd properties in the Menu Item.

Repro Data: (n/a)

Work Around: (n/a)

Product: Calcite Design System

Functional Category: Calcite Design System

Client Platform: (n/a)

Version Found: 2.12

Planned Version Fixed: (n/a)

Comment: (n/a)

@webmapLee webmapLee added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Jun 27, 2022
@webmapLee
Copy link
Author

I looked at the source code of calcite-components,as follows:
image
here the method of fetchIcon, fetch icon path from icon json file,can you support the custom path

@driskull
Copy link
Member

Hi @webmapLee.

At this time, we don't support using any icons that aren't apart of the calcite-ui-icons https://github.com/esri/calcite-ui-icons/ which are the official icons of the Calcite design system.

We may allow for use of 3rd party or custom icons at some point. At this time, I would recommend using an SVG in place of the calcite-icon component.

@webmapLee
Copy link
Author

webmapLee commented Jun 28, 2022

how to define svg in the calcite-icon, is it like this?

<calcite-icon>
<svg path='****'/>
</calcite-icon>

@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library estimate - 8 Requires input from team, consider smaller steps. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Nov 6, 2023
@geospatialem geospatialem added this to the 2024 July Priorities milestone Dec 6, 2023
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Dec 6, 2023
@geospatialem geospatialem changed the title How to extend the icon component ENH-000170675 How to extend the icon component Sep 25, 2024
@geospatialem geospatialem added the Support Issues accepted from Esri Support. label Sep 25, 2024
@geospatialem
Copy link
Member

geospatialem commented Sep 25, 2024

A few related requests for consideration while working towards a solution:

@macandcheese
Copy link
Contributor

Maybe components that accept icon property / properties could also have an iconAsset prop that just accepts a path to asset to display. Or even parse the provided value to the existing props and determine if it’s valid Calcite UI name or a location path?

@jcfranco jcfranco added the resolution: refine For issues we support, but additional details are needed prior to dev work. label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. estimate - 8 Requires input from team, consider smaller steps. p - medium Issue is non core or affecting less that 60% of people using the library resolution: refine For issues we support, but additional details are needed prior to dev work. Support Issues accepted from Esri Support.
Projects
None yet
Development

No branches or pull requests

6 participants