bitplatform icon indicating copy to clipboard operation
bitplatform copied to clipboard

Icon and IconName Improvement

Open NMeJa opened this issue 3 months ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I am trying to use Font-Awesome icons inside the BitIcon and in overall places there IconName can be provided. This can't be done. I understand that it uses MDL2 design. But at the same time I don't think it is very difficult problem to solve.

In addition, If I can provide the SVG to IconName and it can parse SVG that would be great or if I provide the link to the image file and for it to load that image, but compare to enabling font awesome I understand it will take more time and is not easy thing to add.

Describe the solution you'd like

I already tried and found what is the problem and how it can be easily solved. The main problem is bit-icon and bit-icon--

  • bit-icon--: because it automatically adds as prefix which messes with correct class calling. TBH, it has easy workaround simply adding space in front. But still would be good to not have to do it.
  • bit-icon: it is more problematic. Because it uses font-family Fabric MDL2. This font can't render font-awesome icons, which results in default rectangle error version.

The dirty solution would be to simply add this bit-icon bit-icon-- inside the BitIconName.cs as prefix, which would quickly fix the issue. and if someone for some reason only wants the name without the prefix you can add some small Trim helper method to return correct name.

More correct way would be to check what kind of item the IconName is. First, go over if it is inside the BitIconNames and if not, remove the class prefix. This version would even give you more control over everything and even adding support for SVG and maybe images would be easier.

Additional context

No response

NMeJa avatar Nov 19 '25 22:11 NMeJa

Hello there! I'm a wiki 🤖.

Based on the content of this thread, I've found a potentially relevant wiki page for you!

View Wiki Page

I hope this helps!

github-actions[bot] avatar Nov 19 '25 22:11 github-actions[bot]

Thanks for contacting us. We're investigating this issue. We'll let you know if it's possible to work on this issue.

msynk avatar Nov 20 '25 10:11 msynk